CN111400313A - Method and device for processing request - Google Patents

Method and device for processing request Download PDF

Info

Publication number
CN111400313A
CN111400313A CN202010124659.3A CN202010124659A CN111400313A CN 111400313 A CN111400313 A CN 111400313A CN 202010124659 A CN202010124659 A CN 202010124659A CN 111400313 A CN111400313 A CN 111400313A
Authority
CN
China
Prior art keywords
calculation
result
service
dimension
algorithm
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
CN202010124659.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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202010124659.3A priority Critical patent/CN111400313A/en
Publication of CN111400313A publication Critical patent/CN111400313A/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/2477Temporal data queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • 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/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for processing a request, and relates to the technical field of computers. One embodiment of the method comprises: receiving and analyzing a service processing request to obtain service data and a service scene; matching at least one corresponding calculation dimension according to the service scene, and accordingly respectively determining at least one algorithm implementation member corresponding to the at least one calculation dimension; and calculating the service data by adopting the at least one algorithm realization component, and returning a calculation result. The implementation method can solve the technical problems of poor expandability, high code development cost and difficult maintenance.

Description

Method and device for processing request
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a request.
Background
Generally, different service scenarios correspond to different computational dimensions, the current processing mode is to enumerate all service scenarios, write processing branches one by one, enumerate and calculate each computational dimension one by one in each service scenario, and then compare and optimize or superpose the computation results of each dimension.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the hard coding is more, once a service scene is newly added or the calculation dimensionality is modified, the code needs to be modified, the modified code amount is larger, a new version needs to be released after modification, and the expandability is poor; all service scenes and calculation dimensions need to be enumerated and written in codes, so that the codes are complex and are not easy to maintain; the configurability of the business scenario and the computational dimension cannot be achieved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing a request, so as to solve the technical problems of poor scalability, high code development cost, and difficult maintenance.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of processing a request, including:
receiving and analyzing a service processing request to obtain service data and a service scene;
matching at least one corresponding calculation dimension according to a service scene, and accordingly respectively determining at least one algorithm implementation member corresponding to the at least one calculation dimension;
and calculating the service data by adopting the at least one algorithm realization component, and returning a calculation result.
Optionally, before receiving and parsing the service processing request, the method further includes:
at least one calculation dimension corresponding to each service scene is configured in advance.
Optionally, before receiving and parsing the service processing request, the method further includes: rule attributes of each calculation dimension are configured in advance.
Optionally, before receiving and parsing the service processing request, the method further includes:
and aiming at each calculation dimension, creating an algorithm realization component corresponding to the calculation dimension, and putting the algorithm realization component into a component library.
Optionally, the calculating the service data by using the at least one algorithm implementation component includes:
calculating the service data by adopting the at least one algorithm realization component to obtain at least one temporary result;
and calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result.
Optionally, calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result, including:
dividing the at least one temporary result into at least one result sublist according to rule attributes of the at least one computational dimension; wherein a rule attribute corresponds to a result sublist;
respectively calculating temporary results in the at least one result sub-list based on the attribute rule corresponding to the at least one result sub-list, so as to respectively obtain the calculation results corresponding to the at least one result sub-list;
and screening out the maximum value from each calculation result corresponding to the at least one result sublist to serve as a final calculation result.
Optionally, the rule attribute comprises an optimization, an overlay, or a combination.
In addition, according to another aspect of the embodiments of the present invention, there is provided an apparatus for processing a request, including:
the analysis module is used for receiving and analyzing the service processing request to obtain service data and a service scene;
the determining module is used for matching at least one corresponding calculation dimension according to the service scene so as to respectively determine at least one algorithm implementation member corresponding to the at least one calculation dimension;
and the calculation module is used for calculating the service data by adopting the at least one algorithm realization component and returning a calculation result.
Optionally, the system further comprises a configuration module, configured to:
before receiving and analyzing the service processing request, at least one calculation dimension corresponding to each service scene is configured in advance.
Optionally, the configuration module is further configured to: and pre-configuring the rule attribute of each calculation dimension before receiving and analyzing the service processing request.
Optionally, the configuration module is further configured to:
before a service processing request is received and analyzed, an algorithm implementation component corresponding to each calculation dimension is created, and the algorithm implementation component is placed into a component library.
Optionally, the computing module is further configured to:
calculating the service data by adopting the at least one algorithm realization component to obtain at least one temporary result;
and calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result.
Optionally, the computing module is further configured to:
dividing the at least one temporary result into at least one result sublist according to rule attributes of the at least one computational dimension; wherein a rule attribute corresponds to a result sublist;
respectively calculating temporary results in the at least one result sub-list based on the attribute rule corresponding to the at least one result sub-list, so as to respectively obtain the calculation results corresponding to the at least one result sub-list;
and screening out the maximum value from each calculation result corresponding to the at least one result sublist to serve as a final calculation result.
Optionally, the rule attribute comprises an optimization, an overlay, or a combination.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments described above.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable medium, on which a computer program is stored, which when executed by a processor implements the method of any of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: the technical means that at least one corresponding calculation dimension is matched according to the service scene so as to determine at least one algorithm implementation component, and the service data is calculated by the at least one algorithm implementation component is adopted, so that the technical problems of poor expandability, high code development cost and difficulty in maintenance in the prior art are solved. The embodiment of the invention realizes the flexible configuration of the calculation dimension under each service scene by using the configurable mechanism driven by the service scene, the configuration result takes effect in real time, and the code version does not need to be updated, thereby not only improving the expandability, but also reducing the code development cost and being convenient for maintenance. When the calculation dimension is newly added, only the algorithm realization component of the newly added calculation dimension needs to be independently developed and integrated into the existing component library in a plugging mode.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with specific embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of processing a request according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a main flow of a method of processing a request according to a referential embodiment of the present invention;
FIG. 3 is a schematic diagram of the main flow of a method of processing a request according to yet another referenceable embodiment of the present invention;
FIG. 4 is a schematic diagram of the main modules of an apparatus for processing requests according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use with a terminal device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method of processing a request according to an embodiment of the present invention. As an embodiment of the present invention, as shown in fig. 1, the method for processing a request may include:
step 101, receiving and analyzing a service processing request to obtain service data and a service scene.
Firstly, a service processing request is received and analyzed, so that service data and a service scene are obtained. Since different service scenarios correspond to different computational dimensions, the computational dimensions corresponding to the service scenarios can be further determined in step 102 by obtaining the service scenarios through parsing.
Optionally, before step 101, the method further includes: at least one calculation dimension corresponding to each service scene is configured in advance, and the rule attribute of each calculation dimension is configured. It should be noted that, a service operator may configure one or more computation dimensions in each service scenario according to service requirements, and configure rule attributes (such as optimal, superimposed, or combined) for each computation dimension.
For example, in the field of real precious metals, the following calculated dimensions may be included:
01-weight benefits
Preference for 02-valence
03-redeem offers
04-appointment offers
05-combination offers
06-transaction type offers
07-transaction channel offers
08-amount offer
09-customer level offers
10-customer star offers
11-customer noble Metal rating benefits
12-Special offers
For example, in the field of precious metal material, the following service scenarios may be included:
0901-selling in substance
0902-selling to be extracted
0903-exchange account money for sale
0904-exchange the account money for sale
0905 exchanging deposited money for sale
0906 the deposited money is exchanged for sale
0907 exchanging deposited money for sale
0908-exchanging deposited money for sale
0909 it is exchanged for exchange for gold
0910-exchange gold to be extracted for sale
0911-Wenxin noble metals selling
0912-exchange for micro gold coin
0913-sales extract to be extracted
0914-fixed bid
0915-fixed-investment redemption
0916-physical distribution and sale
0919-buyback of material
0920-buyback to be extracted
Aiming at different service scenes, service operators can flexibly set different calculation dimensions according to service requirements so as to achieve the purposes of setting different service scenes and dynamically adjusting the same service scene.
Such as:
0901-selling in real objects: 09-customer level offers
10-customer star offers
12-Special offers
05-product combination offer
0902-sell to be extracted: 10-customer star offers
01-transaction weight benefits
04-appointment offers
0916-delivery and sale of the material: 05-product combination offer
01-transaction weight benefits
0905-stocked and exchanged for physical sale: 01-transaction weight benefits
03-redeem offers
The service scene parameter table obtained by configuration is shown as the following table:
Figure BDA0002394051710000071
Figure BDA0002394051710000081
optionally, the service data includes user information and product data, and step 101 may specifically include: and receiving the service processing request, and analyzing the service processing request to obtain user information such as a user number, a user star level and a user grade, product data such as a product number, product data, product weight and product amount, and a service scene number, so as to calculate service data under each service scene in a differentiated manner in the subsequent step.
Step 102, matching at least one corresponding calculation dimension according to the service scene, thereby respectively determining at least one algorithm implementation member corresponding to the at least one calculation dimension.
In this step, one or more corresponding calculation dimensions are matched according to the service scenario analyzed in step 101, so as to respectively determine an algorithm implementation component corresponding to each calculation dimension. Taking a physical sale service scene as an example, when a physical sale transaction is subjected to preferential treatment, firstly, a service scene parameter table is inquired according to a number 0901 corresponding to the service scene, and a calculation dimension corresponding to the service scene is obtained: 09-customer level privilege, 10-customer star privilege, special privilege and product combination privilege.
Optionally, before step 101, the method further includes: and aiming at each calculation dimension, creating an algorithm realization component corresponding to the calculation dimension, and putting the algorithm realization component into a component library. In the embodiment of the invention, each calculation dimension corresponds to an independent algorithm implementation component, and the algorithm implementation components are independent from each other and do not influence each other.
Moreover, the calculation dimension numbers correspond to the algorithm realization component numbers one to one and are stored in the component library table as follows:
Figure BDA0002394051710000091
and 103, calculating the service data by adopting the at least one algorithm realization component, and returning a calculation result.
In this step, the user information and the product data obtained in step 101 are calculated by the at least one algorithm implementation component, and then the calculation result is returned. The embodiment of the invention encapsulates the calculation algorithm of each calculation dimension into an atomic component, then configures the atomic component into a component library table, executes calculation according to a single component algorithm when a calling request is matched with a corresponding component, and then performs summary rule calculation according to the rule attribute of each component. Thus, once a business scenario is determined, the computational dimensions will also be clear. When a service is newly added with a service scene, only the corresponding relation between the service scene and the calculation dimension needs to be configured, so that a solution for flexibly configuring the calculation dimension for a fixed service scene is provided for service operators, the code development cost is saved, and the management, the expansion and the maintenance are facilitated.
Optionally, the calculating the service data by using the at least one algorithm implementation component includes: calculating the service data by adopting the at least one algorithm realization component to obtain at least one temporary result; and calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result. Since the business scenario corresponds to one or more computational dimensions, the business scenario corresponds to one or more algorithmic implementation components, accordingly. Firstly, adopting each algorithm to realize that components respectively calculate service data to respectively obtain temporary results; these provisional results are then computed based on the rule attributes (which may be optimal, superimposed, or combined, etc.) of the respective computed dimensions, resulting in the final computed result.
Optionally, calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result, including: dividing the at least one temporary result into at least one result sub-list according to the rule attribute of the at least one computational dimension; wherein a rule attribute corresponds to a result sublist; respectively calculating temporary results in the at least one result sub-list based on the attribute rule corresponding to the at least one result sub-list, so as to respectively obtain the calculation results corresponding to the at least one result sub-list; and screening out the maximum value from each calculation result corresponding to the at least one result sublist to serve as a final calculation result. Taking optimization and superposition as examples, dividing temporary results corresponding to each algorithm realization component into an optimal sublist and a superposition sublist; then, screening out an optimal calculation result from the optimal sub-list, traversing the superposition sub-list, and summing temporary results in the list to obtain a calculation result; and finally, comparing the calculation result of the optimal sub-list with the calculation result of the superposition sub-list, and taking the maximum value of the optimal sub-list and the superposition sub-list as the final calculation result.
According to the various embodiments, it can be seen that the technical means that at least one algorithm implementation component is determined by matching at least one corresponding computation dimension according to a service scene, and the component is implemented by using at least one algorithm to compute service data solves the technical problems of poor expandability, high code development cost and difficulty in maintenance in the prior art. The embodiment of the invention realizes the flexible configuration of the calculation dimension under each service scene by using the configurable mechanism driven by the service scene, the configuration result takes effect in real time, the code version does not need to be updated, the expandability is improved, the code development cost is reduced, and the maintenance is convenient. When the calculation dimension is newly added, only the algorithm realization component of the newly added calculation dimension needs to be independently developed and integrated into the existing component library in a plugging mode.
Fig. 2 is a schematic diagram of a main flow of a method of processing a request according to a referential embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 2, the method for processing a request may include:
step 201, at least one calculation dimension corresponding to each service scene is configured in advance, and a rule attribute of each calculation dimension is configured.
Service operators can configure one or more computation dimensions under each service scene according to service requirements, and configure rule attributes (such as optimal, overlapping or combining) for each computation dimension. Once a newly established service scene exists, only the corresponding calculation dimension needs to be configured.
Step 202, aiming at each calculation dimension, creating an algorithm realization component corresponding to the calculation dimension, and putting the algorithm realization component into a component library.
In the embodiment of the invention, each calculation dimension corresponds to an independent algorithm implementation component, and the algorithm implementation components are independent and do not influence each other. And the calculation dimension number corresponds to the algorithm realization component number one to one and is stored in the component library table.
Step 203, receiving and analyzing the service processing request to obtain service data and a service scene.
Optionally, the service data includes user information and product data, and step 101 may specifically include: and receiving the service processing request, and analyzing the service processing request to obtain user information such as a user number, a user star level, a user grade and the like, product data such as a product number, product data, product weight, product amount and the like, and a service scene number, so that the service data under each service scene can be calculated in a differentiated manner in the subsequent step.
And 204, matching at least one corresponding calculation dimension according to the service scene, and accordingly respectively determining at least one algorithm implementation member corresponding to the at least one calculation dimension.
And matching one or more corresponding calculation dimensions according to the service scene analyzed in the step 203, so as to respectively determine an algorithm implementation member corresponding to each calculation dimension. Taking a physical sale service scene as an example, when a physical sale transaction is subjected to preferential treatment, firstly, a service scene parameter table is inquired according to a number 0901 corresponding to the service scene, and the calculation dimensionality corresponding to the service scene is obtained: 09-customer level privilege, 10-customer star privilege, special privilege and product combination privilege.
Step 205, calculating the service data by using the at least one algorithm implementation component to obtain at least one temporary result.
Step 206, calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result.
Step 207, the calculation result is returned.
According to the embodiment of the invention, by configuring the calculation dimensions and the rule attributes corresponding to each service scene, for example, which calculation dimensions can be superposed and which calculation dimensions can be optimized from multiple dimensions. Meanwhile, the relationship of preferential dimensionality corresponding to the service scene is established and solidified in a configuration table mode. Once a newly established service scene exists, only corresponding calculation dimensionality needs to be configured and a specific algorithm implementation component needs to be added, the original code basically does not need to be changed, a new version does not need to be released, and the code development cost is greatly saved. Moreover, the adjustment of the calculation dimensions of different business scenes can be effective in real time without changing codes.
In addition, in one embodiment of the present invention, the detailed implementation of the method for processing a request is described in detail above, and therefore the repeated description is not repeated here.
Fig. 3 is a schematic diagram of a main flow of a method of processing a request according to yet another referential embodiment of the present invention. As another embodiment of the present invention, as shown in fig. 3, the method for processing a request may include:
step 301, at least one calculation dimension corresponding to each service scenario is configured in advance, and a rule attribute of each calculation dimension is configured.
Step 302, aiming at each calculation dimension, creating an algorithm realization component corresponding to the calculation dimension, and putting the algorithm realization component into a component library.
Step 303, receiving and analyzing the service processing request to obtain service data and service scene
Step 304, matching at least one corresponding calculation dimension according to the service scene, thereby respectively determining at least one algorithm implementation member corresponding to the at least one calculation dimension.
Step 305, calculating the service data by using the at least one algorithm implementation component to obtain at least one temporary result.
Step 306, dividing the at least one temporary result into at least one result sublist according to the rule attribute of the at least one calculation dimension.
Wherein a rule attribute corresponds to a result sublist. Taking optimization and superposition as examples, the temporary results corresponding to each algorithm implementation component are divided into an "optimal" sublist and a "superposition" sublist.
Step 307, respectively calculating the temporary results in the at least one result sub-list based on the attribute rule corresponding to the at least one result sub-list, so as to respectively obtain the calculation results corresponding to the at least one result sub-list.
And screening an optimal calculation result from the optimal sub-list, traversing the superposition sub-list, and summing temporary results in the list to obtain a calculation result.
And 308, screening out the maximum value from each calculation result corresponding to the at least one result sublist to serve as a final calculation result.
And comparing the calculation result of the optimal sublist with the calculation result of the superposition sublist, and taking the maximum value of the optimal sublist and the superposition sublist as the final calculation result.
Step 309, return the final calculation result.
In addition, in one embodiment of the present invention, the detailed implementation of the method for processing a request is described in detail above, and therefore the repeated description is not repeated here.
Fig. 4 is a schematic diagram of main modules of an apparatus for processing a request according to an embodiment of the present invention, and as shown in fig. 4, the apparatus 400 for processing a request includes a parsing module 401, a determining module 402, and a calculating module 403; the analysis module 401 is configured to receive and analyze a service processing request to obtain service data and a service scene; the determining module 402 is configured to match at least one corresponding computational dimension according to a service scenario, so as to respectively determine at least one algorithm implementation component corresponding to the at least one computational dimension; the calculation module 403 is configured to calculate the service data by using the at least one algorithm implementation component, and return a calculation result.
Optionally, the system further comprises a configuration module, configured to:
before receiving and analyzing the service processing request, at least one calculation dimension corresponding to each service scene is configured in advance.
Optionally, the configuration module is further configured to: and pre-configuring the rule attribute of each calculation dimension before receiving and analyzing the service processing request.
Optionally, the configuration module is further configured to:
before a service processing request is received and analyzed, an algorithm implementation component corresponding to each calculation dimension is created, and the algorithm implementation component is placed into a component library.
Optionally, the computing module 403 is further configured to:
calculating the service data by adopting the at least one algorithm realization component to obtain at least one temporary result;
and calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result.
Optionally, the computing module 403 is further configured to:
dividing the at least one temporary result into at least one result sublist according to rule attributes of the at least one computational dimension; wherein a rule attribute corresponds to a result sublist;
respectively calculating temporary results in the at least one result sub-list based on the attribute rule corresponding to the at least one result sub-list, so as to respectively obtain the calculation results corresponding to the at least one result sub-list;
and screening out the maximum value from each calculation result corresponding to the at least one result sublist to serve as a final calculation result.
Optionally, the rule attribute comprises an optimization, an overlay, or a combination.
According to the various embodiments, it can be seen that the technical means that at least one algorithm implementation component is determined by matching at least one corresponding computation dimension according to a service scene, and the component is implemented by using at least one algorithm to compute service data solves the technical problems of poor expandability, high code development cost and difficulty in maintenance in the prior art. The embodiment of the invention realizes the flexible configuration of the calculation dimension under each service scene by using the configurable mechanism driven by the service scene, the configuration result takes effect in real time, the code version does not need to be updated, the expandability is improved, the code development cost is reduced, and the maintenance is convenient. When the calculation dimension is newly added, only the algorithm realization component of the newly added calculation dimension needs to be independently developed and integrated into the existing component library in a plugging mode.
It should be noted that, in the implementation of the apparatus for processing a request according to the present invention, the above method for processing a request has been described in detail, and therefore, the repeated content is not described again.
Fig. 5 illustrates an exemplary system architecture 500 to which the method of processing a request or the apparatus for processing a request of an embodiment of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The background management server may analyze and otherwise process the received data such as the item information query request, and feed back a processing result (for example, target push information, item information — just an example) to the terminal device.
It should be noted that the method for processing the request provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for processing the request is generally disposed in the server 505. The method for processing the request provided by the embodiment of the present invention may also be executed by the terminal devices 501, 502, and 503, and accordingly, the apparatus for processing the request may be disposed in the terminal devices 501, 502, and 503.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 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. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
To the I/O interface 605, AN input section 606 including a keyboard, a mouse, and the like, AN output section 607 including a network interface card such as a Cathode Ray Tube (CRT), a liquid crystal display (L CD), and the like, a speaker, and the like, a storage section 608 including a hard disk, and the like, and a communication section 609 including a network interface card such as a L AN card, a modem, and the like, the communication section 609 performs communication processing via a network such as AN internet, a drive 610 is also connected to the I/O interface 605 as necessary, a removable medium 611 such as a magnetic disk, AN optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted into the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer 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 of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the present invention, a computer 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. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer programs according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a parsing module, a determining module, and a calculating module, where the names of the modules do not in some cases constitute a limitation on the modules themselves.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving and analyzing a service processing request to obtain service data and a service scene; matching at least one corresponding calculation dimension according to the service scene, and accordingly respectively determining at least one algorithm implementation component corresponding to the at least one calculation dimension; and calculating the service data by adopting the at least one algorithm realization component, and returning a calculation result.
According to the technical scheme of the embodiment of the invention, at least one corresponding calculation dimension is matched according to the service scene, so that at least one algorithm implementation component is determined, and at least one algorithm implementation component is adopted to calculate the service data, so that the technical problems of poor expandability, high code development cost and difficulty in maintenance in the prior art are solved. The embodiment of the invention realizes the flexible configuration of the calculation dimension under each service scene by using the configurable mechanism driven by the service scene, the configuration result takes effect in real time, and the code version does not need to be updated, thereby not only improving the expandability, but also reducing the code development cost and being convenient for maintenance. When the calculation dimension is newly added, only the algorithm realization component of the newly added calculation dimension needs to be independently developed and integrated into the existing component library in a plugging mode.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of processing a request, comprising:
receiving and analyzing a service processing request to obtain service data and a service scene;
matching at least one corresponding calculation dimension according to the service scene, and accordingly respectively determining at least one algorithm implementation member corresponding to the at least one calculation dimension;
and calculating the service data by adopting the at least one algorithm realization component, and returning a calculation result.
2. The method of claim 1, wherein prior to receiving and parsing the service processing request, further comprising: at least one calculation dimension corresponding to each service scene is configured in advance.
3. The method of claim 1, wherein prior to receiving and parsing the service processing request, further comprising: rule attributes of each calculation dimension are configured in advance.
4. The method of claim 2, wherein prior to receiving and parsing the service processing request, further comprising:
and aiming at each calculation dimension, creating an algorithm realization component corresponding to the calculation dimension, and putting the algorithm realization component into a component library.
5. The method of claim 4, wherein computing the traffic data using the at least one algorithm implementation component comprises:
calculating the service data by adopting the at least one algorithm realization component to obtain at least one temporary result;
and calculating the at least one temporary result based on the rule attribute of the at least one calculation dimension to obtain a calculation result.
6. The method of claim 5, wherein computing the at least one provisional result based on the rule attribute of the at least one computational dimension to obtain a computed result comprises:
dividing the at least one temporary result into at least one result sub-list according to the rule attribute of the at least one computational dimension; wherein a rule attribute corresponds to a result sublist;
respectively calculating temporary results in the at least one result sub-list based on the attribute rule corresponding to the at least one result sub-list, so as to respectively obtain the calculation results corresponding to the at least one result sub-list;
and screening out the maximum value from each calculation result corresponding to the at least one result sublist to serve as a final calculation result.
7. The method of claim 3, wherein the rule attribute comprises an optimum, an overlay, or a combination.
8. An apparatus for processing a request, comprising:
the analysis module is used for receiving and analyzing the service processing request to obtain service data and a service scene;
the determining module is used for matching at least one corresponding calculation dimension according to the service scene so as to respectively determine at least one algorithm implementation member corresponding to the at least one calculation dimension;
and the calculation module is used for calculating the service data by adopting the at least one algorithm realization component and returning a calculation result.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010124659.3A 2020-02-27 2020-02-27 Method and device for processing request Pending CN111400313A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010124659.3A CN111400313A (en) 2020-02-27 2020-02-27 Method and device for processing request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010124659.3A CN111400313A (en) 2020-02-27 2020-02-27 Method and device for processing request

Publications (1)

Publication Number Publication Date
CN111400313A true CN111400313A (en) 2020-07-10

Family

ID=71428518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010124659.3A Pending CN111400313A (en) 2020-02-27 2020-02-27 Method and device for processing request

Country Status (1)

Country Link
CN (1) CN111400313A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392093A (en) * 2021-07-09 2021-09-14 中国建设银行股份有限公司 Service processing method and device, electronic equipment and computer readable medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150178625A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Method and apparatus for generating test scenarios for a set of business rules
CN106157138A (en) * 2016-08-31 2016-11-23 中国银行股份有限公司 Group belonging to a kind of bank transaction data determines method and device
CN109445797A (en) * 2018-10-24 2019-03-08 北京奇虎科技有限公司 Handle task executing method and device
CN109656986A (en) * 2018-10-09 2019-04-19 阿里巴巴集团控股有限公司 A kind of householder method that business datum summarizes, device and electronic equipment
CN109741087A (en) * 2018-12-11 2019-05-10 中国联合网络通信集团有限公司 The management method and device of electronic coupons
CN110032582A (en) * 2019-03-07 2019-07-19 阿里巴巴集团控股有限公司 A kind of data processing method, device, equipment and system
CN110288343A (en) * 2019-06-24 2019-09-27 深圳前海微众银行股份有限公司 A kind of method of payment and device
CN110704037A (en) * 2019-08-28 2020-01-17 贵州医渡云技术有限公司 Rule engine implementation method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150178625A1 (en) * 2013-12-23 2015-06-25 International Business Machines Corporation Method and apparatus for generating test scenarios for a set of business rules
CN106157138A (en) * 2016-08-31 2016-11-23 中国银行股份有限公司 Group belonging to a kind of bank transaction data determines method and device
CN109656986A (en) * 2018-10-09 2019-04-19 阿里巴巴集团控股有限公司 A kind of householder method that business datum summarizes, device and electronic equipment
CN109445797A (en) * 2018-10-24 2019-03-08 北京奇虎科技有限公司 Handle task executing method and device
CN109741087A (en) * 2018-12-11 2019-05-10 中国联合网络通信集团有限公司 The management method and device of electronic coupons
CN110032582A (en) * 2019-03-07 2019-07-19 阿里巴巴集团控股有限公司 A kind of data processing method, device, equipment and system
CN110288343A (en) * 2019-06-24 2019-09-27 深圳前海微众银行股份有限公司 A kind of method of payment and device
CN110704037A (en) * 2019-08-28 2020-01-17 贵州医渡云技术有限公司 Rule engine implementation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392093A (en) * 2021-07-09 2021-09-14 中国建设银行股份有限公司 Service processing method and device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN110706093A (en) Accounting processing method and device
CN109150929B (en) Data request processing method and device under high concurrency scene
CN107908662B (en) Method and device for realizing search system
CN111127214A (en) Method and apparatus for portfolio
CN112884405A (en) Inquiry system and scheduling method thereof
CN111881329A (en) Account balance management method and system
CN110070394A (en) Data processing method, system, medium and calculating equipment
CN108932640B (en) Method and device for processing orders
CN110019242A (en) Processing method, device and system for tables of data
CN110223179A (en) The data processing method of fund, device, system, medium
CN110928594A (en) Service development method and platform
CN113190558A (en) Data processing method and system
CN111400313A (en) Method and device for processing request
CN112884181A (en) Quota information processing method and device
CN115495658A (en) Data processing method and device
CN115391343A (en) Bill data processing method and device, electronic equipment and storage medium
CN113485902A (en) Method, device, equipment and computer readable medium for testing service platform
CN112529672A (en) Article information pushing method and device, electronic equipment and computer readable medium
CN110888939A (en) Data management method and device
CN113742564A (en) Target resource pushing method and device
CN111144694A (en) Operation flow management method and device based on contact analysis
CN111161067A (en) Method and device for determining transaction route
CN113283850A (en) Task auditing method, device and system
CN111382954A (en) User rating method and device
CN111127077A (en) Recommendation method and device based on stream computing

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20221010

Address after: 25 Financial Street, Xicheng District, Beijing 100033

Applicant after: CHINA CONSTRUCTION BANK Corp.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.