CN109189799B - Service data query method, device, computer equipment and storage medium - Google Patents
Service data query method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109189799B CN109189799B CN201810919749.4A CN201810919749A CN109189799B CN 109189799 B CN109189799 B CN 109189799B CN 201810919749 A CN201810919749 A CN 201810919749A CN 109189799 B CN109189799 B CN 109189799B
- Authority
- CN
- China
- Prior art keywords
- algorithm
- service
- field
- sentences
- query
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 278
- 238000004590 computer program Methods 0.000 claims description 14
- 230000010354 integration Effects 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a service data query method, a device, computer equipment and a storage medium, wherein the service data query method comprises the following steps: receiving a service inquiry field and a target service field, and acquiring a corresponding service algorithm according to the service inquiry field and the target service field; acquiring an algorithm code corresponding to the service algorithm; if the sentences with the same structure exist in the algorithm codes, merging the sentences with the same structure; and executing the algorithm codes after combining the sentences with the same structure, and acquiring target service data associated with the service query field. The service data query method can reduce the number of system operation and improve the query efficiency of service data.
Description
Technical Field
The present invention relates to the field of data processing, and in particular, to a service data query method, a device, a computer device, and a storage medium.
Background
In a service system, the calculation of the related service data is required to be realized through a related algorithm, and the algorithm is realized through writing in a code form into the system.
Because the steps of the algorithm in the current system are more, the corresponding codes are more, so that the consumption of system resources is larger when relevant data are calculated, the system operation speed is easy to be slow, the speed of returning the calculated result is also slow, and the efficiency is lower. In addition, at present, when inquiring service data, the algorithm of the system can only support single-order inquiry, and the inquiry efficiency is lower.
Disclosure of Invention
The embodiment of the invention provides a service data query method, a device, computer equipment and a storage medium, which are used for solving the problem of low service data calculation efficiency.
A business data query method, comprising:
Receiving a service inquiry field and a target service field, and acquiring a corresponding service algorithm according to the service inquiry field and the target service field;
acquiring an algorithm code corresponding to the service algorithm;
If the sentences with the same structure exist in the algorithm codes, merging the sentences with the same structure;
And executing the algorithm codes after combining the sentences with the same structure, and acquiring target service data associated with the service query field.
A business data query device, comprising:
The service algorithm acquisition module is used for receiving a service query field and a target service field and acquiring a corresponding service algorithm according to the service query field and the target service field;
the algorithm code acquisition module is used for acquiring the algorithm code corresponding to the service algorithm;
The sentence merging module is used for merging sentences with the same structure if sentences with the same structure exist in the algorithm codes;
and the target service data acquisition module is used for executing the algorithm codes after combining the sentences with the same structure to acquire target service data associated with the service query field.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the business data query method described above when the computer program is executed.
A computer readable storage medium storing a computer program which when executed by a processor implements the steps of the business data query method described above.
The service data query method, the device, the computer equipment and the storage medium acquire a corresponding service algorithm according to the service query field and the target service field by receiving the service query field and the target service field; then acquiring the corresponding algorithm codes of the business algorithm in the server, judging sentences in the algorithm codes after acquiring the corresponding algorithm codes according to the identification, and merging sentences with the same structure if sentences with the same structure exist in the algorithm codes, so that the number of steps corresponding to the algorithm codes is reduced, and the operation efficiency of the system is improved; and finally, executing the algorithm codes after combining the sentences with the same structure, acquiring target service data associated with the service query field, and returning the target service data to the client for the user to use. The number of cursors is reduced and the number of times of system operation is reduced by simplifying the steps corresponding to the algorithm codes, so that the operation efficiency of the system is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of a business data query method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a business data query method according to an embodiment of the invention;
FIG. 3 is another flow chart of a business data query method in an embodiment of the invention;
FIG. 4 is another flow chart of a business data query method in an embodiment of the invention;
FIG. 5 is a schematic block diagram of a service data query device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer device in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The service data query method provided by the application can be applied to an application environment as shown in fig. 1, wherein a client communicates with a server through a network, the client receives a service query field and a target service field and sends the service query field and the target service field to the server, the server acquires a corresponding service algorithm according to the service query field and the target service field, then the server acquires an algorithm code corresponding to the service algorithm, and if sentences with the same structure exist in the algorithm code, sentences with the same structure are combined; and finally, the server executes the algorithm codes after combining the sentences with the same structure to acquire the target service data associated with the service query field. The clients may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented by a stand-alone server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a service data query method is provided, and the service end of the method in fig. 1 is taken as an example for explanation, and the method includes the following steps:
S10: and receiving the service query field and the target service field, and acquiring a corresponding service algorithm according to the service query field and the target service field.
The service query field refers to field data input when service related data query is performed in a service system, for example, when service data of insurance claim settlement is to be queried, a policy number is input as the service query field. Optionally, the service query field is input by the client and sent to the server via the client. The target service field refers to a field that needs to be obtained through a query, for example, calculation of a claim deposit. Optionally, the target service field is also input by the client, and sent to the server via the client. The business algorithm refers to an algorithm for calculating business related data in a business system, such as an insurance policy algorithm. Optionally, the business algorithm is stored in a database of the server.
Specifically, a service query field and a target service field are received, the service query field and the target service field are sent to a server, and the server acquires a corresponding service algorithm from a database according to the service query field and the target service field.
For example: after the client sends the policy number and the claim Jin Ziduan to the server, the server obtains the corresponding information of the policy type, the policy age and the like according to the policy number, and obtains the business algorithm of the claim corresponding to the policy number from the database according to the information.
It should be understood that the business algorithm used is different depending on the input conditions when the business calculation is performed. For example, in the calculation of claim deposit, algorithm a is used if the age is between 18 and 60 years old, algorithm B is used if the age is above 60 years old, and algorithm B is used if the corresponding policy number is 65 years old.
S20: and acquiring an algorithm code corresponding to the service algorithm.
The algorithm code refers to a code used for executing a corresponding service algorithm in the service system. Optionally, the algorithm codes are stored in the server, and the identifiers are in one-to-one correspondence with the service algorithms, i.e. the corresponding algorithm codes can be obtained according to the service algorithm identifiers.
Specifically, a service algorithm identifier is obtained, and an algorithm code corresponding to the service algorithm identifier is obtained from a server according to the service algorithm identifier. Optionally, the service algorithm identifier is a sequence number of the service algorithm at the server, and the algorithm codes are stored according to the sequence number when stored at the server and are in one-to-one correspondence with the sequence number of the service algorithm, so that the corresponding algorithm codes can be obtained according to the service algorithm identifier.
S30: if sentences with the same structure exist in the algorithm codes, the sentences with the same structure are merged.
Wherein, the sentences of the same structure refer to the algorithmic sentences having the same database language structure in the steps of the algorithmic code. The steps of the algorithm code are distinguished by cursors, the beginning of a cursor representing the beginning of a step of the algorithm code. Alternatively, the same structured statement refers to a statement in the algorithm code that has the same database language structure and operates on the same data table. The data table refers to a data table specifically called in algorithm codes.
Specifically, whether the algorithm codes corresponding to the business algorithm have sentences with the same structure or not is judged, if yes, the algorithm sentences with the same structure are combined, so that the number of steps of the business algorithm in the algorithm codes is reduced, namely the number of cursors is reduced.
In a specific embodiment, when merging algorithm codes with the same structure, the server side merges sentences with the same structure by adopting a union all formula in a structured query language (Structured Query Language, abbreviated as SQL) together, so that the number of cursors is reduced.
For example, taking the claim calculation as an example, the arithmetic logic is: the current month claim pay = current month claim increment-history claim, and the algorithm code of the original part is:
step 1: cursor
FROM (automatic teller machine) claim list
WHERE Condition 1
AND condition 2
AND condition 3
Step 2: cursor
FROM (automatic teller machine) claim list
WHERE Condition 4
AND condition 5
AND condition 6
The above codes mean that the increment amount of the current month claim and the historical claim amount are taken out from the claim list, respectively. Since the tables used are the same data table (claim table), the structure of the SQL used is the same (SELECT, FROM, WHERE AND AND), so that the statement with the same structure in the algorithm steps can be judged.
Thus, the union all formulas in SQL can be employed to combine algorithm steps that exist in the same structure.
The following is a partial code obtained by combining the steps in the above example using the union all formula:
step 1: cursor
FROM (automatic teller machine) claim list
WHERE Condition 1
AND condition 2
AND condition 3
UNION ALL
SELECT historical claim amount
FROM (automatic teller machine) claim list
WHERE Condition 4
AND condition 5
AND condition 6
It should be understood that, in the system operation, the number of execution times is determined according to the number of algorithm steps, that is, the number of cursors, that is, the greater the number of cursors, the greater the number of execution times in the system operation, and the greater the system resource consumption. Since the amount of data involved in the service system is large, the performance of the service system is easily degraded when the operation is performed, particularly when the operation is performed in a batch, if the number of operations is too large. Therefore, algorithm steps are combined through union all formulas, so that the number of cursors can be reduced, and the system operation efficiency is improved.
S40: and executing the algorithm codes after combining the sentences with the same structure, and acquiring target service data associated with the service query field.
The target service data refers to data corresponding to the target service field, which is returned according to basic data associated with the service query field, wherein the basic data associated with the service query field is stored in a database of the server side, and can be obtained from the database through the service query field. For example, if the target service field is a claim number, the service query field is a policy number, and the basic data associated with the service query field is data of the age, sex, age of participation, etc. of the policy, the target service data is a specific operation result (a numerical value of the claim number) returned according to the service algorithm of the claim number and the basic data corresponding to the policy number.
Specifically, the associated basic data is returned from the database according to the service query field, then the algorithm codes after the sentences with the same structure are combined are executed, and the target service data is returned according to the basic data associated with the service query field.
For example, the server receives the service query field of the policy number and the target service field of the claim deposit, obtains specific basic data according to the policy number, executes the algorithm code obtained by combining the sentences with the same structure according to the step S30, and returns a specific operation result according to the basic data, namely, the numerical value of the claim deposit (target service data).
In the embodiment corresponding to fig. 2, a service query field and a target service field are received, and a corresponding service algorithm is obtained according to the service query field and the target service field; then acquiring the corresponding algorithm codes of the business algorithm in the server, judging sentences in the algorithm codes after acquiring the corresponding algorithm codes according to the identification, and merging sentences with the same structure if sentences with the same structure exist in the algorithm codes, so that the number of steps corresponding to the algorithm codes is reduced, and the operation efficiency of the system is improved; and finally, executing the algorithm codes after combining the sentences with the same structure, acquiring target service data associated with the service query field, and returning the target service data to the client for the user to use. The number of cursors is reduced and the number of times of system operation is reduced by simplifying the steps corresponding to the algorithm codes, so that the operation efficiency of the system is improved.
In one embodiment, as shown in fig. 3, in step S10, namely, a service query field and a target service field are received, and a corresponding service algorithm is obtained according to the service query field and the target service field, which specifically includes the following steps:
S11: and receiving the service query field, and acquiring algorithm parameters according to the service query field.
The algorithm parameters are parameters for judging what kind of service algorithm is adopted. For example: number of policy, sex of policy, age of policy, etc. Optionally, the service query field is one of the algorithm parameters. It will be appreciated that differences in algorithm parameters may result in differences in the business algorithms employed, for example, differences in gender or age of the insured person may result in differences in the business algorithms employed.
Specifically, the client receives the service query field, and after the received service query field is sent to the server, the server obtains algorithm parameters related to the service query field according to the service query field.
For example, the policy number is input as a service query field, and the server returns algorithm parameters such as sex, age of participation and the like of the policy related to the policy number from the database according to the received policy number.
S12: and acquiring an algorithm configuration table, and integrating the algorithm configuration table to obtain an algorithm configuration table.
The algorithm configuration table refers to a table containing a service algorithm and corresponding algorithm parameters, for example, the algorithm configuration table includes an algorithm main table and an algorithm condition table. Optionally, the algorithm configuration table is stored in a database of the server, and the corresponding algorithm configuration table can be called up by adopting a database language based on the table name or the field. The algorithm configuration table refers to a new table obtained after integrating the algorithm configuration table.
Specifically, the algorithm configuration table is called from the database by adopting a database language based on the name or the field of the algorithm configuration table, and the algorithm configuration table is integrated into a new table, namely an algorithm configuration table by adopting the database language.
Alternatively, the algorithm configuration table may be integrated with the with as instruction in SQL. The with as instruction can associate and integrate more than two tables into one table through the same field. For example, if the algorithm configuration table a and the algorithm configuration table B have the same C field, the algorithm configuration table a and the algorithm configuration table B may be integrated into an algorithm configuration table according to the C field by using the with as instruction.
It should be understood that, because the algorithm conditions are different, the corresponding adopted service algorithms are also different, so that when the service algorithm is selected, for example, when the algorithm configuration table includes an algorithm main table and an algorithm condition table, the algorithm main table is used as well as the algorithm condition table. In step S12, by integrating the algorithm configuration table into an algorithm configuration table, the algorithm configuration table includes both the service algorithm and the algorithm parameters related to the service algorithm, so that the service algorithm is convenient to take.
S13: and receiving the target service field, and acquiring a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameters and the target service field.
Specifically, a target service field is received, whether a service algorithm meeting the conditions exists in an algorithm configuration table is judged according to algorithm parameters and the target service field which are obtained by the service query field, and if so, the service algorithm is obtained.
For example, if the sex of the policy is male, the age is greater than 65 years, the data to be calculated is the claim deposit, i.e. the target service field is the claim deposit, the service algorithm meeting the condition is obtained from the algorithm configuration summary table according to the conditions.
In the embodiment corresponding to fig. 3, algorithm parameters are obtained from a database of a server according to the service query field by receiving the service query field; then integrating the algorithm configuration table into an algorithm configuration table; and receiving the target service field, and acquiring a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameters and the target service field. The algorithm configuration table is integrated into the algorithm configuration table, so that the service algorithm can be conveniently taken, the number of times of calling the algorithm configuration table in the algorithm code is correspondingly reduced, and the operation efficiency is improved.
In one implementation, as shown in fig. 4, in step S30, if there are sentences with the same structure in the algorithm code, the sentences with the same structure are merged, which includes the following steps:
s31: if the sentences with the same database language structure and the same data table are operated in the algorithm code, the sentences are sentences with the same structure.
Specifically, the algorithm steps included in the business algorithm are scanned in grammar, and the structure of the database language is obtained. Grammatical words such as SELECT, FROM, and WHERE, etc. Specifically, indexof () methods may be employed to find the corresponding string ("SELECT", "FROM" or "WHERE", etc.) to obtain the structure of the database language. The data table refers to a data table following the FROM grammar word, and indicates the data table pointed by the sentences, namely, the data is acquired FROM the data table. If the database statements adopted between the two steps are the same and the data tables of the operation are all pointed to the same data table, the statements between the two algorithm steps are judged to be statements with the same structure.
For example:
step 1: cursor
FROM (automatic teller machine) claim list
WHERE Condition 1
AND condition 2
AND condition 3
Step 2: cursor
FROM (automatic teller machine) claim list
WHERE Condition 4
AND condition 5
AND condition 6
Comparing the two steps after grammar scanning shows that the two steps are sentences with the same SELECT, FROM, WHERE AND AND structures, AND the operated data tables point to the claim settlement table, namely corresponding data are acquired from the claim settlement table, so that the two algorithm steps can be judged to be sentences with the same structures.
S32: the same structured statement is merged using the database language.
Specifically, when judging that the two algorithm steps adopt sentences with the same structure, acquiring the identifications of the two algorithm steps, and acquiring the initial positions of corresponding algorithm codes according to the identifications of the algorithms; and then adopting a merging grammar in the database language to combine the codes of the two algorithm steps end to finish merging. Wherein, the merging grammar can merge algorithm steps with the same structure by adopting union all formulas in SQL, thereby reducing the number of cursors in algorithm codes.
In the embodiment corresponding to fig. 4, by judging whether the algorithm code has the sentences with the same structure, if so, adopting union all formula to combine the sentences with the same structure, the number of algorithm steps corresponding to the business algorithm can be reduced, and the operation efficiency can be improved.
In one embodiment, in step S10, namely, the service query field and the target service field are received, and the corresponding service algorithm is obtained according to the service query field and the target service field, which further includes:
When the service inquiry field comprises a service field name and a service field value, each service field value is acquired based on the service field name, algorithm parameters are acquired according to each service field value, and then corresponding service algorithms are acquired from the algorithm configuration summary table according to the algorithm parameters and the target service field.
Wherein, the service field name refers to the identification of each column in the two-dimensional table of the data structure in the relation model. The service field value refers to a specific numerical value under the identification of the service field name column.
Specifically, when the service query field includes a service field name and a service field value, the client obtains each service field value under the service field name based on the service field name when receiving the service query field. Optionally, an interface may be established at the client, and a form of inputting a service field name and a service field value is adopted, that is, the interface inputs the first line as the service field name and the second line as the form of the service field value, each input service field value is sent to the server respectively, the server returns algorithm parameters related to the service field value from the database according to the service field value, then determines according to the obtained algorithm parameters and the target service field, determines whether a service algorithm meeting the condition exists in the algorithm configuration table, and if so, returns the corresponding service algorithm from the algorithm configuration table.
In this embodiment, algorithm parameters are returned from the database respectively in the input form of service field values, and then corresponding service algorithms are obtained from the algorithm configuration summary table according to the algorithm parameters and the target service fields, so that a plurality of results can be returned in batches according to a plurality of service field values, batch inquiry is realized, and inquiry efficiency is improved.
In one embodiment, after step S40, that is, after the step of executing the algorithm code after combining the sentences of the same structure to obtain the target service data associated with the service query field, the method further includes: and associating the target service data with the service query field to form a query result and returning.
Specifically, the target service data and the service query field are associated by adopting a database language, and form a one-to-one correspondence form to be returned to the client as a query result. Alternatively, the business query field may be associated with the target business data and returned using the left join formula in SQL.
For example, the business query field may be combined with the target business data in the following SQL statement (partial code):
SELECT policy number
FROM policy table
LEFT JOIN (SELECT claim deposit)
FROM (automatic teller machine) claim list
WHERE......
The code means that the policy number in the policy table is used as a service query field, and the claim deposit in the claim table is used as target service data to be combined and returned as a query result.
By forming the query result return by the service query field and the target service data, the readability of the returned result is higher, and the query result is convenient to check.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, a service data query device is provided, where the service data query device corresponds to the service data query method in the foregoing embodiment one by one. As shown in fig. 5, the service data query device includes a service algorithm acquisition module 10, an algorithm code acquisition module 20, a sentence merging module 30, and a target service data acquisition module 40. The functional modules are described in detail as follows:
The service algorithm obtaining module 10 is configured to receive the service query field and the target service field, and obtain a corresponding service algorithm according to the service query field and the target service field.
The algorithm code obtaining module 20 is configured to obtain an algorithm code corresponding to the service algorithm.
The sentence merging module 30 is configured to merge sentences with the same structure if sentences with the same structure exist in the algorithm code.
The target service data acquisition module 40 is configured to execute the algorithm code after combining the sentences with the same structure, and acquire the target service data associated with the service query field.
Further, the business algorithm acquisition module 10 includes an algorithm parameter acquisition unit 11, an algorithm configuration table integration unit 12, and a business algorithm acquisition unit 13.
The algorithm parameter obtaining unit 11 is configured to receive the service query field, and obtain the algorithm parameter according to the service query field.
The algorithm configuration table integrating unit 12 is configured to obtain an algorithm configuration table, and obtain an algorithm configuration table after the algorithm configuration table is integrated.
The service algorithm obtaining unit 13 is configured to receive the target service field, and obtain a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameter and the target service field.
Further, the sentence merging module 30 includes a structure judging unit 31 and a sentence merging unit 32.
The structure judging unit 31 is configured to, if there are sentences in the same database language structure and operating the same data table in the algorithm code, make the sentences the same structure.
The sentence merging unit 32 is configured to merge sentences of the same structure using a database language.
Further, the service algorithm obtaining module 10 further includes: when the service query field comprises a service field name and service field values, acquiring each service field value based on the service field name; acquiring algorithm parameters according to each service field value; and obtaining a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameters and the target service field.
Further, the service data query device further includes a result association module 50.
And the result association module 50 is used for associating the target service data with the service query field to form a query result and returning the query result.
The specific limitation of the service data query device can be referred to the limitation of the service data query method hereinabove, and will not be repeated here. The above-mentioned various modules in the service data query device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing basic data, service algorithms, algorithm configuration tables, algorithm codes, algorithm parameters and target service data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a business data query method.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
Receiving a service inquiry field and a target service field, and acquiring a corresponding service algorithm according to the service inquiry field and the target service field;
acquiring an algorithm code corresponding to a business algorithm;
If sentences with the same structure exist in the algorithm codes, merging the sentences with the same structure;
and executing the algorithm codes after combining the sentences with the same structure, and acquiring target service data associated with the service query field.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Receiving a service inquiry field and a target service field, and acquiring a corresponding service algorithm according to the service inquiry field and the target service field;
acquiring an algorithm code corresponding to a business algorithm;
If sentences with the same structure exist in the algorithm codes, merging the sentences with the same structure;
and executing the algorithm codes after combining the sentences with the same structure, and acquiring target service data associated with the service query field.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.
Claims (6)
1. The service data query method is characterized by comprising the following steps:
Receiving a service query field and a target service field, and acquiring a corresponding service algorithm according to the service query field and the target service field, wherein the receiving the service query field and the target service field, and acquiring the corresponding service algorithm according to the service query field and the target service field, comprises the following steps:
receiving a service query field, and acquiring algorithm parameters according to the service query field;
acquiring an algorithm configuration table, and integrating the algorithm configuration table to obtain an algorithm configuration table;
Receiving a target service field, and acquiring a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameters and the target service field;
acquiring an algorithm code corresponding to the service algorithm;
If the same-structure sentences exist in the algorithm code, merging the same-structure sentences, and if the same-structure sentences exist in the algorithm code, merging the same-structure sentences comprises the following steps:
If sentences with the same database language structure and the same data table operation exist in the algorithm codes, the sentences are sentences with the same structure;
combining the sentences with the same structure by adopting a database language;
And executing the algorithm codes after combining the sentences with the same structure, and acquiring target service data associated with the service query field.
2. The service data query method of claim 1, wherein the receiving the service query field and the target service field obtains a corresponding service algorithm according to the service query field and the target service field, further comprising:
when the service query field comprises a service field name and a service field value, acquiring each service field value based on the service field name;
Acquiring the algorithm parameters according to each service field value;
And acquiring a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameters and the target service field.
3. The service data query method according to claim 2, wherein after the step of acquiring target service data associated with the service query field after executing the algorithm code after merging the sentences of the same structure, the service data query method further comprises:
And associating the target service data with the service query field to form a query result and returning the query result.
4. A business data query device, comprising:
The service algorithm acquisition module is used for receiving a service query field and a target service field, acquiring a corresponding service algorithm according to the service query field and the target service field, and comprises an algorithm parameter acquisition unit, an algorithm configuration table integration unit and a service algorithm acquisition unit;
the algorithm parameter acquisition unit is used for receiving a service query field and acquiring algorithm parameters according to the service query field;
the algorithm configuration table integrating unit is used for acquiring an algorithm configuration table and integrating the algorithm configuration table to obtain an algorithm configuration table;
the service algorithm acquisition unit is used for receiving a target service field and acquiring a corresponding service algorithm from the algorithm configuration summary table according to the algorithm parameters and the target service field;
the algorithm code acquisition module is used for acquiring the algorithm code corresponding to the service algorithm;
The sentence merging module is used for merging sentences with the same structure if sentences with the same structure exist in the algorithm codes, and comprises a structure judging unit and a sentence merging unit;
the structure judging unit judges that the sentences are sentences with the same structure if sentences with the same database language structure and the same data table are operated in the algorithm code;
the sentence merging unit adopts database language to merge sentences with the same structure;
and the target service data acquisition module is used for executing the algorithm codes after combining the sentences with the same structure to acquire target service data associated with the service query field.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the business data query method according to any of claims 1 to 3 when the computer program is executed.
6. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the business data query method of any of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810919749.4A CN109189799B (en) | 2018-08-14 | 2018-08-14 | Service data query method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810919749.4A CN109189799B (en) | 2018-08-14 | 2018-08-14 | Service data query method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109189799A CN109189799A (en) | 2019-01-11 |
CN109189799B true CN109189799B (en) | 2024-04-26 |
Family
ID=64921302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810919749.4A Active CN109189799B (en) | 2018-08-14 | 2018-08-14 | Service data query method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109189799B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110597842B (en) * | 2019-07-22 | 2023-10-03 | 石化盈科信息技术有限责任公司 | Service data query method and system |
CN111125092A (en) * | 2019-11-18 | 2020-05-08 | 贝壳技术有限公司 | Service index query method and device |
CN110928607B (en) * | 2019-11-21 | 2024-05-14 | 浙江大搜车软件技术有限公司 | Service implementation method, device, computer equipment and storage medium |
CN113010510B (en) * | 2019-12-20 | 2024-03-19 | 中国移动通信集团安徽有限公司 | Service identification method, device, system and computing equipment |
CN111563094A (en) * | 2020-03-31 | 2020-08-21 | 北京奇艺世纪科技有限公司 | Data query method and device, electronic equipment and computer-readable storage medium |
CN111460298A (en) * | 2020-03-31 | 2020-07-28 | 深圳市酷开网络科技有限公司 | Service data processing method and device, computer equipment and storage medium |
CN111475316B (en) * | 2020-04-14 | 2023-01-24 | 中国人民解放军战略支援部队信息工程大学 | Persistence operation method, device, equipment and system for mimicry construction cloud service system |
CN112102099B (en) * | 2020-09-16 | 2023-11-24 | 泰康保险集团股份有限公司 | Policy data processing method and device, electronic equipment and storage medium |
CN113515544B (en) * | 2021-06-23 | 2022-02-15 | 金蝶软件(中国)有限公司 | Data attribute query method and data attribute query device |
CN113780716A (en) * | 2021-07-09 | 2021-12-10 | 北京鼎立保险经纪有限责任公司 | Business machine account generation system |
CN114691714A (en) * | 2022-04-07 | 2022-07-01 | 中国平安人寿保险股份有限公司 | Data acquisition method, device, equipment and medium based on SQL statement integration |
CN117724859A (en) * | 2023-02-15 | 2024-03-19 | 书行科技(北京)有限公司 | Data splicing method, device, electronic equipment and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102004766A (en) * | 2010-11-09 | 2011-04-06 | 北京神州泰岳软件股份有限公司 | Query method and system for configurable information based on information system |
CN105224566A (en) * | 2014-06-25 | 2016-01-06 | 国际商业机器公司 | Relational database is supported the method and system of injunctive graphical query |
CN107291907A (en) * | 2017-06-20 | 2017-10-24 | 深圳中兴网信科技有限公司 | A kind of multilingual storage of business datum and querying method and device |
CN108319722A (en) * | 2018-02-27 | 2018-07-24 | 北京小度信息科技有限公司 | Data access method, device, electronic equipment and computer readable storage medium |
-
2018
- 2018-08-14 CN CN201810919749.4A patent/CN109189799B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102004766A (en) * | 2010-11-09 | 2011-04-06 | 北京神州泰岳软件股份有限公司 | Query method and system for configurable information based on information system |
CN105224566A (en) * | 2014-06-25 | 2016-01-06 | 国际商业机器公司 | Relational database is supported the method and system of injunctive graphical query |
CN107291907A (en) * | 2017-06-20 | 2017-10-24 | 深圳中兴网信科技有限公司 | A kind of multilingual storage of business datum and querying method and device |
CN108319722A (en) * | 2018-02-27 | 2018-07-24 | 北京小度信息科技有限公司 | Data access method, device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109189799A (en) | 2019-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109189799B (en) | Service data query method, device, computer equipment and storage medium | |
CN109542907B (en) | Database cache construction method and device, computer equipment and storage medium | |
CN111309991B (en) | Query statement generation method and device and data query method and system | |
CN108717426B (en) | Enterprise data updating method and device, computer equipment and storage medium | |
CN111061766A (en) | Business data processing method and device, computer equipment and storage medium | |
CN109389299B (en) | Workflow process deployment method, workflow process deployment device, computer equipment and storage medium | |
CN108415998B (en) | Application dependency relationship updating method, terminal, device and storage medium | |
CN110213392B (en) | Data distribution method and device, computer equipment and storage medium | |
CN109361628B (en) | Message assembling method and device, computer equipment and storage medium | |
CN109542962B (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN112286934A (en) | Database table importing method, device, equipment and medium | |
CN112732742B (en) | Query page creating method and device, computer equipment and storage medium | |
CN110633306A (en) | Service data processing method and device, computer equipment and storage medium | |
CN108629050B (en) | Service data adjustment method, device, computer equipment and storage medium | |
US12089143B2 (en) | Network search method and apparatus, device and storage medium | |
CN110457401B (en) | Data storage method and device, computer equipment and storage medium | |
CN110222046B (en) | List data processing method, device, server and storage medium | |
CN112181423A (en) | Project construction method and device based on configuration file, computer equipment and medium | |
CN109656947B (en) | Data query method and device, computer equipment and storage medium | |
CN114356968A (en) | Query statement generation method and device, computer equipment and storage medium | |
CN112783866A (en) | Data reading method and device, computer equipment and storage medium | |
CN110704437B (en) | Method, device, equipment and storage medium for modifying database query statement | |
CN112463783A (en) | Index data monitoring method and device, computer equipment and storage medium | |
CN111901383A (en) | Data request processing method and device, computer equipment and storage medium | |
CN112579705A (en) | Metadata acquisition method and device, computer equipment and storage medium |
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 |