CN114202326A - Method and device for processing charging data - Google Patents

Method and device for processing charging data Download PDF

Info

Publication number
CN114202326A
CN114202326A CN202111274774.XA CN202111274774A CN114202326A CN 114202326 A CN114202326 A CN 114202326A CN 202111274774 A CN202111274774 A CN 202111274774A CN 114202326 A CN114202326 A CN 114202326A
Authority
CN
China
Prior art keywords
charging
data packet
request data
rule
category
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
CN202111274774.XA
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.)
Beijing Lifangtong Payment Technology Co ltd
Original Assignee
Beijing Lifangtong Payment 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 Beijing Lifangtong Payment Technology Co ltd filed Critical Beijing Lifangtong Payment Technology Co ltd
Priority to CN202111274774.XA priority Critical patent/CN114202326A/en
Publication of CN114202326A publication Critical patent/CN114202326A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/14Payment architectures specially adapted for billing systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a method and a device for processing charging data, wherein the method comprises the following steps: receiving a charging request data packet, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet; generating a corresponding charging item character string according to the target charging category and the charging request data packet; detecting whether the charging item character string contains a charging item value; under the condition that the charging item character string contains the charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result. The charging service can be provided for the corresponding service by acquiring the corresponding charging rule through the charging item value without code development for the service under different transaction scenes.

Description

Method and device for processing charging data
Technical Field
The present invention relates to the field of information technologies, and in particular, to a method and an apparatus for processing charging data.
Background
In the prior art, in transaction scenarios such as payment and finance, commission fees are calculated by combining elements of different dimensions, such as: the merchant number, the issuing bank, the card category, the international and international identification and the like have different elements required by using different payment tools, require a large amount of customized code development work, and have no configurable and expandable general type and flexibility.
Disclosure of Invention
The invention provides a method and a device for processing charging data, which realize services under different transaction scenes, do not need code development, and can provide charging service for corresponding services only by acquiring corresponding charging rules through charging item values.
In a first aspect, an embodiment of the present invention provides a method for processing charging data, where the method includes: receiving a charging request data packet, wherein the charging request data packet comprises charge data;
matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet;
generating a corresponding charging item character string according to the target charging category and the charging request data packet;
detecting whether the charging item character string contains a charging item value; under the condition that the charging item character string is determined to contain the charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule;
and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result.
According to the method for processing charging data provided by the embodiment of the invention, the method further comprises the following steps:
and under the condition that the charging item character string does not contain the charging item value, determining that the charging fails and returning a charging failure message.
According to the method for processing charging data provided by the embodiment of the invention, the charging request data packet further comprises a category field;
the matching the charging request data packet with the predefined charging category to determine the target charging category corresponding to the charging request data packet includes:
and matching the category field in the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet.
According to the charging data processing method provided by the embodiment of the invention, the target charging category comprises a calculation factor rule;
the generating of the corresponding charging item character string according to the target charging category and the charging request data packet includes:
based on the target charging category, searching a corresponding calculation factor sequence and a calculation factor data conversion path in the calculation factor rule; analyzing the charging request data packet according to the calculation factor rule and the calculation factor data conversion path to obtain a charging factor value;
and splicing the charging factor values according to the calculation factor sequence to generate the corresponding charging item character string.
According to the method for processing charging data provided by the embodiment of the present invention, the analyzing the charging request packet according to the calculation factor rule and the calculation factor data conversion path to obtain the charging factor value includes:
executing a calculation factor data conversion path in the calculation factor rule according to the calculation factor rule of the target charging category;
and analyzing the charging request data packet through the calculation factor data conversion path to obtain a charging factor value. According to the method for processing charging data provided by the embodiment of the invention, the charging rule comprises a charging type;
after the corresponding charging rule is obtained, the method further includes:
judging whether the charging type of the charging rule is the charging type corresponding to the charging request data packet;
if yes, calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result;
if not, determining that the charging fails and returning a charging failure message.
According to the method for processing charging data provided by the embodiment of the present invention, the calculating the charge data in the charging request data packet according to the charging rule, generating and returning a calculation result, includes:
executing a charging method corresponding to the charging rule according to the charging rule to calculate the charge data in the charging request data packet and generate a calculation result;
and generating a result response message according to the calculation result and returning the result response message to the service corresponding to the charging request data packet.
In a second aspect, an embodiment of the present invention provides a device for processing charging data, including: the device comprises a receiving module, a matching module, a generating module, a detecting module, a query module and a calculating module. The system comprises a receiving module, a charging module and a charging module, wherein the receiving module is used for receiving a charging request data packet, and the charging request data packet comprises charge data; the matching module is used for matching the charging request data packet with a predefined charging type and determining a target charging type corresponding to the charging request data packet; the generating module is used for generating a corresponding charging item character string according to the target charging category and the charging request data packet; the detection module is used for detecting whether the charging item character string contains a charging item value; the query module is used for querying the charging item value in a preset charging item table under the condition that the charging item character string is determined to contain the charging item value to obtain a corresponding charging rule; and the calculation module is used for calculating the charge data in the charging request data packet according to the charging rule, generating and returning a calculation result.
According to the processing apparatus of charging data provided by the embodiment of the present invention, the apparatus further includes: and the return module is used for determining charging failure and returning a charging failure message under the condition that the charging item character string does not contain the charging item value.
In a third aspect, the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for processing billing data according to any of the above.
In a fourth aspect, an embodiment of the present invention is a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method for processing charging data according to any one of the above items.
The invention provides a processing method and a device of charging data, which are used for receiving a charging request data packet of a service, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the received charging request data packet; generating a corresponding charging item character string by the acquired target charging type and the received charging request data packet; detecting whether the charging item character string contains a charging item value, and inquiring the charging item value in a preset charging item table under the condition that the generated charging item character string contains the charging item value to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result. The charging service can be provided for the corresponding service by acquiring the corresponding charging rule through the charging item value without code development for the service under different transaction scenes.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for 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 flowchart illustrating a method for processing charging data according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a process after obtaining a corresponding charging rule according to an embodiment of the present invention;
fig. 3 is a second schematic flowchart of a method for processing charging data according to an embodiment of the present invention;
fig. 4 is a processing apparatus of charging data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, 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.
Referring to fig. 1, a flowchart of a method for processing charging data according to an embodiment of the present invention is shown, where the method includes:
and 110, receiving a charging request data packet, wherein the charging request data packet comprises the charge data.
In this step, receiving the charging request data packet refers to receiving charging request data packets corresponding to various services in different transaction scenarios.
Correspondingly, the fee data may include the transaction amount, the transaction occurrence amount or the handling fee, and the like.
And 120, matching the charging request data packet with a predefined charging type, and determining a target charging type corresponding to the charging request data packet.
In this step, the charging category includes a set of rule data rows, and each row of rules includes data information such as a key name of a calculation factor, a calculation factor data conversion path, a calculation factor sequence, and a charging factor type.
In an embodiment of the present invention, in a real estate transaction scenario, three charging categories are included: tax, stamp tax, value added tax. The predefined charging category can be tax, stamp tax and value-added tax. And respectively matching the received charging request data packet with three predefined charging categories, and determining which charging category the received charging request data packet is, namely determining a target charging category corresponding to the charging request data packet.
And 130, generating a corresponding charging item character string according to the target charging category and the charging request data packet.
In this step, the character string is a string of characters consisting of numbers, letters, and underlines, and represents the data type of the text. The charge item string refers to a data type that converts the charge item into a string format.
Specifically, taking a house property transaction scenario as an example, if the target charging category is a tax, the corresponding charging item may include a house area and a total house amount; if the target charging type is printing tax, the corresponding charging item can comprise tax amount and proportion tax rate of the tax-receivable voucher; if the target charging category is value-added tax, the corresponding charging items may include value-added amount, value-added tax rate, deduction item amount and deduction coefficient.
140, detecting whether the charging item character string contains a charging item value.
In this step, taking a house property transaction scenario as an example, if the target charging category is a tax, the corresponding charging item may include a house area and a total house amount, and it is determined whether the charging item character string includes a charging item value corresponding to the house area and the total house amount. 150, under the condition that the charging item character string contains the charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule.
In this step, taking a house property transaction scenario as an example, if the target charging category is tax, the charging item may include a house area and a total house money, and the charging item value corresponding to the house area may be 80, 90, or 100. The value of the charging item corresponding to the total house money can be 100 ten thousand, 200 ten thousand or 300 ten thousand. The pre-stored billing item table may include the area of the house, the total amount of the house, the proportional tax rate, the added value tax rate, the deducted item amount, the deduction coefficient, etc.
Correspondingly, the charging item value is inquired in a pre-stored charging item table, so that the charging item value is matched with the charging item in the pre-stored charging item table, and a corresponding charging rule is obtained.
And 160, calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result.
In this step, different charging categories correspond to different charging rules. And calculating the charge data in the charging request data packet according to the charging rule corresponding to the charging type of the received request data packet, wherein the charge data can be one or more of transaction amount, transaction occurrence amount or handling fee.
The invention provides a processing method of charging data, which receives a charging request data packet of a service, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the received charging request data packet; generating a corresponding charging item character string by the acquired target charging type and the received charging request data packet; detecting whether the charging item character string contains a charging item value, and inquiring the charging item value in a preset charging item table under the condition that the generated charging item character string contains the charging item value to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result. The charging service can be provided for the corresponding service by acquiring the corresponding charging rule through the charging item value without code development for the service under different transaction scenes.
Based on any of the above embodiments, the method for processing charging data provided by the embodiment of the present invention further includes:
and under the condition that the charging item character string does not contain the charging item value, determining that the charging fails and returning a charging failure message.
In this step, taking a scenario of house property transaction as an example, if the target charging category is a tax, the corresponding charging item character string may include a house area and a total house amount, if there is no charging item value corresponding to the house area in the charging item character string (the charging item value may be 80, 90, or 100, etc.), and a charging item value corresponding to the total house amount (the charging item value may be 100 ten thousand, 200 ten thousand, or 300 ten thousand, etc.), in this case, it is determined that the charging fails, and a charging failure message is returned to the service corresponding to the received charging request data packet.
Based on any of the above embodiments, the charging request packet further includes a category field, and step 120 specifically includes: and matching the category field in the charging request data packet with the predefined charging category to determine the target charging category corresponding to the charging request data packet.
In this step, when the charging request packet is in a Json packet format received through an http interface, the category field may be a factor _ category field in the Json packet header.
Specifically, the factor _ category field in the Json header is used to match with a predefined charging category, and the charging category corresponding to the received charging request packet is used as the target charging category.
Based on any of the above embodiments, the target charging category includes a calculation factor rule.
In another embodiment of the present invention, the calculation factor data conversion path may be represented by a Json path, and the corresponding Json path is a path language used as Json for determining a position of a part in the Json document.
The step 130 specifically includes the following steps S131 to S133:
s131, based on the target charging category, searching a corresponding calculation factor sequence and a calculation factor data conversion path in the calculation factor rule.
In this step, the target charging category includes calculation factor rules, and each corresponding row of calculation factor rules includes a calculation factor sequence and a calculation factor data conversion path.
And finding out the corresponding calculation factor sequence and the calculation factor data conversion path according to the target charging category.
S132, analyzing the charging request data packet according to the calculation factor rule and the calculation factor data conversion path to obtain a charging factor value.
In the step, the charging request data packet is analyzed by executing JsonPath according to the calculation factor rule in the target charging category to obtain the charging factor value.
And S133, splicing the charging factor values according to the calculation factor sequence to generate a corresponding charging item character string.
In the step, the charging factor values are spliced according to the calculation factor sequence in the target charging category, and the charging item character string is obtained.
Based on any of the above embodiments, the step S132 specifically includes the following steps S1321 to S1322:
s1321, according to the calculation factor rule of the target charging category, executing a calculation factor data conversion path in the calculation factor rule.
In this step, the found calculation factor data conversion path is executed according to the calculation factor rule, and the corresponding calculation factor data conversion path can be represented by JsonPath.
S1322, analyzing the charging request data packet through the calculation factor data conversion path to obtain a charging factor value.
In the step, a data packet in a Json message format is analyzed through a calculation factor data conversion path JsonPath to obtain a charging factor value. Based on any of the above embodiments, the charging rule includes a charging type, and referring to fig. 2, a schematic flow diagram after obtaining a corresponding charging rule provided in the embodiment of the present invention includes:
and 210, judging whether the charging type of the charging rule is the charging type corresponding to the charging request data packet.
In this step, if in the real estate transaction scenario, the charging type may include: charging according to the building area, charging according to the building area in the set and charging according to the set (unit).
Specifically, whether the charging type of the obtained charging rule is consistent with the charging type in the charging request data packet is judged, and if so, step 220 is executed; in case of an inconsistency, step 230 is performed.
220, calculating the charge data in the charging request data packet according to the charging rule, generating and returning a calculation result.
And 230, determining that the charging is failed and returning a charging failure message.
Based on any of the above embodiments, the step 160 specifically includes the following steps S161 to S162:
s161, according to the charging rule, executing the charging method corresponding to the charging rule to calculate the charge data in the charging request data packet, and generating a calculation result.
And S162, generating a result response message according to the calculation result and returning the result response message to the service corresponding to the charging request data packet.
Further, the implementation of the present disclosure is further explained in an additional way: specifically, referring to fig. 3, there is shown a second flowchart of a method for processing charging data according to an embodiment of the present invention.
And 310, receiving a charging request data packet corresponding to the service, wherein the charging request data packet comprises the charge data.
320, matching the received charging request data packet with a predefined charging type, and if the matching is successful, executing step 330; if the matching fails, step 390 is executed (if the charging class to which the received charging request packet belongs does not appear in the predefined charging classes, the matching fails).
And 330, determining a target charging category corresponding to the charging request data packet.
And 340, generating a charging item character string according to the target charging category and the charging request data packet.
350, judging whether the charging item character string has a charging item value, and if the charging item character string has the charging item value, executing a step 360; if no charging item value exists in the charging item string, go to step 390.
And 360, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule.
370, judging whether the charging type of the charging rule is the charging type corresponding to the charging request data packet, if the charging type of the charging rule is the charging type corresponding to the charging request data packet, executing step 380; if the charging type of the charging rule is not the charging type corresponding to the charging request packet, step 390 is executed.
380, calculating the charge data in the charging request data packet according to the charging rule, generating and returning the calculation result.
390, determining that the charging fails and returning a charging failure message.
Based on any of the above embodiments, referring to fig. 4, an apparatus for processing charging data provided in an embodiment of the present invention includes: a receiving module 410, a matching module 420, a generating module 430, a detecting module 440, a querying module 450, and a calculating module 460. The receiving module 410 is configured to receive a charging request data packet, where the charging request data packet includes charge data; a matching module 420, configured to match the charging request data packet with a predefined charging category, and determine a target charging category corresponding to the charging request data packet; the generating module 430 is configured to generate a corresponding charging item character string according to the target charging category and the charging request data packet; the detection module 440 is configured to detect whether the charging item character string contains a charging item value; the query module 450 is configured to query the charging item value in a preset charging item table to obtain a corresponding charging rule when it is determined that the charging item character string includes the charging item value; and the calculating module 460 is configured to calculate the charge data in the charging request data packet according to the charging rule, generate and return a calculation result.
The invention provides a processing device of charging data, which receives a charging request data packet of a service, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the received charging request data packet; generating a corresponding charging item character string by the acquired target charging type and the received charging request data packet; detecting whether the charging item character string contains a charging item value, and inquiring the charging item value in a preset charging item table under the condition that the generated charging item character string contains the charging item value to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result. The charging service can be provided for the corresponding service by acquiring the corresponding charging rule through the charging item value without code development for the service under different transaction scenes.
Based on any embodiment above, the apparatus further comprises:
and the return module is used for determining charging failure and returning a charging failure message under the condition that the charging item character string does not contain the charging item value.
Based on any of the above embodiments, the charging request data packet further includes a category field;
the matching module 420 is specifically configured to:
and matching the category field in the charging request data packet with the predefined charging category to determine the target charging category corresponding to the charging request data packet.
Based on any of the above embodiments, the target charging category includes a calculation factor rule;
the generating module 430 includes:
the searching unit is used for searching a corresponding calculation factor sequence and a calculation factor data conversion path in the calculation factor rule based on the target charging category;
the analysis unit is used for analyzing the charging request data packet according to the calculation factor rule and the calculation factor data conversion path to obtain a charging factor value;
and the splicing unit is used for splicing the charging factor values according to the calculation factor sequence to generate a corresponding charging item character string.
Based on any of the embodiments above, the parsing unit is specifically configured to:
executing a calculation factor data conversion path in the calculation factor rule according to the calculation factor rule of the target charging category;
and analyzing the charging request data packet through the calculation factor data conversion path to obtain a charging factor value. Based on any of the above embodiments, the charging rule includes a charging type.
After the query module 450, the method further includes:
the judging module is used for judging whether the charging type of the charging rule is the charging type corresponding to the charging request data packet or not;
if yes, a calculation module is executed for calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result;
if not, a return module is executed for determining the charging failure and returning a charging failure message.
Based on any of the above embodiments, the calculating module 460 is specifically configured to:
executing a charging method corresponding to the charging rule according to the charging rule to calculate the charge data in the charging request data packet and generating a calculation result;
and generating a result response message according to the calculation result and returning the result response message to the service corresponding to the charging request data packet.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a method of processing billing data, the method comprising: receiving a charging request data packet, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet; generating a corresponding charging item character string according to the target charging category and the charging request data packet; under the condition that the charging item character string contains a charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result.
Furthermore, the logic instructions in the memory 530 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 solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 method according to 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.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing a method for processing charging data provided by the above methods, the method including: receiving a charging request data packet, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet; generating a corresponding charging item character string according to the target charging category and the charging request data packet; under the condition that the charging item character string contains a charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result. In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing a method for processing charging data provided by the above methods, the method including: receiving a charging request data packet, wherein the charging request data packet comprises charge data; matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet; generating a corresponding charging item character string according to the target charging category and the charging request data packet; under the condition that the charging item character string contains a charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule; and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result.
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 processing charging data is characterized by comprising the following steps:
receiving a charging request data packet, wherein the charging request data packet comprises charge data;
matching the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet;
generating a corresponding charging item character string according to the target charging category and the charging request data packet;
detecting whether the charging item character string contains a charging item value;
under the condition that the charging item character string is determined to contain the charging item value, inquiring the charging item value in a preset charging item table to obtain a corresponding charging rule;
and calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result.
2. The method for processing charging data according to claim 1, wherein the method further comprises:
and under the condition that the charging item character string does not contain the charging item value, determining that the charging fails and returning a charging failure message.
3. The method for processing charging data according to claim 1, wherein the charging request packet further includes a category field;
the matching the charging request data packet with the predefined charging category to determine the target charging category corresponding to the charging request data packet includes:
and matching the category field in the charging request data packet with a predefined charging category, and determining a target charging category corresponding to the charging request data packet.
4. The method for processing charging data according to claim 1, wherein the target charging category includes a calculation factor rule;
the generating of the corresponding charging item character string according to the target charging category and the charging request data packet includes:
based on the target charging category, searching a corresponding calculation factor sequence and a calculation factor data conversion path in the calculation factor rule; analyzing the charging request data packet according to the calculation factor rule and the calculation factor data conversion path to obtain a charging factor value;
and splicing the charging factor values according to the calculation factor sequence to generate the corresponding charging item character string.
5. The method of claim 4, wherein the parsing the charging request packet according to the calculation factor rule and the calculation factor data conversion path to obtain a charging factor value comprises:
executing a calculation factor data conversion path in the calculation factor rule according to the calculation factor rule of the target charging category;
and analyzing the charging request data packet through the calculation factor data conversion path to obtain a charging factor value.
6. The method for processing charging data according to claim 1, wherein the charging rule includes a charging type;
after the corresponding charging rule is obtained, the method further includes:
judging whether the charging type is the charging type corresponding to the charging request data packet;
if yes, calculating the charge data in the charging request data packet according to the charging rule, and generating and returning a calculation result;
if not, determining that the charging fails and returning a charging failure message.
7. The method according to claim 1 or 6, wherein the calculating the charge data in the charging request data packet according to the charging rule, generating and returning a calculation result, comprises:
executing a charging method corresponding to the charging rule according to the charging rule to calculate the charge data in the charging request data packet and generate a calculation result;
and generating a result response message according to the calculation result and returning the result response message to the service corresponding to the charging request data packet.
8. An apparatus for processing charging data, comprising:
the system comprises a receiving module, a charging module and a charging module, wherein the receiving module is used for receiving a charging request data packet, and the charging request data packet comprises charge data;
the matching module is used for matching the charging request data packet with a predefined charging type and determining a target charging type corresponding to the charging request data packet;
the generating module is used for generating a corresponding charging item character string according to the target charging category and the charging request data packet;
the detection module is used for detecting whether the charging item character string contains a charging item value; the query module is used for querying the charging item value in a preset charging item table under the condition that the charging item character string is determined to contain the charging item value to obtain a corresponding charging rule;
and the calculation module is used for calculating the charge data in the charging request data packet according to the charging rule, generating and returning a calculation result.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for processing billing data according to any of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method for processing billing data according to any of claims 1 to 7 when executed by a processor.
CN202111274774.XA 2021-10-29 2021-10-29 Method and device for processing charging data Pending CN114202326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111274774.XA CN114202326A (en) 2021-10-29 2021-10-29 Method and device for processing charging data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111274774.XA CN114202326A (en) 2021-10-29 2021-10-29 Method and device for processing charging data

Publications (1)

Publication Number Publication Date
CN114202326A true CN114202326A (en) 2022-03-18

Family

ID=80646520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111274774.XA Pending CN114202326A (en) 2021-10-29 2021-10-29 Method and device for processing charging data

Country Status (1)

Country Link
CN (1) CN114202326A (en)

Similar Documents

Publication Publication Date Title
CN111274782B (en) Text auditing method and device, computer equipment and readable storage medium
US10783516B2 (en) Systems and methods for automatically identifying a checkout webpage and injecting a virtual token
CN110648211B (en) data verification
CN106095972B (en) Information classification method and device
CN112529575B (en) Risk early warning method, equipment, storage medium and device
US20060050684A1 (en) Message analysis systems and methods
CN109462582B (en) Text recognition method, text recognition device, server and storage medium
CN109214362B (en) Document processing method and related equipment
CN110363667A (en) Order financing processing method, apparatus, computer equipment and storage medium based on AI
CN113609020A (en) Test case recommendation method and device
CN110321423B (en) Text data risk identification method and server
CN114202326A (en) Method and device for processing charging data
CN108804889B (en) Website registration method and device
CN116346662A (en) Test message generation method, device, equipment and storage medium
CN112488562B (en) Service realization method and device
JP5304397B2 (en) Form processing apparatus and form processing program
CN112396425A (en) Identification code processing method and device
CN109087050B (en) Exit list generation method and related product
CN112637222A (en) Request processing method and device
CN112241328A (en) Data processing method, device and system
CN111340517A (en) Method, system and related equipment for rapidly inquiring authenticity of invoice
CN109118147B (en) Multi-platform inventory sharing method and related products
CN116384352B (en) Data set generation method, device, equipment and medium
CN116996840B (en) Short message auditing method, device, equipment and storage medium
CN113159951B (en) Financial data clearing method, device, 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