CN111125092A - Service index query method and device - Google Patents

Service index query method and device Download PDF

Info

Publication number
CN111125092A
CN111125092A CN201911127921.3A CN201911127921A CN111125092A CN 111125092 A CN111125092 A CN 111125092A CN 201911127921 A CN201911127921 A CN 201911127921A CN 111125092 A CN111125092 A CN 111125092A
Authority
CN
China
Prior art keywords
service
index
data table
indexes
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
CN201911127921.3A
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.)
Beike Technology Co Ltd
Original Assignee
Beike Technology 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 Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN201911127921.3A priority Critical patent/CN111125092A/en
Publication of CN111125092A publication Critical patent/CN111125092A/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • 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/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Data Mining & Analysis (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Educational Administration (AREA)
  • Quality & Reliability (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Bioethics (AREA)
  • Tourism & Hospitality (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a method and a device for inquiring a service index, wherein the method comprises the following steps: receiving an inquiry request sent by a terminal, wherein the inquiry request is used for inquiring at least one service index; for any one service index to be inquired, acquiring at least one service corresponding to the service index; acquiring all basic indexes of the service indexes from a data table according to the acquired service, and calculating the acquired basic indexes according to a statistical rule configured by the service indexes to acquire the service indexes; wherein at least one basic index is stored in the data table; each service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table. The embodiment of the invention can simultaneously inquire a plurality of service indexes and improve the inquiry efficiency of the service indexes.

Description

Service index query method and device
Technical Field
The present invention relates to the technical field of data services, and in particular, to a method and an apparatus for querying a service indicator.
Background
The service index refers to a quantized value of a certain service, and the quantized value of the service index is usually counted by numerical values of a plurality of basic indexes according to a certain rule. For example, in the field of house property transaction, the overarching aging is calculated by the quotient of the total time of the overarching time of each overarching house source in a certain time and the total amount of all overarching units in the time, the overarching unit amount refers to the number of the overarching in the certain time, the overarching time refers to the time consumed by each overarching house source on the service node of the overarching, and if the overarching aging is a service index, the overarching time and the overarching unit amount are two basic indexes under the service index.
Each basic index of the service index is stored in a data table, table 1 is a data table in the prior art, as shown in table 1, table 1 records the single amount of the past households and the time length of the past households of wuhan, xiangyang, anywhere and kingmen in a certain time period, wherein in wuhan there are 1 single amount of the past households, and the time length of the past household of the house source of the past household takes 10 days, so if the past household time efficiency of the north Hu province (assuming that the north Hu province only has 4 cities) is to be obtained, the calculation formula of the past household time efficiency of the north Hu province is as follows: (10 × 1+11 × 2+10 × 1+11 × 2)/(1+2+1+2) ═ 10.7 days/household.
Region of land Single quantity of passing family Time of passing home (Tian)
Wuhan dynasty 1 10
Xiangyang 2 11
Anywhere in the world 1 10
Jing door 2 11
Table 1 data table of the prior art
In the prior art, when a business index is to be counted, a basic index in a data table is usually counted directly by calling an SQL statement, and then calculation is performed according to the counted basic index. However, this method has the following drawbacks: firstly, for different business indexes or different query conditions, the SQL statement needs to be called for many times. Such as: inquiring basic field overhousehold single quantity of overhousehold aging, wherein dimensionality is Wuhan, and sql sentences can only be fixedly written: select Single amount of passing family from Table 1where Wuhan; if the dimension is modified to be Xiangyang, the sql statement needs to be modified again, and sql is: single amount of select passing family from Table 1where Xiangyang. In addition, the SQL statement itself cannot support complex calculation rules, e.g., (a + b)/c2The SQL statement can not be realized, the complex calculation rule is often involved in the field of house property transaction, and the SQL statement mode can not provide satisfactory effect on the query efficiency and the query complexity.
Disclosure of Invention
Embodiments of the present invention provide a service index query method and apparatus that overcome the above problems or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a method for querying a service indicator, including:
receiving an inquiry request sent by a terminal, wherein the inquiry request is used for inquiring at least one service index;
for any one of the business indexes to be inquired, acquiring at least one service corresponding to the business index;
acquiring all basic indexes of the business indexes from a data table according to the acquired service, and calculating the acquired basic indexes according to a statistical rule configured by the business indexes to acquire the business indexes;
wherein at least one basic index is stored in the data table; the service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table.
The acquiring at least one service corresponding to the service index further includes:
and judging whether the terminal has the authority for inquiring the service index, and if so, filtering the inquiry request according to the authority of the terminal to obtain the inquiry request conforming to the authority of the terminal.
Preferably, the receiving of the query request sent by the terminal further includes:
for any one service index, determining each data table where the basic index of the service index is located, and configuring a sub-service for at least one data table in each data table, where the sub-service is used to obtain all basic indexes of the service index in the corresponding data table;
for any data table, counting all the sub-services configured for the data table, and integrating all the sub-services into one service to obtain the corresponding relation between the service index and the service and the corresponding relation between the service and the data table.
Preferably, the acquiring all basic indexes of the service index from the data table according to the acquired service includes:
and determining sub-services corresponding to the business indexes from the obtained services, and obtaining all basic indexes of the business indexes from a data table according to the sub-services.
Preferably, the data table stores values of at least one basic index in at least one dimension; the query request is specifically used for querying the value of at least one service index in at least one dimension;
correspondingly, the obtaining at least one service corresponding to the service index further includes:
comparing the dimensionality stored in the data table with the dimensionality to be queried in the query request, and deleting the dimensionality which is not stored in the data table in the query request to obtain a new query request.
Preferably, the obtaining all basic indexes of the service index from a data table according to the obtained service further includes:
filtering the data table according to the new query request, so that the filtered data table only contains the dimensionality relevant to the new query request;
correspondingly, the step of obtaining all basic indexes of the service indexes from the data table according to the obtained service specifically includes:
and acquiring the basic index of the dimensionality relevant to the new query request from the filtered data table according to the acquired service.
Preferably, the obtaining the service index further includes:
and formatting the service index according to a preset rule, and outputting the service index after formatting to the terminal.
Preferably, the computer language used for configuring the statistical rule of the service index includes: one of php language, java language, go language and python language.
In a second aspect, an embodiment of the present invention provides an apparatus for querying a service indicator, including:
the device comprises a request receiving module, a service index acquiring module and a service index acquiring module, wherein the request receiving module is used for receiving a query request sent by a terminal, and the query request is used for querying at least one service index;
the service acquisition module is used for acquiring all services corresponding to any one service index to be inquired;
the operation module is used for acquiring all basic indexes of the service indexes from the data table according to the acquired service, and operating the acquired basic indexes according to the statistical rules configured by the service indexes to acquire the service indexes;
wherein at least one basic index is stored in the data table; each service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method provided in the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method as provided in the first aspect.
The method and the device for querying the service indexes provided by the embodiment of the invention utilize the premise that the basic indexes of the service indexes are stored in the data tables in advance, construct the service corresponding to each data table by determining the data table where each basic index of the service indexes is located, and the service is used for acquiring all the basic indexes of at least one service index in the corresponding data table, thereby realizing the purpose of querying a plurality of service indexes simultaneously and improving the query efficiency of the service indexes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for querying a service indicator according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for querying a service indicator according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service index query device according to an embodiment of the present invention
Fig. 4 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a service indicator query method provided in an embodiment of the present invention, as shown in fig. 1, the method includes S101, S102, and S103, specifically:
s101, receiving an inquiry request sent by a terminal, wherein the inquiry request is used for inquiring at least one service index.
It should be noted that, in the embodiment of the present invention, an inquiry request sent by a terminal is first received, where the inquiry request is used to inquire at least one service index, that is, the embodiment of the present invention can support a situation of inquiring multiple service indexes at a time. Taking the house property trade field as an example, the service index can be the over-home time limit, the loan time limit and the like.
S102, for any service index to be inquired, at least one service corresponding to the service index is obtained.
It should be noted that each service (service) in the embodiment of the present invention corresponds to and only one data table, and is configured to obtain all basic indexes of the at least one service index in the corresponding data table. For example, there are two data tables, which are data table 1 and data table 2, respectively, basic index 1 and basic index 2 are recorded in data table 1, basic index 3 and basic index 4 are recorded in data table 2, if the basic index of business index 1 is basic index 1 and basic index 3, and the basic index of business index 2 is basic index 2 and basic index 4, two services, service 1 and service 2, need to be constructed, where service 1 corresponds to data table 1 and is used to obtain basic index 1 and basic index 3, and service 2 corresponds to data table 2 and is used to obtain basic index 2 and basic index 4. Obviously, if the query request requires query of the service index 1, service 1 and service 2 corresponding to the service index corresponding to 1 need to be acquired. Therefore, the number of the services corresponding to the business index is not unique in the embodiment of the invention, and the specific number is related to the basic index of the business index which is dispersed in several data tables.
It should be noted that at least one service corresponding to the business index acquired in the embodiment of the present invention may be all services corresponding to the business index, or may be a part of services corresponding to the business index, for example, if the business index to be acquired is "whether the house to be purchased is a home of a buyer", one service is used to acquire the number of properties of the husband in the couple, and one service is used to acquire the number of properties of the wife in the couple, if one of the services finds that the number of properties of the couple is not 0, it is obviously known that the house to be purchased does not belong to the home, and the other service does not need to be acquired.
S103, acquiring all basic indexes of the service indexes from a data table according to the acquired service, and calculating the acquired basic indexes according to the statistical rules configured by the service indexes to acquire the service indexes.
It should be noted that after all basic indexes of the service indexes are obtained, a statistical rule needs to be configured according to the service indexes for calculation, taking overage as an example, overage is calculated by a quotient of total time of overage time of each overage house source in a certain time and total single amount of all overage houses in the time, and this calculation process is a statistical rule. It will be appreciated that the statistical rules of embodiments of the present invention may be rules that are simple to implement using addition, subtraction, multiplication, and division, or may be logical operations involving high-level operation notations such as weighted sums, sums of squares, and the like.
The embodiment of the invention utilizes the premise that the basic indexes of the business indexes are stored in the data table in advance, constructs the service corresponding to each data table by determining the data table where each basic index of the business indexes is positioned, and the service is used for acquiring all the basic indexes of at least one business index in the corresponding data table, thereby realizing the purpose of simultaneously inquiring a plurality of business indexes and improving the inquiring efficiency of the business indexes.
On the basis of the foregoing embodiments, as an optional embodiment, the acquiring at least one service corresponding to the service index further includes:
and judging whether the terminal has the authority for inquiring the service index, and if so, filtering the inquiry request according to the authority of the terminal to obtain the inquiry request conforming to the authority of the terminal.
Specifically, after receiving an inquiry request sent by a terminal, the embodiment of the invention also needs to judge whether the terminal has the authority to inquire the service index, and if the terminal does not inquire the authority of the service index overtime, no inquiry authority is prompted to the terminal, so that unnecessary inquiry is reduced; if the terminal has the authority of inquiring the service index, the inquiry authority of the terminal is checked, for example, the terminal can inquire the authority of the city A, and the inquiry request is the authority of inquiring the cities A and B, the inquiry aiming at the city B is filtered, so that the data inquiry range is reduced, and the risk of data leakage can be avoided.
On the basis of the foregoing embodiments, as an optional embodiment, the step of configuring the service index and the service before the query request sent by the receiving terminal further includes, specifically, the step of:
for any one service index, determining each data table where the basic index of the service index is located, and configuring a sub-service for at least one data table in each data table, where the sub-service is used to obtain all the basic indexes of the service index in the corresponding data table.
For example, there are two service indexes, which are service index 1 and service index 2, the basic index of service index 1 is basic index 1 and basic index 3, and the basic index of service index 2 is basic index 2 and basic index 4, where basic index 1 and basic index 2 are stored in data table 1, basic index 3 and basic index 4 are stored in data table 2, and it is necessary to construct sub-services 1-4, where sub-service 1 is used to obtain basic index 1 from data table 1, sub-service 2 is used to obtain basic index 2 from data table 1, sub-service 3 is used to obtain basic index 3 from data table 2, and sub-service 4 is used to obtain basic index 4 from data table 2.
For any data table, counting all the sub-services configured for the data table, and integrating all the sub-services into one service to obtain the corresponding relation between the service index and the service and the corresponding relation between the service and the data table.
Continuing with the above example, since sub-service 1 and sub-service 2 are configured for data table 1, and sub-service 3 and sub-service 4 are configured for data table 2, sub-service 1 and sub-service 2 are merged into one service, referred to as service 1, and sub-service 3 and sub-service 4 are merged into one service, referred to as service 2; as can be seen, although the service index 1 and the service index 2 correspond to the service 1 and the service 2, the service 1 corresponds to the data table 1, and the service 2 corresponds to the data table 2.
On the basis of the above embodiments, as an optional embodiment, when configuring the service index and the service, the method further includes a step of configuring a statistical rule of the service index. For example for the traffic indicators: in-transit volume, the statistical rule is to directly call the basic index, no extra calculation is needed, when the in-transit volume is expressed in a code, the in _ process _ cnt is configured by the rule of the in-transit volume, which indicates that no operation is needed, and the in _ process _ cnt field of the basic index is directly used; for example, a certain service index X, the statistical rule is that the basic index Y is divided by the basic index Z and then multiplied by 100%, and when expressed in the code, the rule of the service index X is configured as: Y/Z%. Besides, the embodiment of the invention can adopt other high-level languages such as java, python, go and the like, and the high-level language can support the configuration of complex logic operation.
On the basis of the foregoing embodiments, as an optional embodiment, the acquiring all basic indexes of the service index from a data table according to the acquired service specifically includes:
and determining sub-services corresponding to the business indexes from the obtained services, and obtaining all basic indexes of the business indexes from a data table according to the sub-services.
Continuing with the above example, if the terminal wants to query the service index 1, since there are two services corresponding to the service index 1, which are service 1 and service 2, respectively, the sub-service 1 in the service 1 is used to obtain the base index 1 from the data table 1, and the sub-service 3 in the service 2 is used to obtain the base index 3 from the data table 2. The actual process is therefore: and acquiring a service 1 and a service 2 according to the business index 1, acquiring a basic index 1 from the data table 1 by using the sub-service 1 in the service 1, and acquiring a basic index 3 from the data table 2 by using the sub-service 3 in the service 2, thereby achieving the purpose of acquiring all basic indexes of the business index 1.
On the basis of the foregoing embodiments, as an optional embodiment, the receiving, by the terminal, the query request sent by the terminal further includes: configuring a unique identifier of a service index and a unique identifier of a service;
correspondingly, the obtaining of the corresponding relationship between the service index and the service specifically includes: and establishing a corresponding relation between the unique identifier of the service index and the unique identifier of the service.
It should be noted that, in the embodiment of the present invention, by establishing the correspondence between the unique identifier of the service index and the unique identifier of the service, and by setting the unique identifier of the service index to be queried in the query request, the corresponding service can be obtained.
On the basis of the above embodiments, as an optional embodiment, a value of at least one basic index in at least one dimension is stored in the data table; the query request is specifically used for querying a value of at least one service index in at least one dimension.
It is understood that the data table of the embodiment of the present invention is not modified from the data table in the prior art. The dimension is the number of abstract concepts of things 'having connection', taking house trading as an example, the same business index, namely the loan aging, can have a plurality of dimensions, for example, the values of the loan aging in different regions, the region is one dimension, or for example, the values of the loan aging in different seasons, the quarter is also one dimension. It can be understood that the business indicators have the concept of dimensionality, as does the base indicators. In summary, the query request is actually to query at least one service index to take a value in at least one dimension, for example, to query a value of the deposit time in north and lake province.
Correspondingly, the obtaining at least one service corresponding to the service index further includes:
comparing the dimensionality stored in the data table with the dimensionality to be queried in the query request, and deleting the dimensionality which is not stored in the data table in the query request to obtain a new query request.
It should be noted that, the generation of the data table is not in the improved scope of the present invention, and therefore, it is not possible to change which basic indexes are recorded on the data table, and which dimensions of the basic indexes are recorded, which results in inconsistency between the dimensions stored in the data table and the dimensions to be queried in the query request, for example, data of the number of over-clients and the over-client time duration stored in the data table at two different house agent transaction institutions (institution a and institution B) are stored in the data table, each house agent transaction institution is a dimension, if the query request is over-client aging of institution a and institution C, since the data table does not record the basic indexes of institution C, the dimension of institution C in the query request needs to be deleted, and the deleted query request only requests over-client aging of institution a.
On the basis of the foregoing embodiments, as an optional embodiment, the acquiring, from a data table, all basic indexes of the service index according to the acquired service further includes:
and filtering the data table according to the new query request, so that the filtered data table only contains the dimension relevant to the new query request.
It should be noted that, in the embodiment of the present invention, before obtaining the basic index according to the service, the data table needs to be adjusted, and the adjusted data table only contains the dimension related to the new query request. For example, the data table stores data of the house passing single amount and the house passing time at two different house agent transaction institutions (institution a and institution B), and if the inquiry request requests institution a, the data of institution B in the data table needs to be filtered out to obtain the data table storing only the data of institution a. The query range can be reduced and the query efficiency can be improved.
On the basis of the foregoing embodiments, the acquiring all basic indexes of the service index from the data table according to the acquired service specifically includes: and acquiring the basic index of the dimensionality relevant to the new query request from the filtered data table according to the acquired service.
It can be understood that, for any basic index in the data table, the service is configured to obtain values of all dimensions of the basic index in the data table, and after the data table is filtered, the dimensions of the basic index obtained by the service are the remaining dimensions after the data table is filtered.
On the basis of the foregoing embodiments, as an optional embodiment, the obtaining a service index then further includes:
and formatting the service index according to a preset rule, and outputting the service index after formatting to the terminal.
Specifically, the formatting process may be a process of adding a unit to the service indicator, adding a preamble, and the like.
Fig. 2 is a flowchart of a service index query method according to another embodiment of the present invention, as shown in fig. 2, including:
s201, for any one service index, determining each data table where all basic indexes of the service index are located, and configuring a sub-service for each data table in each data table, wherein the sub-service is used for acquiring all basic indexes of the service index in the corresponding data table;
s202, counting all sub-services configured for any data table, and integrating all sub-services into one service to obtain a corresponding relation between a business index and the service and a corresponding relation between the service and the data table;
s203, configuring a statistical rule of the service index;
s204, receiving a query request sent by a terminal, wherein the query request is used for querying at least one service index;
s205, judging whether the terminal has the authority of inquiring the service index; if not, informing the terminal that the inquiry authority is unavailable, and finishing the inquiry; if so, filtering the query request according to the authority of the terminal to obtain the query request conforming to the terminal authority;
s206, comparing the dimensionality stored in the data table with the dimensionality to be inquired in the inquiry request, and deleting the dimensionality which is not stored in the data table in the inquiry request to obtain a new inquiry request;
s207, filtering the data table according to the new query request, so that the filtered data table only contains the dimensionality relevant to the new query request;
s208, determining sub-services corresponding to the business indexes from the obtained services, and obtaining all basic indexes of the business indexes from the filtered data table according to the sub-services;
s209, calculating the obtained basic indexes according to the statistical rules configured by the service indexes to obtain the service indexes;
s210, formatting the service index according to a preset rule, and outputting the service index after formatting to a terminal.
Fig. 3 is a schematic structural diagram of a service index querying device according to an embodiment of the present invention, and as shown in fig. 3, the service index querying device includes: a request receiving module 301, a service obtaining module 302 and an operation module 303, wherein:
a request receiving module 301, configured to receive an inquiry request sent by a terminal, where the inquiry request is used to inquire at least one service indicator.
It should be noted that, in the embodiment of the present invention, an inquiry request sent by a terminal is first received, where the inquiry request is used to inquire at least one service index, that is, the embodiment of the present invention can support a situation of inquiring multiple service indexes at a time. Taking the house property trade field as an example, the service index can be the over-home time limit, the loan time limit and the like.
A service obtaining module 302, configured to obtain, for any one of the service indicators to be queried, at least one service corresponding to the service indicator.
It should be noted that each service (service) in the embodiment of the present invention corresponds to and only one data table, and is configured to obtain all basic indexes of the at least one service index in the corresponding data table. For example, there are two data tables, which are data table 1 and data table 2, respectively, basic index 1 and basic index 2 are recorded in data table 1, basic index 3 and basic index 4 are recorded in data table 2, if the basic index of business index 1 is basic index 1 and basic index 3, and the basic index of business index 2 is basic index 2 and basic index 4, two services, service 1 and service 2, need to be constructed, where service 1 corresponds to data table 1 and is used to obtain basic index 1 and basic index 3, and service 2 corresponds to data table 2 and is used to obtain basic index 2 and basic index 4. Obviously, if the query request requires query of the service index 1, service 1 and service 2 corresponding to the service index corresponding to 1 need to be acquired. Therefore, the number of the services corresponding to the business index is not unique in the embodiment of the invention, and the specific number is related to the basic index of the business index which is dispersed in several data tables.
And the operation module 303 is configured to acquire all basic indexes of the service index from a data table according to the acquired service, and perform operation on the acquired basic indexes according to a statistical rule configured by the service index to acquire the service index.
It should be noted that after all basic indexes of the service indexes are obtained, a statistical rule needs to be configured according to the service indexes for calculation, taking overage as an example, overage is calculated by a quotient of total time of overage time of each overage house source in a certain time and total single amount of all overage houses in the time, and this calculation process is a statistical rule. It will be appreciated that the statistical rules of embodiments of the present invention may be rules that are simple to implement using addition, subtraction, multiplication, and division, or may be logical operations involving high-level operation notations such as weighted sums, sums of squares, and the like.
The service index query device provided in the embodiment of the present invention specifically executes the flow of the query method embodiment of each service index, and please refer to the content of the query method embodiment of each service index in detail, which is not described herein again. The service index query device provided by the embodiment of the invention constructs the service corresponding to each data table by determining the data table where each basic index of the service index is located on the premise that the basic index of the service index is stored in the data table in advance, and the service is used for acquiring all basic indexes of at least one service index in the corresponding data table, thereby realizing the purpose of simultaneously querying a plurality of service indexes and improving the query efficiency of the service index.
Fig. 4 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device may include: a processor (processor)410, a communication Interface 420, a memory (memory)430 and a communication bus 440, wherein the processor 410, the communication Interface 420 and the memory 430 are communicated with each other via the communication bus 440. The processor 410 may invoke a computer program stored on the memory 430 and operable on the processor 410 to perform the service indicator query method provided by the above embodiments, including, for example: receiving an inquiry request sent by a terminal, wherein the inquiry request is used for inquiring at least one service index; for any one of the business indexes to be inquired, acquiring at least one service corresponding to the business index; acquiring all basic indexes of the business indexes from a data table according to the acquired service, and calculating the acquired basic indexes according to a statistical rule configured by the business indexes to acquire the business indexes; wherein at least one basic index is stored in the data table; each service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table.
In addition, the logic instructions in the memory 430 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform the service index query method provided in the foregoing embodiments when executed by a processor, for example, the method includes: receiving an inquiry request sent by a terminal, wherein the inquiry request is used for inquiring at least one service index; for any one of the business indexes to be inquired, acquiring at least one service corresponding to the business index; acquiring all basic indexes of the service indexes from a data table according to the acquired service, and calculating the acquired basic indexes according to a statistical rule configured by the service indexes to acquire the service indexes; wherein at least one basic index is stored in the data table; the service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for querying a service index includes:
receiving an inquiry request sent by a terminal, wherein the inquiry request is used for inquiring at least one service index;
for any one of the business indexes to be inquired, acquiring at least one service corresponding to the business index;
acquiring all basic indexes of the business indexes from a data table according to the acquired service, and calculating the acquired basic indexes according to a statistical rule configured by the business indexes to acquire the business indexes;
wherein at least one basic index is stored in the data table; the service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table.
2. The method for querying a service index according to claim 1, wherein the obtaining at least one service corresponding to the service index further comprises:
and judging whether the terminal has the authority for inquiring the service index, and if so, filtering the inquiry request according to the authority of the terminal to obtain the inquiry request conforming to the authority of the terminal.
3. The method for querying a service index according to claim 1, wherein the receiving the query request sent by the terminal further comprises:
for any one service index, determining each data table where the basic index of the service index is located, and configuring a sub-service for at least one data table in each data table, where the sub-service is used to obtain all basic indexes of the service index in the corresponding data table;
for any data table, counting all the sub-services configured for the data table, and integrating all the sub-services into one service to obtain the corresponding relation between the service index and the service and the corresponding relation between the service and the data table.
4. The method for querying a service index according to claim 3, wherein the obtaining of the basic index of the service index from a data table according to the obtained service specifically includes:
and determining sub-services corresponding to the business indexes from the obtained services, and obtaining all basic indexes of the business indexes from a data table according to the sub-services.
5. The method for querying a service index according to claim 1, wherein a value of at least one basic index in at least one dimension is stored in the data table; the query request is specifically used for querying the value of at least one service index in at least one dimension;
correspondingly, the obtaining at least one service corresponding to the service index further includes:
comparing the dimensionality stored in the data table with the dimensionality to be queried in the query request, and deleting the dimensionality which is not stored in the data table in the query request to obtain a new query request.
6. The method for querying business index according to claim 5, wherein the obtaining all basic indexes of the business index from a data table according to the obtained service further comprises:
filtering the data table according to the new query request, so that the filtered data table only contains the dimensionality relevant to the new query request;
correspondingly, the step of obtaining all basic indexes of the service indexes from a data table according to the obtained service specifically includes:
and acquiring the basic index of the dimensionality relevant to the new query request from the filtered data table according to the acquired service.
7. The method for querying a service index of claim 1, wherein the obtaining a service index further comprises:
and formatting the service index according to a preset rule, and outputting the service index after formatting to the terminal.
8. The method of claim 1, wherein the computer language used for configuring the statistical rules of the business metrics comprises: one of php language, java language, go language and python language.
9. An apparatus for querying a service index, comprising:
the device comprises a request receiving module, a service index acquiring module and a service index acquiring module, wherein the request receiving module is used for receiving a query request sent by a terminal, and the query request is used for querying at least one service index;
the service acquisition module is used for acquiring at least one service corresponding to the service index for any one service index to be inquired;
the operation module is used for acquiring all basic indexes of the service indexes from a data table according to the acquired service, and operating the acquired basic indexes according to a statistical rule configured by the service indexes to acquire the service indexes;
wherein at least one basic index is stored in the data table; the service corresponds to and only one data table and is used for acquiring all basic indexes of the at least one service index in the corresponding data table.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for querying a business indicator according to any one of claims 1 to 8 when executing the program.
CN201911127921.3A 2019-11-18 2019-11-18 Service index query method and device Pending CN111125092A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911127921.3A CN111125092A (en) 2019-11-18 2019-11-18 Service index query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911127921.3A CN111125092A (en) 2019-11-18 2019-11-18 Service index query method and device

Publications (1)

Publication Number Publication Date
CN111125092A true CN111125092A (en) 2020-05-08

Family

ID=70495995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911127921.3A Pending CN111125092A (en) 2019-11-18 2019-11-18 Service index query method and device

Country Status (1)

Country Link
CN (1) CN111125092A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347144A (en) * 2021-01-04 2021-02-09 树根互联技术有限公司 Service index query method and device and server
CN112860709A (en) * 2021-03-17 2021-05-28 网易(杭州)网络有限公司 Service index query method, device, equipment and storage medium
CN113422796A (en) * 2021-05-06 2021-09-21 北京沃东天骏信息技术有限公司 Information processing method and device and storage medium
CN113609283A (en) * 2021-07-28 2021-11-05 浙江惠瀜网络科技有限公司 Data acquisition method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847146A (en) * 2009-03-27 2010-09-29 华为技术有限公司 Searching method, system and searching server
CN106484378A (en) * 2015-08-28 2017-03-08 阿里巴巴集团控股有限公司 Data processing method and device that a kind of nothing is landed
CN108681589A (en) * 2018-05-15 2018-10-19 口碑(上海)信息技术有限公司 Structured query language instruction generation method based on index system and device
CN109189799A (en) * 2018-08-14 2019-01-11 中国平安人寿保险股份有限公司 Business datum querying method, device, computer equipment and storage medium
CN109657128A (en) * 2018-12-20 2019-04-19 北京小米移动软件有限公司 Data query method, apparatus and storage medium
CN109828993A (en) * 2017-08-31 2019-05-31 北京国双科技有限公司 A kind of querying method and device of statistical data
CN110413634A (en) * 2019-06-27 2019-11-05 北京奇艺世纪科技有限公司 Data query method, system, device and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101847146A (en) * 2009-03-27 2010-09-29 华为技术有限公司 Searching method, system and searching server
CN106484378A (en) * 2015-08-28 2017-03-08 阿里巴巴集团控股有限公司 Data processing method and device that a kind of nothing is landed
CN109828993A (en) * 2017-08-31 2019-05-31 北京国双科技有限公司 A kind of querying method and device of statistical data
CN108681589A (en) * 2018-05-15 2018-10-19 口碑(上海)信息技术有限公司 Structured query language instruction generation method based on index system and device
CN109189799A (en) * 2018-08-14 2019-01-11 中国平安人寿保险股份有限公司 Business datum querying method, device, computer equipment and storage medium
CN109657128A (en) * 2018-12-20 2019-04-19 北京小米移动软件有限公司 Data query method, apparatus and storage medium
CN110413634A (en) * 2019-06-27 2019-11-05 北京奇艺世纪科技有限公司 Data query method, system, device and computer readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347144A (en) * 2021-01-04 2021-02-09 树根互联技术有限公司 Service index query method and device and server
CN112347144B (en) * 2021-01-04 2021-05-07 树根互联技术有限公司 Service index query method and device and server
CN112860709A (en) * 2021-03-17 2021-05-28 网易(杭州)网络有限公司 Service index query method, device, equipment and storage medium
CN113422796A (en) * 2021-05-06 2021-09-21 北京沃东天骏信息技术有限公司 Information processing method and device and storage medium
CN113609283A (en) * 2021-07-28 2021-11-05 浙江惠瀜网络科技有限公司 Data acquisition method and system

Similar Documents

Publication Publication Date Title
CN111125092A (en) Service index query method and device
CN111507638B (en) Risk information output and risk information construction method and device
CN110413634B (en) Data query method, system, device and computer readable storage medium
CN109597974B (en) Report generation method and device
CN106462583A (en) Systems and methods for rapid data analysis
CN110020025B (en) Data processing method and device
CN110046235B (en) Knowledge base assessment method, device and equipment
CN106934708B (en) Event recording method and device
CN109300055B (en) Continuous insurance profit and loss query method, device, equipment and readable storage medium
CN110690987A (en) Account information management method, device and equipment
CN115809265A (en) Risk customer screening method and device based on robot flow automation
CN115145587A (en) Product parameter checking method and device, electronic equipment and storage medium
CN113656652A (en) Method, device and equipment for detecting medical insurance violation and storage medium
CN111625711A (en) New house source push processing method and device, electronic equipment and storage medium
CN114757768A (en) Account management method and related equipment
CN112199393B (en) Data table generation method, device, equipment and storage medium based on cross-table query
CN110597572A (en) Service calling relation analysis method and computer system
US11494746B1 (en) Machine learning system, method, and computer program for making payment related customer predictions using remotely sourced data
CN115082119B (en) Data feedback method, device, electronic equipment, storage medium and program product
CN111738829B (en) Method and system for acquiring regional differential interest rate
CN117290409A (en) Method and device for generating rebate document, terminal equipment and storage medium
JP2009199201A (en) Credit information analysis server and its method
CN115619568A (en) Data processing method and device, electronic equipment and computer readable medium
CN116244365A (en) Method and device for data aggregation, electronic equipment and storage medium
CN117010902A (en) Bank customer payment method, 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