[go: up one dir, main page]

CN114158003B - Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium - Google Patents

Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium Download PDF

Info

Publication number
CN114158003B
CN114158003B CN202111274584.8A CN202111274584A CN114158003B CN 114158003 B CN114158003 B CN 114158003B CN 202111274584 A CN202111274584 A CN 202111274584A CN 114158003 B CN114158003 B CN 114158003B
Authority
CN
China
Prior art keywords
tariff
tariffs
calculation
linked list
ordered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111274584.8A
Other languages
Chinese (zh)
Other versions
CN114158003A (en
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 Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information 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 Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN202111274584.8A priority Critical patent/CN114158003B/en
Publication of CN114158003A publication Critical patent/CN114158003A/en
Application granted granted Critical
Publication of CN114158003B publication Critical patent/CN114158003B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a tariff calculation method and system adopting arrangement and then calculation, electronic equipment and a storage medium, belonging to the technical field of telecommunication service, comprising the steps of obtaining tariff information ordered by a user and storing the tariff information into a hash chain table to form a tariff chain table; performing tariff arrangement on the tariff linked list according to a custom rule, and constructing a tariff grammar tree according to the finally ordered tariff linked list; performing recursive call function calculation on the tariff grammar tree, so that tariff information is sequentially overlapped and calculated according to a final ordered sequence to obtain a final tariff calculation result; the tariff arrangement of the tariff linked list according to the custom rule comprises: the tariff linked list is ordered by priority rules; acquiring tariff matching conditions in the ordered tariff linked list, and deleting tariffs which do not meet the scene; and after deleting, acquiring the tariffs with special conditions in the tariff chain table, and carrying out priority adjustment on the tariffs. The invention removes redundant calculation and only executes once, thus greatly improving the efficiency.

Description

Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium
Technical Field
The invention belongs to the technical field of telecommunication service, and particularly relates to a tariff calculation method and system adopting programming and then calculation, electronic equipment and a storage medium.
Background
The arrival of 5G will cause ICT to walk into the era of everything interconnection, the number of users and the use amount can both have the increase of magnitude, the standard of the service (flow use reminding, arrearage reminding, signal control shutdown and the like) which is required to be well ensured to be perceived by customers is increased, and higher requirements are put forward on the system capacity and the processing performance of operators.
However, the tariff superposition methods currently used are: acquiring a user charge list, sequencing priority, performing package preferential calculation on the charges one by one, comparing the result sets, and acquiring the lowest charge; special rules are adopted to carry out tariff superposition and recalculation and restoration; the personalized package forced execution scene needs to do package calculation again; overlapping scenes by crossing threshold packages; cyclic class tariffs; scene overlay, and so on. However, these special rules result in an originally calculated tariff, which requires a number of calculations, at most: c (N, 2) +c (N-1, 2) + +1; wherein N is the number of packages. The problems with the above approach are: and after sorting according to the single priority, carrying out charge condition matching one by one, and calculating the charge. Then, when encountering special tariffs, the preferential sequence is adjusted, so that the same tariffs are repeatedly calculated; after the cost calculation, there will be a comparison of package stacks, after which a repeat calculation of the cost may also be performed; the preferential model architecture is chaotic, the modifiable performance is poor, the judgment of a plurality of overlapped scenes exists, the boundary is unclear, and the usability and maintainability are greatly reduced; the price is a core link of the online charging system, and the processing efficiency of the whole online charging system can be affected due to the reduction of the price efficiency. Summarizing, increasing system resource consumption, increasing additional calculation amount of a charging system, reducing processing efficiency and increasing response time delay of an online system; and the personnel cost is increased for the later maintenance of the system.
Disclosure of Invention
In view of the above problems, the present invention provides a tariff calculation method and system, an electronic device, and a storage medium, where the tariff calculation method includes:
acquiring tariff information ordered by a user, and storing the tariff information into a hash chain table to form a tariff chain table;
performing tariff arrangement on the tariff linked list according to a custom rule, and constructing a tariff grammar tree according to the finally ordered tariff linked list;
performing recursive call function calculation on the tariff grammar tree, so that the tariff information is sequentially overlapped and calculated according to a final ordered sequence to obtain a final tariff calculation result;
wherein, the tariff arranging the tariff linked list according to the custom rule comprises:
the tariff linked list is ordered by the priority rule;
acquiring the tariff matching conditions in the ordered tariff linked list, and deleting the tariffs which do not meet the scene;
and after deleting, acquiring the tariffs with special conditions in the tariff linked list, and carrying out priority adjustment on the tariffs.
Preferably, the priority rules include ordering according to attributes of the tariffs, attributes including priority usage, sharing priority usage.
Preferably, the tariffs with special conditions include mutually exclusive tariffs and coexistence of tariffs.
The system for calculating the tariff by adopting the arrangement before calculation provided by the embodiment of the invention comprises the following components:
the hash chain table module is used for acquiring the charge information ordered by the user and storing the charge information into the hash chain table to form a charge chain table;
the custom rule module is used for carrying out tariff arrangement on the tariff linked list according to a custom rule and constructing a tariff grammar tree according to the finally ordered tariff linked list;
the calculation module is used for carrying out recursive call function calculation on the tariff grammar tree, so that the tariff information is sequentially overlapped and calculated according to a final ordered sequence to obtain a final tariff calculation result;
wherein, the custom rule module comprises:
the tariff linked list is ordered by the priority rule;
acquiring the tariff matching conditions in the ordered tariff linked list, and deleting the tariffs which do not meet the scene;
and after deleting, acquiring the tariffs with special conditions in the tariff linked list, and carrying out priority adjustment on the tariffs.
Preferably, the priority rules include ordering according to attributes of the tariffs, attributes including priority usage, sharing priority usage.
Preferably, the tariffs with special conditions include mutually exclusive tariffs and coexistence of tariffs.
The electronic device provided by the embodiment of the invention comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a program, and when the program is executed by the processing unit, the processing unit is caused to execute the method.
The embodiment of the invention provides a computer readable storage medium, which stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device is caused to execute the method.
Compared with the prior art, the invention has the beneficial effects that:
according to the method, the tariff information ordered by the user is firstly arranged according to the self-defined rule, then the calculation is carried out progressively according to the arranged sequence, namely the result of each calculation is overlapped to finish the final calculation result.
Drawings
Fig. 1 is a schematic flow chart of a tariff calculation method using first-arrangement and then-calculation according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the present invention provides a tariff calculation method employing a first orchestration and then calculation, the method comprising:
acquiring tariff information ordered by a user, and storing the tariff information into a hash chain table to form a tariff chain table;
performing tariff arrangement on the tariff linked list according to a custom rule, and constructing a tariff grammar tree according to the finally ordered tariff linked list;
performing recursive call function calculation on the tariff grammar tree, so that tariff information is sequentially overlapped and calculated according to a final ordered sequence to obtain a final tariff calculation result;
wherein, the tariff arrangement of the tariff linked list according to the custom rule comprises:
the tariff linked list is ordered by priority rules;
acquiring tariff matching conditions in the ordered tariff linked list, deleting tariffs which do not meet the scene, for example, pruning the directional tariffs and the tariff preferential intra-provincial flow when the tariffs are configured with the non-vacation flow used only for preferential vacation flow, and pruning all intra-provincial tariffs and the like if the user leaves the provincial;
and after deleting, acquiring the tariffs with special conditions in the tariff chain table, and carrying out priority adjustment on the tariffs.
In this embodiment, the non-package tariffs configure a virtual package, 1-to-1 mapping relationship in the background.
Further, the priority rules include ordering according to tariff attributes including priority usage, sharing priority usage. The priority rule sets, for example: directional traffic (unshared) > Directional traffic (shared) > Idle traffic > campus traffic (park containing) > single mode traffic > intra-provincial traffic > domestic traffic > daily card renting; if the tariff attribute is configured to require preferential use, the tariffs of the attribute are put before other tariffs; if the attribute is configured for preferential use during sharing, the attribute is not valid for the non-sharing scenario.
Still further, the tariffs with special conditions include mutually exclusive tariffs and coexistence of tariffs; for example, if the A tariff meets the B tariff and the automatic invalidation is not available, the user can trim the A tariff or the C tariff and the D tariff have special mutual exclusion relation when ordering the AB tariff at the same time, and if the C preferential is enjoyed, the D preferential is not enjoyed, and the C tariff can be trimmed.
The system for calculating the tariff by adopting the arrangement before calculation provided by the embodiment of the invention comprises the following components:
the hash chain table module is used for acquiring the charge information ordered by the user and storing the charge information into the hash chain table to form a charge chain table;
the custom rule module is used for carrying out tariff arrangement on the tariff linked list according to the custom rule and constructing a tariff grammar tree according to the finally ordered tariff linked list;
the calculation module is used for carrying out recursive call function calculation on the tariff grammar tree, so that tariff information is sequentially overlapped and calculated according to the final ordered sequence to obtain a final tariff calculation result;
the custom rule module comprises:
the tariff linked list is ordered by priority rules;
acquiring tariff matching conditions in the ordered tariff linked list, and deleting tariffs which do not meet the scene;
and after deleting, acquiring the tariffs with special conditions in the tariff chain table, and carrying out priority adjustment on the tariffs.
Further, the priority rules include ordering according to tariff attributes including priority usage, sharing priority usage.
Still further, the tariffs with special conditions include mutually exclusive tariffs, coexistence of tariffs
The electronic device provided by the embodiment of the invention comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a program, and when the program is executed by the processing unit, the processing unit is caused to execute the method.
The embodiment of the invention provides a computer readable storage medium storing a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to execute the method.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A tariff calculation method employing a first orchestration and then calculation, comprising:
acquiring tariff information ordered by a user, and storing the tariff information into a hash chain table to form a tariff chain table;
performing tariff arrangement on the tariff linked list according to a custom rule, and constructing a tariff grammar tree according to the finally ordered tariff linked list;
performing recursive call function calculation on the tariff grammar tree, so that the tariff information is sequentially overlapped and calculated according to a final ordered sequence to obtain a final tariff calculation result;
wherein, the tariff arranging the tariff linked list according to the custom rule comprises:
the tariff linked list is ordered by a priority rule;
acquiring the tariff matching conditions in the ordered tariff linked list, and deleting the tariffs which do not meet the scene;
and after deleting, acquiring the tariffs with special conditions in the tariff linked list, and carrying out priority adjustment on the tariffs.
2. The tariff calculation method of claim 1 wherein the priority rules include ranking based on attributes of the tariffs, attributes including priority usage, sharing priority usage.
3. The tariff calculation method of claim 2 wherein the tariffs having special conditions include mutually exclusive tariffs and coexistence of tariffs.
4. A tariff calculation system employing a first orchestration and then calculation, comprising:
the hash chain table module is used for acquiring the charge information ordered by the user and storing the charge information into the hash chain table to form a charge chain table;
the custom rule module is used for carrying out tariff arrangement on the tariff linked list according to a custom rule and constructing a tariff grammar tree according to the finally ordered tariff linked list;
the calculation module is used for carrying out recursive call function calculation on the tariff grammar tree, so that the tariff information is sequentially overlapped and calculated according to a final ordered sequence to obtain a final tariff calculation result;
wherein, the custom rule module comprises:
the tariff linked list is ordered by a priority rule;
acquiring the tariff matching conditions in the ordered tariff linked list, and deleting the tariffs which do not meet the scene;
and after deleting, acquiring the tariffs with special conditions in the tariff linked list, and carrying out priority adjustment on the tariffs.
5. The tariff calculation system of claim 4 wherein the priority rules include ranking based on attributes of the tariffs, attributes including priority usage, sharing priority usage.
6. The tariff calculation system of claim 5 wherein the tariffs having special conditions include mutually exclusive tariffs and coexistence of tariffs.
7. An electronic device comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program which, when executed by the processing unit, causes the processing unit to perform the method of any of claims 1-3.
8. A storage medium storing a computer program executable by an electronic device, which when run on the electronic device causes the electronic device to perform the method of any one of claims 1-3.
CN202111274584.8A 2021-10-29 2021-10-29 Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium Active CN114158003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111274584.8A CN114158003B (en) 2021-10-29 2021-10-29 Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111274584.8A CN114158003B (en) 2021-10-29 2021-10-29 Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114158003A CN114158003A (en) 2022-03-08
CN114158003B true CN114158003B (en) 2023-09-05

Family

ID=80458907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111274584.8A Active CN114158003B (en) 2021-10-29 2021-10-29 Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114158003B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227299A (en) * 2007-01-17 2008-07-23 华为技术有限公司 A method, system and device for realizing billing data function
CN101437215A (en) * 2008-12-25 2009-05-20 中国移动通信集团福建有限公司 Syncretized charging method of data business platform
CN102083043A (en) * 2009-11-27 2011-06-01 中国移动通信集团山东有限公司 Method and relevant device for determining expense discount program provided for user
CN102081776A (en) * 2010-12-30 2011-06-01 百度在线网络技术(北京)有限公司 Search result ordering method and system
CN102111743A (en) * 2011-04-15 2011-06-29 宇龙计算机通信科技(深圳)有限公司 Method for customizing inclusive price on mobile terminal and mobile terminal
CN102143471A (en) * 2011-01-24 2011-08-03 中兴通讯股份有限公司 Processing method and device of unusual telephone charge
US8611335B1 (en) * 2009-08-13 2013-12-17 Google, Inc. System and method for assigning paths for data flows through a wide-area network
JP2016154307A (en) * 2015-02-20 2016-08-25 富士通株式会社 Data transfer program, data transfer device, and data transfer system
CN109241773A (en) * 2018-09-08 2019-01-18 中建精诚工程咨询有限公司 construction cost data management system
CN111432360A (en) * 2020-05-19 2020-07-17 北京思特奇信息技术股份有限公司 Method for dynamically adjusting charging priority and method for loading tariff syntax tree

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6931378B2 (en) * 2001-12-10 2005-08-16 Halliburton Energy Services, Inc. Method, systems, and program product for selecting and acquiring data to update a geophysical database
US7881232B2 (en) * 2004-09-01 2011-02-01 Cisco Technology, Inc. Techniques for managing expenses for a conference scheduled using availability data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227299A (en) * 2007-01-17 2008-07-23 华为技术有限公司 A method, system and device for realizing billing data function
CN101437215A (en) * 2008-12-25 2009-05-20 中国移动通信集团福建有限公司 Syncretized charging method of data business platform
US8611335B1 (en) * 2009-08-13 2013-12-17 Google, Inc. System and method for assigning paths for data flows through a wide-area network
CN102083043A (en) * 2009-11-27 2011-06-01 中国移动通信集团山东有限公司 Method and relevant device for determining expense discount program provided for user
CN102081776A (en) * 2010-12-30 2011-06-01 百度在线网络技术(北京)有限公司 Search result ordering method and system
CN102143471A (en) * 2011-01-24 2011-08-03 中兴通讯股份有限公司 Processing method and device of unusual telephone charge
CN102111743A (en) * 2011-04-15 2011-06-29 宇龙计算机通信科技(深圳)有限公司 Method for customizing inclusive price on mobile terminal and mobile terminal
JP2016154307A (en) * 2015-02-20 2016-08-25 富士通株式会社 Data transfer program, data transfer device, and data transfer system
CN109241773A (en) * 2018-09-08 2019-01-18 中建精诚工程咨询有限公司 construction cost data management system
CN111432360A (en) * 2020-05-19 2020-07-17 北京思特奇信息技术股份有限公司 Method for dynamically adjusting charging priority and method for loading tariff syntax tree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"网络流量控制系统的设计与实现";段磊;《北京邮电大学硕士论文》;全文 *

Also Published As

Publication number Publication date
CN114158003A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
CN105103506B (en) Method and system for allocating bandwidth for non-uniform bandwidth requests in cloud computing networks
CN111010426A (en) Message pushing method and device
CN107464151B (en) Order data processing method and device for high-concurrency service
CN112306656A (en) Cloud computing task tracking processing method, cloud computing system and server
CN109815389A (en) Using the node matching method, apparatus and computer equipment of regulation engine
CN109032590B (en) Configuration method, device, terminal and storage medium of visual development environment
CN108960629A (en) Distribution method, device and the computer readable storage medium of maintenance task
CN110138688A (en) Dynamic adjusts method, apparatus, equipment and the readable storage medium storing program for executing of business interface
CN109840111A (en) A graphical business processing system and method
CN108536723B (en) Distribution power network GIS electric wire figure multiplexing list cooperates with drafting method and device
CN113626438A (en) Data table management method and device, computer equipment and storage medium
CN113141410A (en) Dynamically adjusted QPS control method, system, device and storage medium
CN107832042A (en) One kind is based on embedded software development method
CN103167460A (en) Billing bill processing method and device
CN109343831A (en) A kind of management method and device of HTML component
CN110069278A (en) A kind of automation distributed multi-task packaging method and system
CN109743202A (en) Data management method, apparatus, device and readable storage medium
CN114158003B (en) Tariff calculation method and system adopting programming and calculation, electronic equipment and storage medium
CN110662188B (en) Charging method and system
CN114490089A (en) Cloud computing resource automatic adjusting method and device, computer equipment and storage medium
CN111988749B (en) Dynamic tariff generation method and device
CN108769756A (en) With ranking main broadcaster sort method and system, server and storage medium again
CN108984790A (en) A kind of data branch mailbox method and device
CN118276817A (en) Data sorting method and device
CN116302525A (en) Resource recommendation method, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant