CN114020789A - Bill data query method, system, device and storage medium - Google Patents

Bill data query method, system, device and storage medium Download PDF

Info

Publication number
CN114020789A
CN114020789A CN202111308107.9A CN202111308107A CN114020789A CN 114020789 A CN114020789 A CN 114020789A CN 202111308107 A CN202111308107 A CN 202111308107A CN 114020789 A CN114020789 A CN 114020789A
Authority
CN
China
Prior art keywords
data
query
target data
basic data
basic
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.)
Pending
Application number
CN202111308107.9A
Other languages
Chinese (zh)
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.)
Ctrip Travel Information Service Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Service Shanghai Co 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 Ctrip Travel Information Service Shanghai Co Ltd filed Critical Ctrip Travel Information Service Shanghai Co Ltd
Priority to CN202111308107.9A priority Critical patent/CN114020789A/en
Publication of CN114020789A publication Critical patent/CN114020789A/en
Pending legal-status Critical Current

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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a system, equipment and a storage medium for inquiring bill data, wherein the method comprises the following steps: receiving a query request from a query party, and acquiring a target data query parameter corresponding to target data to be acquired, which is carried by the query request; acquiring basic data from a data source according to the target data query parameters, and determining a calculation rule of the basic data; sending the basic data and the calculation rules of the basic data to a rule engine, wherein the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data; and receiving the combined data from the rule engine, and sending the received combined data as the inquired target data to the inquirer. The invention relates to a method for preparing a high-temperature-resistant ceramic material.

Description

Bill data query method, system, device and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a method, a system, equipment and a storage medium for inquiring bill data.
Background
In a settlement system, a wide variety of amount data is a core component of the settlement system. Some of the amount data are aggregated in different dimensions (e.g., aggregated by type of amount data), and some are combined amount data obtained by performing numerical/logical operations based on the base amount data. The traditional data query is realized by writing query parameters in SQL statements, and the query for different scenes corresponds to a specific SQL statement. However, the method obviously lacks flexibility, the online period is often too long when new requirements are met, the pressure of a settlement system on a database is high, and the performance improvement difficulty is high; and the code is filled with SQL statements, which is not beneficial to the later maintenance of the code.
Disclosure of Invention
The invention aims to provide a bill data query method, a bill data query system, a bill data query device and a bill data query storage medium, which are used for separating basic data to be queried from calculation rules, supporting dynamic configuration of the calculation rules, realizing flexible data query and reducing pressure on a database.
The embodiment of the invention provides a bill data query method, which comprises the following steps:
receiving a query request from a query party, and acquiring a target data query parameter corresponding to target data to be acquired, which is carried by the query request;
acquiring basic data from a data source according to the target data query parameters, and determining a calculation rule of the basic data;
sending the basic data and the calculation rules of the basic data to a rule engine, wherein the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data;
and receiving the combined data from the rule engine, and sending the received combined data as the inquired target data to the inquirer.
In some embodiments, obtaining base data from a data source according to the target data query parameters includes the steps of:
determining basic data query parameters corresponding to the target data according to the target data query parameters;
determining a data source corresponding to basic data to be acquired according to the basic data query parameters;
sending a basic data acquisition request to a corresponding data source, wherein the basic data acquisition request carries the basic data query parameters;
and acquiring the queried basic data from the data source.
In some embodiments, the target data query parameters include a type of target data and a time range of target data, and the base data query parameters include a type of base data and a time range of base data;
determining basic data query parameters corresponding to the target data according to the target data query parameters, comprising the following steps:
analyzing the target data query parameters, and determining the type and the time range of the target data;
inquiring the mapping relation between the target data and the basic data, and determining the type of the corresponding basic data according to the type of the target data;
determining the time range of the corresponding basic data according to the time range of the target data;
and taking the type and the time range of the basic data as corresponding basic data query parameters.
In some embodiments, determining the calculation rule of the base data comprises the following steps:
reading a configuration file, and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file.
In some embodiments, after querying the calculation rule of the basic data corresponding to the type of the target data from the configuration file, the method further includes the following steps:
and storing the calculation rule of the basic data in a memory of a system deployed by the rule engine.
In some embodiments, the calculation rule is a calculation formula, and storing the calculation rule of the base data in the memory of the system deployed by the rules engine includes storing the calculation formula of the base data in the memory of the system deployed by the rules engine in the form of a macro.
In some embodiments, after querying the calculation rule of the basic data corresponding to the type of the target data from the configuration file, the method further includes the following steps:
and checking the inquired calculation rule according to a preset rule checking algorithm.
In some embodiments, the target data query parameters further include a query scenario; the reading configuration file and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file comprise the following steps:
selecting a corresponding configuration file according to the query scene based on a mapping relation between a preset scene and the configuration file;
reading the selected configuration file, and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file.
In some embodiments, obtaining base data from a data source according to the target data query parameters includes the steps of:
and acquiring basic data from a plurality of data sources in parallel according to the target data query parameters.
In some embodiments, after obtaining the target data query parameter corresponding to the target data to be obtained carried by the query request, the method further includes the following steps:
checking the target data query parameters according to a preset query parameter checking algorithm;
and if the target data query parameter is not verified, rejecting the query request of the query party and ending the current process.
The embodiment of the invention also provides a bill data query system, which is used for realizing the bill data query method, and the system comprises:
the system comprises a request receiving module, a query processing module and a query processing module, wherein the request receiving module is used for receiving a query request from a query party and acquiring a target data query parameter which is carried by the query request and corresponds to target data to be acquired;
the data acquisition module is used for acquiring basic data from a data source according to the target data query parameter and determining a calculation rule of the basic data according to the target data query parameter;
the data calculation module is used for sending the basic data and calculation rules of the basic data to a rule engine, and the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data;
and the data sending module is used for receiving the combined data from the rule engine and sending the received combined data serving as the inquired target data to the inquirer.
An embodiment of the present invention further provides a device for inquiring billing data, including:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the billing data query method via execution of the executable instructions.
The embodiment of the invention also provides a computer-readable storage medium for storing a program, and the program realizes the steps of the bill data query method when being executed by a processor.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The method, the system, the equipment and the storage medium for inquiring the bill data have the following beneficial effects:
the invention separates the basic data and the calculation rule of the query, acquires the basic data according to the target data parameter of the query when receiving the query request, and then combines the basic data according to the configured calculation rule, thereby supporting the dynamic configuration of the calculation rule without compiling a large number of SQL sentences and embedding a large number of fixed SQL sentences in codes, realizing flexible data query, easily expanding different application scenes, simultaneously transferring the calculation processing of the data to a rule engine, greatly reducing the pressure on a database and improving the data query efficiency.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings.
FIG. 1 is a flow chart of a billing data query method according to an embodiment of the invention;
FIG. 2 is a flow diagram of obtaining base data from a data source according to the target data query parameters, in accordance with an embodiment of the present invention;
FIG. 3 is a flow diagram of determining basic data query parameters according to one embodiment of the invention;
FIG. 4 is a block diagram of a billing data query system according to an embodiment of the invention;
fig. 5 is a schematic structural diagram of a bill data query device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the steps. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
As shown in fig. 1, an embodiment of the present invention provides a method for querying bill data, including the following steps:
s100: receiving a query request from a query party, and acquiring a target data query parameter corresponding to target data to be acquired, which is carried by the query request;
in this embodiment, the target data query parameter includes a type of the target data and a time range of the target data, for example, the querying party may set the type of the target data to be queried and select a time start point and an end point of the target data;
in this embodiment, the target data may be a target amount, for example, and the target data query parameter may include a type of the target amount and a time range corresponding to the target amount. For example, if the target data query parameter in one query request is to query the turnover of XX hotel in nearly 3 months, the type of the target amount is the turnover, and the time range corresponding to the target amount is the time range from the current time node to the time node before 3 months;
s200: acquiring basic data from a data source according to the target data query parameters, and determining a calculation rule of the basic data;
s300: sending the basic data and the calculation rules of the basic data to a rule engine, wherein the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data;
in this embodiment, the rule engine is a computation engine with basic logic computation capability, for example, it may be a QLExpress rule engine, and the rule engine may support four arithmetic operations of numerical values and common logic judgment;
s400: and receiving the combined data from the rule engine, and sending the received combined data as the inquired target data to the inquirer.
When the target data is sent, if basic data which does not need to be processed through the calculation rule exists in the target data, the basic data is also used as inquired target data to be sent to the inquirer. For example, if one of the target data query parameters is a turnover of a certain day, the turnover of the day may be directly obtained from the data source and then returned to the querying party as the target data.
In the bill data query method of the present invention, when a query request is received through step S100, after basic data is acquired according to a queried target data parameter through step S200 and a calculation rule is determined, the basic data is combined by a rule engine according to the configured calculation rule through step S300, and then the combined target data is transmitted to a querying party through step S400. The invention separates the basic data of inquiry from the calculation rule, can support the dynamic configuration of the calculation rule, does not need to compile a large number of SQL sentences, does not need to embed a large number of fixed SQL sentences in codes, can realize flexible data inquiry, is easy to expand different application scenes, and simultaneously transfers the calculation processing of the data to the rule engine, thereby greatly reducing the pressure on the database and improving the data inquiry efficiency.
In this embodiment, after obtaining the target data query parameter corresponding to the target data to be obtained carried by the query request, the method further includes the following steps:
and checking the target data query parameters according to a preset query parameter checking algorithm. The preset query parameter checking algorithm may include some checking rules of the query parameters, for example, one checking rule may be set to determine whether the target data query parameter includes the type and time range of the target data, and if there is no one, the target data query parameter is considered to be illegal, the query request of the querying party is rejected, and the current process is ended. For another example, a check rule may be set to determine whether the time range of the target data is legal, and if the starting point of the time range in the target data query parameter is after the ending point, the time range is considered to be illegal, the query request of the querying party is rejected, and the current process is ended.
As shown in fig. 2, in this embodiment, in the step S200, acquiring basic data from a data source according to the target data query parameter includes the following steps:
s210: determining basic data query parameters corresponding to the target data according to the target data query parameters;
s220: determining a data source corresponding to basic data to be acquired according to the basic data query parameters;
s230: sending a basic data acquisition request to a corresponding data source, wherein the basic data acquisition request carries the basic data query parameters;
the mapping relationship between the basic data and the data sources can also be stored in advance, namely, the type of the basic data stored in each data source and the time range of the stored basic data are stored, and when the data volume of one type of the basic data is large, the data in different time ranges can be stored in different data sources; here, the data source is a database storing basic data;
the data source only needs to undertake the tasks of data storage and query, namely the data source only needs to acquire corresponding data from the data stored in the data source according to the basic data query parameters and return the data, the acquired basic data are stored in the data source, the corresponding fields can be directly positioned according to the basic data query parameters without calculation and combination, the task of data calculation is not needed to undertake, the processing pressure of the database is greatly reduced, and the efficiency of database data query is also improved;
s240: and acquiring the queried basic data from the data source.
In this embodiment, the basic data may be stored in a plurality of different data sources, and in different S200, when the basic data is acquired from the data source, the basic data is acquired from the plurality of data sources in parallel according to the target data query parameter, so that the time consumption of the entire data query process can be reduced.
In this embodiment, the basic data query parameters include a type of basic data and a time range of the basic data. As shown in fig. 3, the step S210: determining basic data query parameters corresponding to the target data according to the target data query parameters, comprising the following steps:
s211: analyzing the target data query parameters, and determining the type and the time range of the target data;
s212: inquiring the mapping relation between the target data and the basic data, and determining the type of the corresponding basic data according to the type of the target data;
the mapping relationship between the target data and the basic data may be directly stored, for example, when the type of the target data is total turnover, the corresponding basic data is daily total turnover, and when the type of the target data is profit, the corresponding basic data is total turnover and cost, the mapping relationship between the target data and the basic data may also be obtained by reading the calculation rule in the configuration file in advance, and determining the basic data corresponding to the target data according to the calculation rule corresponding to the type of the target data, that is, in the calculation rule, wherein each independent variable required for calculation corresponds to the basic data;
s213: determining the time range of the corresponding basic data according to the time range of the target data, for example, if the time range of the target data is nearly three months, the time range of the basic data is also nearly three months;
s214: and taking the type and the time range of the basic data as corresponding basic data query parameters.
In this embodiment, the calculation rule may be configured in a configuration file, and may be updated in real time according to different requirements. In step S200, determining a calculation rule of the basic data includes the following steps:
reading a configuration file, and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file.
The calculation rule is stored in the configuration file based on the type of the target data corresponding to the calculation rule, so that the configuration file stores the calculation rule and the mapping relation between the calculation rule and the type of the target data. For example, when the type of the target data is the profit amount, that is, the calculation rule of the basic data corresponding to the profit amount is searched from the configuration file, the calculation rule may be, for example, a calculation formula, the dependent variable in the calculation formula is the profit amount, and the independent variable involved in the calculation formula is the type of the basic data, such as the turnover amount and the cost amount.
In different application scenarios, the same target amount type may correspond to different calculation formulas, and if the method in the prior art is adopted, different SQL query statements need to be configured, which is very heavy in workload and very responsible for processing. The invention can realize the flexible dynamic configuration of the calculation rule by setting the configuration file. The user can modify or delete the existing calculation rule through the configuration file, and can also add new calculation rules. Further, the user may divide the configuration file according to the scenes, for example, the configuration files of a plurality of scenes are respectively set, and the calculation rules in the configuration files of different scenes may be different. When the configuration file is read, different configuration files can be read to obtain different calculation rules.
Specifically, the target data query parameters further include query scenes, which may be divided into, for example, travel agency scenes, hotel scenes, scenery spot scenes, and the like, and different configuration files are pre-configured according to different scenes. The reading configuration file and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file comprise the following steps:
selecting a corresponding configuration file according to the query scene based on a mapping relation between a preset scene and the configuration file;
reading the selected configuration file, and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file.
In this embodiment, after querying the calculation rule of the basic data corresponding to the type of the target data from the configuration file, the method further includes the following steps:
and storing the calculation rule of the basic data in a memory of a system deployed by the rule engine, wherein the rule engine can directly call the calculation rule of the basic data from the memory during subsequent calculation. In this embodiment, the calculation rule is a calculation formula, and the storing the calculation rule of the basic data in the memory of the system deployed by the rule engine includes storing the calculation formula of the basic data in the memory of the system deployed by the rule engine in the form of a macro.
In this embodiment, after querying the calculation rule of the basic data corresponding to the type of the target data from the configuration file, the method further includes the following steps:
and checking the inquired calculation rule according to a preset rule checking algorithm. The rule checking algorithm may also be some preset checking rules for checking the calculation formula, for example, whether the calculation formula relates to non-existent basic data or not is judged, whether contradictions exist in the calculation formula or not is judged, if the calculation rule passes the checking, the step S300 may be continued, if the calculation rule fails the checking, an error prompt is performed, and a worker waits for the reconfiguration of the calculation rule until the calculation rule passes the checking of the rule checking algorithm, and the step S300 is continued.
As shown in fig. 4, an embodiment of the present invention further provides a bill data query system, which is used to implement the bill data query method, and the system includes:
a request receiving module M100, configured to receive a query request from a querying party, and obtain a target data query parameter corresponding to target data to be obtained, where the target data query parameter is carried in the query request;
the data acquisition module M200 is used for acquiring basic data from a data source according to the target data query parameter and determining a calculation rule of the basic data according to the target data query parameter;
the data calculation module M300 is configured to send the basic data and calculation rules of the basic data to a rule engine, where the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data;
and a data sending module M400, configured to receive the combined data from the rule engine, and send the received combined data to the querying party as queried target data.
In the bill data query system of the present invention, when a query request is received by the request receiving module M100, the data obtaining module M200 obtains basic data according to the queried target data parameters and determines a calculation rule, the rule engine combines the basic data according to the configured calculation rule by the data calculating module M300, and then the data sending module M400 sends the combined target data to the querying party. The invention separates the basic data of inquiry from the calculation rule, can support the dynamic configuration of the calculation rule, does not need to compile a large number of SQL sentences, does not need to embed a large number of fixed SQL sentences in codes, can realize flexible data inquiry, is easy to expand different application scenes, and simultaneously transfers the calculation processing of the data to the rule engine, thereby greatly reducing the pressure on the database and improving the data inquiry efficiency.
As shown in fig. 4, in the bill data query system of the present invention, the request receiving module M100 and the data sending module M400 may communicate with a plurality of querying parties, obtain query requests of the querying parties, and send corresponding target data to the corresponding querying parties, where M is exemplarily shown in fig. 4, and M is greater than or equal to 1. The data obtaining module M200 may communicate with multiple data sources simultaneously, and obtain basic data for subsequent calculation from the corresponding data sources, where n is greater than or equal to 1, and fig. 4 exemplarily shows n data sources, where the data sources are databases storing the basic data. The rule engine and the bill data query system may be deployed on one application server or may be deployed on different application servers, and may perform data transmission therebetween.
In this embodiment, the functions of each module of the bill data query system may be implemented by using the specific implementation manner of each step in the bill data query method, which is not described herein again. For example, the request receiving module M100 may adopt the specific implementation of step S100 to receive the query request and obtain the target data query parameter, the data obtaining module M200 may adopt the specific implementation of step S200 to obtain the basic data and determine the calculation rule, the data calculating module M300 may adopt the specific implementation of step S300 to obtain the combined data, and the data sending module M400 may adopt the specific implementation of step S400 to send the finally obtained target data to the querying party.
The embodiment of the invention also provides a bill data query device, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the billing data query method via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" platform.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 5. The electronic device 600 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the billing data query methods section above in this specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In the bill data query device, the program in the memory is executed by the processor to realize the steps of the bill data query method, so the device can also obtain the technical effect of the bill data query method.
The embodiment of the invention also provides a computer-readable storage medium for storing a program, and the program realizes the steps of the bill data query method when being executed by a processor. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the invention described in the above-mentioned billing data query methods section of this specification, when the program product is executed on the terminal device.
Referring to fig. 6, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The program in the computer storage medium implements the steps of the bill data query method when being executed by the processor, and therefore, the computer storage medium can also obtain the technical effects of the bill data query method.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (13)

1. A bill data query method is characterized by comprising the following steps:
receiving a query request from a query party, and acquiring a target data query parameter corresponding to target data to be acquired, which is carried by the query request;
acquiring basic data from a data source according to the target data query parameters, and determining a calculation rule of the basic data;
sending the basic data and the calculation rules of the basic data to a rule engine, wherein the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data;
and receiving the combined data from the rule engine, and sending the received combined data as the inquired target data to the inquirer.
2. The billing data query method of claim 1, wherein the step of obtaining the basic data from the data source according to the target data query parameter comprises the steps of:
determining basic data query parameters corresponding to the target data according to the target data query parameters;
determining a data source corresponding to basic data to be acquired according to the basic data query parameters;
sending a basic data acquisition request to a corresponding data source, wherein the basic data acquisition request carries the basic data query parameters;
and acquiring the queried basic data from the data source.
3. The billing data query method of claim 2, wherein the target data query parameter includes a type of target data and a time range of target data, and the basic data query parameter includes a type of basic data and a time range of basic data;
determining basic data query parameters corresponding to the target data according to the target data query parameters, comprising the following steps:
analyzing the target data query parameters, and determining the type and the time range of the target data;
inquiring the mapping relation between the target data and the basic data, and determining the type of the corresponding basic data according to the type of the target data;
determining the time range of the corresponding basic data according to the time range of the target data;
and taking the type and the time range of the basic data as corresponding basic data query parameters.
4. The billing data query method of claim 3, wherein determining the calculation rule of the basic data comprises the steps of:
reading a configuration file, and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file.
5. The billing data query method of claim 4, wherein after querying the calculation rule of the basic data corresponding to the type of the target data from the configuration file, the method further comprises the following steps:
and storing the calculation rule of the basic data in a memory of a system deployed by the rule engine.
6. The billing data query method of claim 5, wherein the calculation rule is a calculation formula, and storing the calculation rule of the basic data in the memory of the system deployed by the rules engine comprises storing the calculation formula of the basic data in the memory of the system deployed by the rules engine in the form of a macro.
7. The billing data query method of claim 4, wherein after querying the calculation rule of the basic data corresponding to the type of the target data from the configuration file, the method further comprises the following steps:
and checking the inquired calculation rule according to a preset rule checking algorithm.
8. The billing data query method of claim 4, wherein the target data query parameters further include a query scenario; the reading configuration file and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file comprise the following steps:
selecting a corresponding configuration file according to the query scene based on a mapping relation between a preset scene and the configuration file;
reading the selected configuration file, and inquiring the calculation rule of the basic data corresponding to the type of the target data from the configuration file.
9. The billing data query method of claim 1, wherein the step of obtaining the basic data from the data source according to the target data query parameter comprises the steps of:
and acquiring basic data from a plurality of data sources in parallel according to the target data query parameters.
10. The method for inquiring the bill data according to claim 1, wherein after acquiring the target data inquiry parameter corresponding to the target data to be acquired carried by the inquiry request, the method further comprises the following steps:
checking the target data query parameters according to a preset query parameter checking algorithm;
and if the target data query parameter is not verified, rejecting the query request of the query party and ending the current process.
11. A billing data query system for implementing the billing data query method of any one of claims 1 to 10, the system comprising:
the system comprises a request receiving module, a query processing module and a query processing module, wherein the request receiving module is used for receiving a query request from a query party and acquiring a target data query parameter which is carried by the query request and corresponds to target data to be acquired;
the data acquisition module is used for acquiring basic data from a data source according to the target data query parameter and determining a calculation rule of the basic data according to the target data query parameter;
the data calculation module is used for sending the basic data and calculation rules of the basic data to a rule engine, and the rule engine is configured to process the basic data according to the received calculation rules to obtain combined data;
and the data sending module is used for receiving the combined data from the rule engine and sending the received combined data serving as the inquired target data to the inquirer.
12. A billing data inquiry apparatus, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the billing data query method of any of claims 1 to 10 via execution of the executable instructions.
13. A computer-readable storage medium storing a program, wherein the program, when executed by a processor, implements the steps of the billing data query method of any of claims 1 to 10.
CN202111308107.9A 2021-11-05 2021-11-05 Bill data query method, system, device and storage medium Pending CN114020789A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111308107.9A CN114020789A (en) 2021-11-05 2021-11-05 Bill data query method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111308107.9A CN114020789A (en) 2021-11-05 2021-11-05 Bill data query method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN114020789A true CN114020789A (en) 2022-02-08

Family

ID=80061866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111308107.9A Pending CN114020789A (en) 2021-11-05 2021-11-05 Bill data query method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN114020789A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185999A (en) * 2022-09-13 2022-10-14 北京达佳互联信息技术有限公司 Data processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185999A (en) * 2022-09-13 2022-10-14 北京达佳互联信息技术有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN107330034B (en) Log analysis method and device, computer equipment and storage medium
CN111177231A (en) Report generation method and report generation device
CN111813804B (en) Data query method and device, electronic equipment and storage medium
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN109241100B (en) Query method, device, equipment and storage medium
CN111666293A (en) Database access method and device
CN111143446A (en) Data structure conversion processing method and device of data object and electronic equipment
US20180081940A1 (en) Remote query optimization in multi data sources
CN112015402A (en) Method and device for quickly establishing service scene and electronic equipment
CN111221852A (en) Mixed query processing method and device based on big data
CN114020789A (en) Bill data query method, system, device and storage medium
CN114281663A (en) Test processing method, test processing device, electronic equipment and storage medium
CN108959294B (en) Method and device for accessing search engine
CN110851343A (en) Test method and device based on decision tree
CN116204428A (en) Test case generation method and device
US9569187B2 (en) Irreducible modules
CN112131257B (en) Data query method and device
CN111125163A (en) Method and apparatus for processing data
CN111221860A (en) Mixed query optimization method and device based on big data
CN114995719A (en) List rendering method, device, equipment and storage medium
CN110716946B (en) Method and device for updating feature rule matching library, storage medium and electronic equipment
CN110351350B (en) Client request processing method and system based on multi-server docking and electronic equipment
CN115563183B (en) Query method, query device and program product
CN115454354B (en) Data processing method, system, electronic device and storage medium
CN111913737B (en) Method, device, equipment and storage medium for constructing data service interface

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