CN112182107A - Method and device for acquiring list data, computer equipment and storage medium - Google Patents

Method and device for acquiring list data, computer equipment and storage medium Download PDF

Info

Publication number
CN112182107A
CN112182107A CN202011052146.2A CN202011052146A CN112182107A CN 112182107 A CN112182107 A CN 112182107A CN 202011052146 A CN202011052146 A CN 202011052146A CN 112182107 A CN112182107 A CN 112182107A
Authority
CN
China
Prior art keywords
query
data
list
priority
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011052146.2A
Other languages
Chinese (zh)
Other versions
CN112182107B (en
Inventor
邓愉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202011052146.2A priority Critical patent/CN112182107B/en
Publication of CN112182107A publication Critical patent/CN112182107A/en
Application granted granted Critical
Publication of CN112182107B publication Critical patent/CN112182107B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application belongs to the technical field of big data, and relates to a method for acquiring business form data, which comprises the following steps: acquiring preset query conditions and priority fields, acquiring corresponding query results according to the query conditions and the priority fields, and combining the query results to obtain result set data; grouping the result set data according to the query condition to obtain grouped data, and sequencing the grouped data to obtain sequencing data corresponding to the query condition; when a list query instruction is received, determining whether the list query instruction carries a specified query condition; and when the list query instruction does not carry the specified query condition, combining the first data of each group in the sorted data into a data set, and extracting the first data with the highest priority in the data set as the list data. The application also provides a business form data acquisition device, computer equipment and a storage medium. In addition, the application also relates to a block chain technology, and the list data can be stored in the block chain. The data acquisition efficiency is improved.

Description

Method and device for acquiring list data, computer equipment and storage medium
Technical Field
The present application relates to the field of big data technologies, and in particular, to a method and an apparatus for obtaining business form data, a computer device, and a storage medium.
Background
The TiDB is an open source distributed mySQL database, list resources are usually stored in the TIDB database, and the database needs to be queried each time the list is acquired and processed. In a traditional query mode, the list data meeting the conditions needs to be acquired through the service mode which can be processed by the agent and the conditions such as a dialing mechanism.
The list data has different priority characteristics, and after the corresponding result set data is inquired by the agent dialing mechanism, the result set data needs to be sorted according to all fields of the priority characteristics. When the data volume is large, the database sorting time is too long (currently, the production data is less than 20 ten thousand per day, and the single acquisition time exceeds 0.15s) due to the query mode, so that the technical problem of low list data acquisition efficiency is caused.
Disclosure of Invention
The embodiment of the application aims to provide a method and a device for acquiring roster data, computer equipment and a storage medium, so as to solve the technical problem of low efficiency of acquiring the roster data.
In order to solve the above technical problem, an embodiment of the present application provides a method for acquiring business form data, which adopts the following technical solutions:
acquiring preset query conditions and priority fields, acquiring corresponding query results according to the query conditions and the priority fields, and combining the query results corresponding to all the query conditions to obtain result set data;
grouping the result set data according to the query condition to obtain grouped data, acquiring the query level of the priority field, and sequencing the grouped data according to the query level to obtain sequencing data corresponding to the query condition;
when a list query instruction is received, determining whether the list query instruction carries a specified query condition;
and when the list query instruction does not carry the specified query condition, combining the first data of each group in the sequencing data into a data set, and extracting the first data with the highest priority in the data set as the list data corresponding to the list query instruction.
Further, the step of grouping the result set data according to the query condition to obtain grouped data specifically includes:
taking the query condition as a keyword, and taking the priority field and the query result as keys corresponding to the keyword;
and grouping the result set data based on a preset data structure according to the key words and the keys to obtain grouped data.
Further, the step of obtaining the query rank of the priority field and performing the sorting processing on the packet data according to the query rank specifically includes:
acquiring preset field types, determining the query grades of the priority fields in each grouped data under different field types, and determining the result priority of the query result in each grouped data according to the query grades;
and sequencing the query results in each grouped data according to the result priority, and obtaining sequencing data when all the grouped data are sequenced.
Further, the step of determining the result priority of the query result in each packet data according to the query rank specifically includes:
acquiring a preset initial weight of each field type, wherein the field type comprises a list name, a list batch number and start-stop time;
and calculating the result priority of the query result in each grouped data through weighted summation according to the preset initial weight and the query grade.
Further, after the step of obtaining the ranking data corresponding to the query condition, the method further includes:
when a data adding instruction is received, acquiring a preset timing adding moment;
and adding a newly-added query result and a newly-added query condition corresponding to the data adding instruction into the sequencing data when the timing adding moment is reached.
Further, after the step of determining whether the list query instruction carries a specified query condition, the method further includes:
and when the list query instruction carries the specified query condition, querying the grouped data including the specified query condition in the sequencing data according to the specified query condition, and extracting the first data in the grouped data as the list data corresponding to the list query instruction.
Further, after the step of combining the query results to obtain result set data, the method further comprises:
acquiring a list main key corresponding to each query condition;
forming a data row by the query condition and the priority field according to the list main key, and associating a query result corresponding to the query condition;
and loading the list main key, the query condition, the priority field and the query result into an application memory for storage.
In order to solve the above technical problem, an embodiment of the present application further provides a device for obtaining business form data, which adopts the following technical solutions:
the acquisition module is used for acquiring preset query conditions and priority fields, acquiring corresponding query results according to the query conditions and the priority fields, and combining the query results corresponding to all the query conditions to obtain result set data;
the grouping module is used for grouping the result set data according to the query condition to obtain grouped data, and sequencing the grouped data to obtain sequencing data corresponding to the query condition;
the system comprises a confirmation module, a query module and a query module, wherein the confirmation module is used for determining whether a list query instruction carries a specified query condition when receiving the list query instruction;
and the extraction module is used for combining the first data of each group in the sequencing data into a data set when the list query instruction does not carry the specified query condition, and extracting the first data with the highest priority in the data set as the list data corresponding to the list query instruction.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which includes a memory and a processor, where the memory stores computer readable instructions, and the processor implements the steps of the above list data obtaining method when executing the computer readable instructions.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the above list data obtaining method are implemented.
The method comprises the steps of obtaining preset query conditions and priority fields, obtaining corresponding query results according to the query conditions and the priority fields, and combining the query results corresponding to all the query conditions to obtain result set data; grouping the result set data according to the query conditions to obtain grouped data, wherein the grouped data is grouped according to the query conditions and comprises data of a priority field corresponding to each query condition and a query result; when a list query instruction is received, determining whether the list query instruction carries a specified query condition, wherein the specified query condition is a query condition for requesting query initiated by a requester; when the list query instruction does not carry the specified query condition, the currently stored optimal list data is directly obtained without obtaining the specified list data according to the specified query condition; the first data of each group in the sequencing data are combined into a data set, the first data with the highest priority in the data set is extracted as the list data corresponding to the list query instruction, and the list data is the optimal list data obtained by the list query instruction which does not carry the specified query condition, so that the data can be rapidly queried, especially when the data magnitude is large, the time for obtaining the list data is greatly reduced, and the data obtaining efficiency is improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for roster data acquisition according to the present application;
FIG. 3 is a schematic structural diagram of an embodiment of a device for obtaining list data according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Reference numerals: the list data obtaining apparatus 400 includes: an acquisition module 401, a grouping module 402, a confirmation module 403, and an extraction module 404.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the method for obtaining the list data provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the device for obtaining the list data is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flowchart of one embodiment of a method of roster data acquisition according to the present application is shown. The list data acquisition method comprises the following steps:
step S201, acquiring preset query conditions and priority fields, acquiring corresponding query results according to the query conditions and the priority fields, and combining the query results corresponding to all the query conditions to obtain result set data;
in this embodiment, the preset query condition is a query condition set in advance according to the current application scenario, and different application scenarios may have different preset query conditions. For example, in an insurance application scenario, the simple query conditions in the application scenario are multiplied by the application model and the organization type to obtain various combinations. The priority field is the specific field content included in the field category, and the field category includes: name of the list, lot number of the list, start-stop time, etc. And inquiring a result database according to the inquiry conditions and the priority fields to obtain the inquiry result corresponding to each inquiry condition. The query results are combined to form the result set data, wherein the combination is formed by arranging a plurality of query results together, and the combination form is not limited.
Step S202, grouping the result set data according to the query condition to obtain grouped data, acquiring the query grade of the priority field, and sequencing the grouped data according to the query grade to obtain sequencing data corresponding to the query condition;
in this embodiment, when result set data is obtained, the result set data is grouped according to the query condition, that is, each query condition and priority field and the query result corresponding to the query condition are stored in a group, where each query condition may correspond to multiple query results, and multiple grouped data are formed by combining the query condition, the priority field, and the query result. When the packet data is obtained, the query levels of the priority fields are obtained, different priority fields may have different preset query levels, and the query results in each packet can be prioritized according to the query levels, wherein the higher the query level is, the higher the priority is. And sequencing the query results in each grouped data from high to low according to the priority sequence, wherein the obtained data is the sequencing data corresponding to the current query condition.
Step S203, when receiving a list query instruction, determining whether the list query instruction carries a specified query condition;
in this embodiment, the list query instruction is a received list data query instruction, and the list query instruction includes two types, one type is a list query instruction that does not carry a specified query condition, and the other type is a list query instruction that carries a specified query condition. When a list query instruction is received, determining whether the list query instruction carries a specified query condition, wherein when a requester sends the list query instruction, the list query instruction and the specified query condition can be bound and sent to a requester; and when the inquiring party receives the list inquiring instruction, determining whether the list inquiring instruction carries a specified inquiring condition. If the list query instruction carries specified query conditions, querying according to the carried specified query conditions; if the list query instruction does not carry the specified query condition, it means that the currently stored query result with the highest priority is directly obtained according to the list query instruction, for example, in an agent mode, the received list query instruction does not carry the specified query condition, and only the optimal list data needs to be queried according to the list query instruction.
Step S204, when the list query instruction does not carry the specified query condition, combining the first data of each group in the sorted data into a data set, and extracting the first data with the highest priority in the data set as the list data corresponding to the list query instruction.
In this embodiment, when the list query instruction does not carry a query condition, if the list query instruction does not carry any query instruction in the agent mode, the first data of each packet in the sorted data is screened, and the first data is the query data with the highest priority in the packet. And combining all the first data into a data set, sequencing all the first data in the data set according to the priority of each first data, wherein the first data with the highest priority is the list data corresponding to the list query instruction. And sending the list data to a request party corresponding to the list inquiry command, and removing the list data.
It is emphasized that the list data may also be stored in a node of a block chain in order to further ensure the privacy and security of the list data.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
According to the method and the device, the data are quickly inquired, especially when the data magnitude is large, the acquisition time of the list data is greatly reduced, and the acquisition efficiency of the data is improved.
In some embodiments of the present application, the grouping the result set data according to the query condition to obtain grouped data includes:
taking the query condition as a keyword, and taking the priority field and the query result as keys corresponding to the keyword;
and grouping the result set data based on a preset data structure according to the key words and the keys to obtain grouped data.
In this embodiment, when result set data is acquired, the result set data is grouped. Specifically, the query condition is used as a keyword (i.e. key), the priority field and the query result are used as keys corresponding to the keyword, and the structured data set is grouped based on a preset data structure (e.g. map data structure). The key words can uniquely identify the associated keys, and each query condition is associated with the corresponding priority field and the query result. Specifically, when result set data is obtained, each query condition is used as a key, that is, a keyword, the query result and the priority field corresponding to each query condition are value values corresponding to the key, and each packet data can be expressed as a combination of (key value). Moreover, the query result corresponding to the same query condition is not unique, the query condition may be a query condition in a rough range, there may be a plurality of query results corresponding to the query condition, the same query condition (key) may have different query results, and the query results of the same query condition (key) are divided into the same group.
The embodiment realizes the grouping of the result set data, so that the data meeting the query conditions can be quickly acquired by taking the query conditions as the indexes when the data is queried.
In some embodiments of the present application, the obtaining the query rank of the priority field, and the sorting the packet data according to the query rank includes:
acquiring preset field types, determining the query grades of the priority fields in each grouped data under different field types, and determining the result priority of the query result in each grouped data according to the query grades;
and sequencing the query results in each grouped data according to the result priority, and obtaining sequencing data when all the grouped data are sequenced.
In this embodiment, since the same query condition may query a plurality of query results, for packet data under the same query condition, different query results included in the same packet need to be prioritized. Specifically, when the packet data is obtained, a result priority corresponding to each query result of the packet data belonging to the same group is obtained, where the result priority is a priority of different query results of the packet data under the same query condition. The result priority can be determined according to the query grades of the priority fields corresponding to each query result under different field types, the higher the value of the query grade is, the higher the corresponding result priority is, wherein the field types include: name of the name, batch number of the name, start-stop time and the like, wherein the priority field is the specific field content under the field type, and the query level of the priority field is determined according to the preset level rule corresponding to each different field type. For example, when the field type is a list batch number, the query level of the priority field under the list batch number is determined according to the number size, and the value of the corresponding query level is larger for the list batch number with smaller number; and for the query grade of the priority field under the name of the list, the data can be graded according to a preset grade rule, and if the grade corresponding to the name of the list under the first-grade mechanism is highest, the value of the query grade is larger.
And determining the query grades of the priority fields corresponding to each query result under different field types according to a preset grade rule, and summing the query grades under the different field types to obtain the result priority corresponding to each query result. And when the result priority corresponding to each query result is obtained, sequencing the query results in the same group according to the sequence of the result priorities from high to low. And when all the different groups are sorted, obtaining the sorting data corresponding to the current query condition.
According to the data acquisition method and device, the data are sequenced according to the query conditions, so that the data with the highest priority can be rapidly and directly acquired when the data are acquired, the data do not need to be sequenced and acquired again when all the data are acquired, and the data acquisition efficiency is further improved.
In some embodiments of the present application, the determining the result priority of the query result in each of the grouped data according to the query rank includes:
acquiring a preset initial weight of each field type, wherein the field type comprises a list name, a list batch number and start-stop time;
and calculating the result priority of the query result in each grouped data through weighted summation according to the preset initial weight and the query grade.
In this embodiment, when calculating the result priority of the query result in each packet data, a preset initial weight corresponding to each field type may also be obtained in advance, and the result priority of the query result may be calculated according to the preset initial weight and the obtained query level. Specifically, each field type corresponds to different preset initial weights, the preset initial weights of the same field type are multiplied by the corresponding query level to obtain product results, and the product results of each query result in different field types are added to obtain the result priority corresponding to the query result. Wherein the result priority is represented by a number, and the higher the number, the higher the corresponding priority.
For example, for the query result a under a certain query condition, the preset initial weight of the name of the list is 0.5, the preset initial weight of the batch number of the list is 0.2, and the preset initial weight of the start-stop time is 0.3. And if the query level of the query result A under the condition that the field type is the name of the list is level 2, the query level under the corresponding batch number of the list is level 1, and the query level under the corresponding start-stop time is level 4, the result priority of the query result A is obtained through weighted summation calculation and is level 2.4.
According to the embodiment, the accurate calculation of different query results is realized, and the accurate division of the priorities of the query results is further realized, so that the result which best meets the query condition can be accurately acquired according to the priorities when data is acquired.
In some embodiments of the present application, after obtaining the ranking data corresponding to the query condition, the method further includes:
when a data adding instruction is received, acquiring a preset timing adding moment;
and adding a newly-added query result and a newly-added query condition corresponding to the data adding instruction into the sequencing data when the timing adding moment is reached.
In this embodiment, the timing adding time is an adding inquiry time specified in a preset timing adding task, and the result database can be added in a time-sharing manner by the timing adding task. Therefore, when a data adding instruction is received, a preset timing adding time is obtained, and when the timing adding time is reached, a corresponding timing adding task is triggered. And inquiring currently stored sequencing data according to the timed adding task, and adding a newly added inquiry condition and a newly added inquiry result carried by the data adding instruction into the sequencing data.
The embodiment realizes the newly-added processing of the data, and regularly inquires the sequencing data and newly adds the data by regularly adding the task, thereby further realizing the regular updating and maintenance of the data.
In some embodiments of the present application, after determining whether the list query instruction carries a specified query condition, the method further includes:
and when the list query instruction carries the specified query condition, querying the grouped data including the specified query condition in the sequencing data according to the specified query condition, and extracting the first data in the grouped data as the list data corresponding to the list query instruction.
In this embodiment, when the list query instruction carries a specified query condition, all the packet data including the specified query condition in the sorted data are obtained according to the specified query condition carried in the list query instruction. And if the data of the first query result, namely the first data, is arranged in the grouped data, determining the data as the list data corresponding to the list query instruction. And when the list data is acquired, sending the list data to a request party corresponding to the list inquiry command, and simultaneously reserving the list data. In addition, if the corresponding query result cannot be queried according to the specified query condition carried by the list query instruction, feeding back the corresponding query failure information to the requesting party corresponding to the current list query instruction.
According to the embodiment, when the list query instruction carries the specified query condition, the list data is rapidly queried, and the efficiency of obtaining the list data is further improved.
In some embodiments of the present application, after combining the query results to obtain result set data, the method further includes:
acquiring a list main key corresponding to each query condition;
forming a data row by the query condition and the priority field according to the list main key, and associating a query result corresponding to the query condition;
and loading the list main key, the query condition, the priority field and the query result into an application memory for storage.
In this embodiment, the main key of the list is an identification column unique to the list, and each column of data can be identified according to the main key of the list. And when the query condition and the priority field are obtained, obtaining the list main key corresponding to the query condition, and combining different query conditions and different priority fields into different data rows according to the list main key. And then associating the combined data rows with the query result corresponding to each query condition, and loading the list main key, the query condition, the priority field and the query result into an application memory for storage.
According to the embodiment, the data is stored through the application memory, so that the corresponding data can be acquired more quickly through the application memory when the data is extracted.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, can include processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a business form data obtaining apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the apparatus 400 for obtaining list data according to this embodiment includes: an acquisition module 401, a grouping module 402, a confirmation module 403, and an extraction module 404. Wherein:
an obtaining module 401, configured to obtain preset query conditions and priority fields, obtain corresponding query results according to the query conditions and the priority fields, and combine the query results corresponding to all the query conditions to obtain result set data;
in this embodiment, the preset query condition is a query condition set in advance according to the current application scenario, and different application scenarios may have different preset query conditions. For example, in an insurance application scenario, the simple query conditions in the application scenario have various combinations obtained by multiplying the application model and the organization type. The priority field is the specific field content included in the field category, and the field category includes: name of the list, lot number of the list, start-stop time, etc. And inquiring a result database according to the inquiry conditions and the priority fields to obtain the inquiry result corresponding to each inquiry condition. The query results are combined to form the result set data, wherein the combination is formed by arranging a plurality of query results together, and the combination form is not limited.
A grouping module 402, configured to group the result set data according to the query condition to obtain grouped data, obtain a query level of the priority field, and perform sorting processing on the grouped data according to the query level to obtain sorted data corresponding to the query condition;
wherein the grouping module 402 comprises:
the first confirming unit is used for taking the query condition as a keyword and taking the priority field and the query result as keys corresponding to the keyword;
and the grouping unit is used for grouping the result set data based on a preset data structure according to the key words and the keys to obtain grouped data.
The second confirming unit is used for acquiring preset field types, determining the query grades of the priority fields in each grouped data under different field types, and determining the result priority of the query result in each grouped data according to the query grades;
and the sequencing unit is used for sequencing the query result in each grouped data according to the result priority, and obtaining sequencing data when all the grouped data are sequenced.
Wherein the second confirmation unit further comprises:
the obtaining subunit is configured to obtain a preset initial weight of each field type, where the field type includes a name of a list, a list batch number, and a start-stop time;
and the calculating subunit is used for calculating the result priority of the query result in each grouped data through weighted summation according to the preset initial weight and the query grade.
In this embodiment, when result set data is obtained, the result set data is grouped according to the query condition, that is, each query condition and priority field and the query result corresponding to the query condition are stored in a group, where each query condition may correspond to multiple query results, and multiple grouped data are formed by combining the query condition, the priority field, and the query result. When the packet data is obtained, the query levels of the priority fields are obtained, different priority fields may have different preset query levels, and the query results in each packet can be prioritized according to the query levels, wherein the higher the query level is, the higher the priority is. Sequencing the query results in each grouped data from high to low according to the priority sequence, wherein the obtained data is the sequencing data corresponding to the current query condition
The confirmation module 403 is configured to determine whether the list query instruction carries a specified query condition when the list query instruction is received;
in this embodiment, the list query instruction is a received list data query instruction, and the list query instruction includes two types, one type is a list query instruction that does not carry a specified query condition, and the other type is a list query instruction that carries a specified query condition. When a list query instruction is received, determining whether the list query instruction carries a specified query condition, wherein when a requester sends the list query instruction, the list query instruction and the specified query condition can be bound and sent to a requester; and when the inquiring party receives the list inquiring instruction, determining whether the list inquiring instruction carries a specified inquiring condition. If the list query instruction carries specified query conditions, querying according to the carried specified query conditions; if the list query instruction does not carry the specified query condition, it means that the currently stored query result with the highest priority is directly obtained according to the list query instruction, for example, in an agent mode, the received list query instruction does not carry the specified query condition, and only the optimal list data needs to be queried according to the list query instruction.
An extracting module 404, configured to combine the first data of each group in the sorted data into a data set when the list query instruction does not carry the specified query condition, and extract the first data with the highest priority in the data set as the list data corresponding to the list query instruction.
In this embodiment, when the list query instruction does not carry a query condition, if the list query instruction does not carry any query instruction in the agent mode, the first data of each packet in the sorted data is screened, and the first data is the query data with the highest priority in the packet. And combining all the first data into a data set, sequencing all the first data in the data set according to the priority of each first data, wherein the first data with the highest priority is the list data corresponding to the list query instruction. And sending the list data to a request party corresponding to the list inquiry command, and removing the list data.
It is emphasized that the list data may also be stored in a node of a block chain in order to further ensure the privacy and security of the list data.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The apparatus for obtaining list data in the present application further includes:
the first obtaining submodule is used for obtaining a preset timing adding moment when a data adding instruction is received;
and the adding submodule is used for adding a newly-added query result and a newly-added query condition corresponding to the data adding instruction into the sequencing data when the timing adding time is reached.
In this embodiment, the timing adding time is an adding inquiry time specified in a preset timing adding task, and the result database can be added in a time-sharing manner by the timing adding task. Therefore, when a data adding instruction is received, a preset timing adding time is obtained, and when the timing adding time is reached, a corresponding timing adding task is triggered. And inquiring currently stored sequencing data according to the timed adding task, and adding a newly added inquiry condition and a newly added inquiry result carried by the data adding instruction into the sequencing data.
And the extraction sub-module is used for inquiring the grouped data including the specified query condition in the sequencing data according to the specified query condition when the list query instruction carries the specified query condition, and extracting the first data in the grouped data as the list data corresponding to the list query instruction.
In this embodiment, when the list query instruction carries a specified query condition, all the packet data including the specified query condition in the sorted data are obtained according to the specified query condition carried in the list query instruction. And if the data of the first query result, namely the first data, is arranged in the grouped data, determining the data as the list data corresponding to the list query instruction. And when the list data is acquired, sending the list data to a request party corresponding to the list inquiry command, and simultaneously reserving the list data. In addition, if the corresponding query result cannot be queried according to the specified query condition carried by the list query instruction, feeding back the corresponding query failure information to the requesting party corresponding to the current list query instruction.
The second obtaining sub-module is used for obtaining the list main key corresponding to each query condition;
the association submodule is used for forming a data line by the query condition and the priority field according to the list main key and associating the query result corresponding to the query condition;
and the storage sub-module is used for loading the list main key, the query condition, the priority field and the query result into an application memory for storage.
In this embodiment, the main key of the list is an identification column unique to the list, and each column of data can be identified according to the main key of the list. And when the query condition and the priority field are obtained, obtaining the list main key corresponding to the query condition, and combining different query conditions and different priority fields into different data rows according to the list main key. And then associating the combined data rows with the query result corresponding to each query condition, and loading the list main key, the query condition, the priority field and the query result into an application memory for storage.
The device for acquiring the list data realizes quick query of the data, greatly reduces the acquisition time of the list data especially when the data magnitude is large, and improves the acquisition efficiency of the data.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 6 comprises a memory 61, a processor 62, a network interface 63 communicatively connected to each other via a system bus. It is noted that only a computer device 6 having components 61-63 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 61 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 6. Of course, the memory 61 may also comprise both an internal storage unit of the computer device 6 and an external storage device thereof. In this embodiment, the memory 61 is generally used for storing an operating system installed in the computer device 6 and various types of application software, such as computer readable instructions of a list data obtaining method. Further, the memory 61 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 62 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to execute computer readable instructions stored in the memory 61 or process data, such as computer readable instructions for executing the list data obtaining method.
The network interface 63 may comprise a wireless network interface or a wired network interface, and the network interface 63 is typically used for establishing a communication connection between the computer device 6 and other electronic devices.
The computer equipment provided by the application realizes the rapid query of the data, and particularly greatly reduces the acquisition time of the list data when the data magnitude is large, and improves the acquisition efficiency of the data.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions, which can be executed by at least one processor, so as to cause the at least one processor to execute the steps of the above-mentioned list data obtaining method.
The computer-readable storage medium provided by the application realizes the quick query of the data, and particularly greatly reduces the acquisition time of the list data when the data magnitude is larger, and improves the acquisition efficiency of the data.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for acquiring data of a business form is characterized by comprising the following steps:
acquiring preset query conditions and priority fields, acquiring corresponding query results according to the query conditions and the priority fields, and combining the query results corresponding to all the query conditions to obtain result set data;
grouping the result set data according to the query condition to obtain grouped data, acquiring the query level of the priority field, and sequencing the grouped data according to the query level to obtain sequencing data corresponding to the query condition;
when a list query instruction is received, determining whether the list query instruction carries a specified query condition;
and when the list query instruction does not carry the specified query condition, combining the first data of each group in the sequencing data into a data set, and extracting the first data with the highest priority in the data set as the list data corresponding to the list query instruction.
2. The method of claim 1, wherein the step of grouping the result set data according to the query condition to obtain grouped data specifically comprises:
taking the query condition as a keyword, and taking the priority field and the query result as keys corresponding to the keyword;
and grouping the result set data based on a preset data structure according to the key words and the keys to obtain grouped data.
3. The method for obtaining list data according to claim 1, wherein the step of obtaining the query rank of the priority field and performing the sorting processing on the packet data according to the query rank specifically includes:
acquiring preset field types, determining the query grades of the priority fields in each grouped data under different field types, and determining the result priority of the query result in each grouped data according to the query grades;
and sequencing the query results in each grouped data according to the result priority, and obtaining sequencing data when all the grouped data are sequenced.
4. The method of claim 3, wherein the step of determining the result priority of the query result in each of the grouped data according to the query rank specifically comprises:
acquiring a preset initial weight of each field type, wherein the field type comprises a list name, a list batch number and start-stop time;
and calculating the result priority of the query result in each grouped data through weighted summation according to the preset initial weight and the query grade.
5. The method of claim 1, wherein after the step of obtaining the ranking data corresponding to the query condition, the method further comprises:
when a data adding instruction is received, acquiring a preset timing adding moment;
and adding a newly-added query result and a newly-added query condition corresponding to the data adding instruction into the sequencing data when the timing adding moment is reached.
6. The method of claim 1, wherein after the step of determining whether the list query instruction carries a specific query condition, the method further comprises:
and when the list query instruction carries the specified query condition, querying the grouped data including the specified query condition in the sequencing data according to the specified query condition, and extracting the first data in the grouped data as the list data corresponding to the list query instruction.
7. The method of claim 1, further comprising, after the step of combining the query results to obtain result set data:
acquiring a list main key corresponding to each query condition;
forming a data row by the query condition and the priority field according to the list main key, and associating a query result corresponding to the query condition;
and loading the list main key, the query condition, the priority field and the query result into an application memory for storage.
8. An apparatus for obtaining a business form data, comprising:
the acquisition module is used for acquiring preset query conditions and priority fields, acquiring corresponding query results according to the query conditions and the priority fields, and combining the query results corresponding to all the query conditions to obtain result set data;
the grouping module is used for grouping the result set data according to the query condition to obtain grouped data, and sequencing the grouped data to obtain sequencing data corresponding to the query condition;
the system comprises a confirmation module, a query module and a query module, wherein the confirmation module is used for determining whether a list query instruction carries a specified query condition when receiving the list query instruction;
and the extraction module is used for combining the first data of each group in the sequencing data into a data set when the list query instruction does not carry the specified query condition, and extracting the first data with the highest priority in the data set as the list data corresponding to the list query instruction.
9. Computer device comprising a memory having computer readable instructions stored therein and a processor implementing the steps of the method for the acquisition of roster data according to any one of claims 1 to 7 when executing the computer readable instructions.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the method of obtaining roster data according to any one of claims 1 to 7.
CN202011052146.2A 2020-09-29 2020-09-29 List data acquisition method, device, computer equipment and storage medium Active CN112182107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011052146.2A CN112182107B (en) 2020-09-29 2020-09-29 List data acquisition method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011052146.2A CN112182107B (en) 2020-09-29 2020-09-29 List data acquisition method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112182107A true CN112182107A (en) 2021-01-05
CN112182107B CN112182107B (en) 2023-11-03

Family

ID=73947260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011052146.2A Active CN112182107B (en) 2020-09-29 2020-09-29 List data acquisition method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112182107B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023230943A1 (en) * 2022-06-01 2023-12-07 Huawei Technologies Co., Ltd. System and method of data management

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669986A (en) * 2018-12-12 2019-04-23 深圳乐信软件技术有限公司 Blacklist sharing method, device, equipment and storage medium based on block chain
CN110223159A (en) * 2019-05-22 2019-09-10 深圳壹账通智能科技有限公司 Credit data query method, apparatus, computer equipment and storage medium
CN110457945A (en) * 2019-08-01 2019-11-15 卫盈联信息技术(深圳)有限公司 Method, inquiry method, apparatus, service method, apparatus and the storage medium of list inquiry
US20200258172A1 (en) * 2019-02-13 2020-08-13 The Toronto-Dominion Bank System and Method for Searching and Monitoring Assets Available for Acquisition
CN111680477A (en) * 2020-04-28 2020-09-18 中国平安财产保险股份有限公司 Method and device for exporting spreadsheet file, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669986A (en) * 2018-12-12 2019-04-23 深圳乐信软件技术有限公司 Blacklist sharing method, device, equipment and storage medium based on block chain
US20200258172A1 (en) * 2019-02-13 2020-08-13 The Toronto-Dominion Bank System and Method for Searching and Monitoring Assets Available for Acquisition
CN110223159A (en) * 2019-05-22 2019-09-10 深圳壹账通智能科技有限公司 Credit data query method, apparatus, computer equipment and storage medium
CN110457945A (en) * 2019-08-01 2019-11-15 卫盈联信息技术(深圳)有限公司 Method, inquiry method, apparatus, service method, apparatus and the storage medium of list inquiry
CN111680477A (en) * 2020-04-28 2020-09-18 中国平安财产保险股份有限公司 Method and device for exporting spreadsheet file, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023230943A1 (en) * 2022-06-01 2023-12-07 Huawei Technologies Co., Ltd. System and method of data management

Also Published As

Publication number Publication date
CN112182107B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN112365202B (en) Method for screening evaluation factors of multi-target object and related equipment thereof
CN111190689B (en) Digital twin system simulation method and device
CN113220734A (en) Course recommendation method and device, computer equipment and storage medium
CN112395390A (en) Training corpus generation method of intention recognition model and related equipment thereof
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN113836131A (en) Big data cleaning method and device, computer equipment and storage medium
CN112468409A (en) Access control method, device, computer equipment and storage medium
CN114996675A (en) Data query method and device, computer equipment and storage medium
CN112445873B (en) List display processing method, related device, equipment and medium
CN112182107A (en) Method and device for acquiring list data, computer equipment and storage medium
WO2022156087A1 (en) Data blood relationship establishing method and apparatus, computer device, and storage medium
CN112559866A (en) College book reading recommendation method, device, equipment and storage medium
CN109857748B (en) Contract data processing method and device and electronic equipment
CN116842012A (en) Method, device, equipment and storage medium for storing Redis cluster in fragments
CN113254106B (en) Task execution method and device based on Flink, computer equipment and storage medium
CN115378806A (en) Flow distribution method and device, computer equipment and storage medium
CN112002352B (en) Random music playing method and device, computer equipment and storage medium
CN115186151A (en) Resume screening method, device, equipment and storage medium
CN115203672A (en) Information access control method and device, computer equipment and medium
CN114912003A (en) Document searching method and device, computer equipment and storage medium
CN114615325A (en) Message pushing method and device, computer equipment and storage medium
CN113656466A (en) Policy data query method, device, equipment and storage medium
CN111327513B (en) Message data pushing method and device, computer equipment and storage medium
CN105468603A (en) Data selection method and apparatus
CN110245146B (en) User identification method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant