CN115473968B - Ticket processing method and device - Google Patents

Ticket processing method and device Download PDF

Info

Publication number
CN115473968B
CN115473968B CN202110657233.9A CN202110657233A CN115473968B CN 115473968 B CN115473968 B CN 115473968B CN 202110657233 A CN202110657233 A CN 202110657233A CN 115473968 B CN115473968 B CN 115473968B
Authority
CN
China
Prior art keywords
user
ticket data
message middleware
processed
data
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
CN202110657233.9A
Other languages
Chinese (zh)
Other versions
CN115473968A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202110657233.9A priority Critical patent/CN115473968B/en
Publication of CN115473968A publication Critical patent/CN115473968A/en
Application granted granted Critical
Publication of CN115473968B publication Critical patent/CN115473968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/70Administration or customization aspects; Counter-checking correct charges
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a ticket processing method and a ticket processing device, wherein the method comprises the following steps: the method comprises the steps of obtaining an identifier of a user to be processed, and distributing the identifier of the user to be processed to a plurality of intermediate ends, so that each intermediate end respectively obtains user ticket data corresponding to the identifier of the user to be processed, which is distributed and obtained from a database; acquiring user ticket data sent by each intermediate end, and distributing the user ticket data to a plurality of message middleware so that each message middleware can respectively determine rollback user ticket data from the user ticket data distributed by the message middleware; and acquiring the call ticket data of the rollback user sent by each message middleware, and sending all call ticket data of the rollback user to the target charging system, so that the call ticket rollback is rapidly processed, the time required for carrying out the call ticket rollback is reduced, and the call ticket rollback efficiency is improved.

Description

Ticket processing method and device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a ticket processing method and ticket processing equipment.
Background
The bill rollback refers to that the bill is required to be re-rated according to the user communication detail list, namely the bill data, due to the reasons of charging errors of part of users caused by tariff change and the like.
In the prior art, when a ticket is returned, after the electronic device acquires the user identifiers to be processed, the electronic device sequentially acquires the ticket data corresponding to each user identifier to be processed from the distributed database, and acquires the ticket data of the returned user from the ticket data. After the call ticket data of the rollback user is obtained, the call ticket data is input into a charging system, so that the charging system carries out rating treatment again according to the call ticket data of the rollback user.
However, when the ticket data corresponding to the user identifier to be processed and the ticket data of the rollback user are acquired, the ticket data are sequentially acquired, so that the time for acquiring the data is longer, the time for rollback the ticket is longer, and the ticket rollback efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a ticket processing method and ticket processing equipment, which are used for solving the technical problem of low ticket rollback efficiency in the prior art.
In a first aspect, an embodiment of the present invention provides a ticket processing method, including:
the method comprises the steps of obtaining an identifier of a user to be processed, and distributing the identifier of the user to be processed to a plurality of intermediate ends, so that each intermediate end respectively obtains user ticket data corresponding to the identifier of the user to be processed, which is distributed and obtained from a database;
Acquiring user ticket data sent by each intermediate end, and distributing the user ticket data to a plurality of message middleware so that each message middleware can respectively determine rollback user ticket data from the user ticket data distributed by the message middleware;
and acquiring the call ticket data of the rollback user sent by each message middleware, and sending all call ticket data of the rollback user to the target charging system.
In one possible design, the distributing the user ticket data to a plurality of message middleware includes:
acquiring hash value intervals corresponding to the message middleware, and determining hash values corresponding to the call ticket data of each user;
For each user bill data, determining a message middleware to which the user bill data belongs according to a hash value corresponding to the user bill data; the hash value corresponding to the user call ticket data is in a hash value interval corresponding to the message middleware to which the user call ticket data belongs.
In one possible design, the determining the hash value corresponding to each user call ticket includes:
And for each user bill data, acquiring a key field corresponding to the user bill data, and carrying out hash calculation on the key field to obtain a hash value corresponding to the user bill data.
In one possible design, the method further comprises:
and acquiring the weight corresponding to each message middleware, and determining a hash value interval corresponding to each message middleware value according to the weight corresponding to each message middleware.
In one possible design, the distributing the user ticket data to a plurality of message middleware includes:
And equally distributing the user call ticket data to each message middleware.
In one possible design, the allocating the identification of the user to be processed to a plurality of intermediate ends includes:
and the identification of the user to be processed is evenly distributed to each intermediate end.
In a second aspect, an embodiment of the present invention provides a ticket processing apparatus, including:
The information acquisition module is used for acquiring the identification of the user to be processed and distributing the identification of the user to be processed to a plurality of intermediate ends so that each intermediate end can acquire user ticket data corresponding to the identification of the user to be processed distributed from the database;
the processing module is used for acquiring the user ticket data sent by each intermediate end and distributing the user ticket data to a plurality of message middleware so that each message middleware can respectively determine the rollback user ticket data from the user ticket data distributed by the message middleware;
And the processing module is used for acquiring the call ticket data of the rollback user sent by each message middleware and sending all the call ticket data of the rollback user to the target charging system.
In one possible design, the processing module is further configured to:
acquiring hash value intervals corresponding to the message middleware, and determining hash values corresponding to the call ticket data of each user;
For each user bill data, determining a message middleware to which the user bill data belongs according to a hash value corresponding to the user bill data; the hash value corresponding to the user call ticket data is in a hash value interval corresponding to the message middleware to which the user call ticket data belongs.
In one possible design, the processing module is further configured to:
And for each user bill data, acquiring a key field corresponding to the user bill data, and carrying out hash calculation on the key field to obtain a hash value corresponding to the user bill data.
In one possible design, the processing module is further configured to:
and acquiring the weight corresponding to each message middleware, and determining a hash value interval corresponding to each message middleware value according to the weight corresponding to each message middleware.
In one possible design, the processing module is further configured to:
And equally distributing the user call ticket data to each message middleware.
In one possible design, the information acquisition module is further configured to:
and the identification of the user to be processed is evenly distributed to each intermediate end.
In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor and memory;
The memory stores computer-executable instructions;
The at least one processor executes computer-executable instructions stored in the memory, causing the at least one processor to perform the ticket processing method as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the ticket processing method according to the first aspect and the various possible designs of the first aspect.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising a computer program which, when executed by a processor, implements the ticket processing method as described above in the first aspect and in the various possible designs of the first aspect.
The invention provides a ticket processing method and equipment, when the identification of a user to be processed is acquired, the identification of the user to be processed is required to be determined from the user to be processed, the identification of the user to be processed is distributed to intermediate terminals, so that each intermediate terminal respectively acquires user ticket data corresponding to the identification of the user to be processed distributed from a database, namely, each intermediate terminal is only responsible for searching part of user ticket data corresponding to the user to be processed, and can search simultaneously, so that the parallel acquisition of the user ticket data is realized, the time required by acquiring the user ticket data is reduced, after the user ticket data corresponding to the user to be processed is acquired, the user ticket data corresponding to the user to be processed is distributed to message middleware, so that each message middleware respectively determines the user ticket data to be backed from the user ticket data distributed to be backed, and each message middleware is only responsible for searching the user to be backed from part of the user to be processed, and can search simultaneously, so that the user to be backed, namely, the acquisition of the user ticket data is reduced, and the time required by the user ticket data to be backed is reduced. And receiving the call ticket data of the rollback user sent by each message middleware and sending the call ticket data to the target charging system so that the target charging system reclassifies the call ticket data of the rollback user, thereby realizing the quick processing of the call ticket rollback, reducing the time required by the call ticket rollback and improving the call ticket rollback efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a conventional ticket processing procedure according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a ticket processing method according to an embodiment of the present invention;
FIG. 3 is a second flowchart of a ticket processing method according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a ticket processing device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of 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.
Fig. 1 is a schematic diagram of an existing ticket processing procedure provided in an embodiment of the present invention, as shown in fig. 1, where the existing ticket processing procedure includes the following steps:
And (I) the upstream system transmits the collected communication ticket file of the user, namely the user to be processed, to the charging system.
And (II) after the rating program in the charging system processes the user communication ticket file, inputting the obtained data such as accumulated quantity, bill and the like into the memory database, generating a detail data file, namely a file containing ticket data, and sending the detail data file to the warehousing program.
And thirdly, inputting the detailed data file into a distributed database, namely an Hbase database by a warehousing program.
And fourthly, when the call ticket data of the rollback user is required to be acquired, the rollback program, namely the electronic equipment, acquires call ticket data corresponding to the to-be-processed user identification from the distributed database one by one, namely acquires the call ticket data of the to-be-processed user, and circularly executes data query operation according to the rollback rule to extract the call ticket data of the rollback user from the call ticket data of the to-be-processed user.
And fifthly, deleting the related table data of the memory database according to the acquired data such as the accumulated quantity of the user, the bill and the like by the rollback program, and writing the extracted bill data of the rollback user into a file so that the pricing program in the charging system can re-conduct pricing processing by utilizing the bill data of the rollback user in the file.
However, when the ticket data corresponding to the user identifier to be processed is acquired and when the ticket data of the rollback user is extracted from the ticket data of the user to be processed, the ticket data are processed one by one according to the sequence, so that the time required for acquiring the data is longer, the ticket rollback efficiency is reduced, the account-out progress is influenced, and the user perception is influenced.
Therefore, in order to solve the above problems, the technical concept of the present invention is to improve the steps (four) and (five), that is, when obtaining the ticket data corresponding to the user identifier to be processed, the middle end is utilized to query the distributed database in parallel, so as to obtain the ticket data corresponding to the user identifier to be processed from the distributed database, and improve the efficiency of obtaining the ticket data. And when the data query operation is circularly executed according to the rollback rules and the ticket data of the rollback user is extracted from the ticket data of the user to be processed, the message middleware is utilized for parallel extraction, so that the screening efficiency of the ticket data of the rollback user is realized. The efficiency of acquiring the bill data of the user to be processed and the efficiency of extracting the bill data of the user to be returned are improved, so that the processing efficiency of bill return can be further improved, the account-out progress is ensured, the user can acquire related communication cost in time, the use satisfaction of the user is ensured, and the user experience is high.
The technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems are described in detail below with specific examples. The following specific examples may be combined with each other, and some examples may not be repeated for the same or similar concepts or processes. Examples of the present disclosure will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a ticket processing method according to an embodiment of the present invention, where an execution body of the embodiment may be an electronic device, and specifically may be a rollback program. As shown in fig. 2, the method includes:
S201, obtaining the identification of the user to be processed, and distributing the identification of the user to be processed to a plurality of intermediate ends, so that each intermediate end respectively obtains user ticket data corresponding to the identification of the user to be processed, which is distributed and obtained from a database.
In this embodiment, when a user needing to be subjected to price reclassification, that is, a rollback user, needs to be searched from users, that is, users to be processed, the identification of the user to be processed is obtained, so that user ticket data corresponding to each user to be processed is searched by using the identification of each user to be processed, and thus, the rollback user is determined from the users to be processed by using the user ticket data of the users to be processed.
In order to improve the efficiency of searching the user ticket data, the identification of the user to be processed is distributed to a plurality of intermediate ends, each intermediate end is only responsible for processing the identification of part of the users to be processed in the identifications of all the users to be processed, and each intermediate end can synchronously process, namely, for each intermediate end, the intermediate end only searches the user ticket data corresponding to the identification of the user to be processed, which is distributed, from a database, and sends the searched user ticket data to an electronic device, namely, the searched user ticket data of the user to be processed is sent to the electronic device, so that the parallel acquisition of the user ticket data is realized, rather than sequentially searching the user ticket data of the user to be processed from the database one by one, the time required by the acquisition of the user ticket data is reduced, and the acquisition efficiency of the user ticket data is improved.
In any embodiment, optionally, when the identification of the user to be processed is respectively given to the plurality of intermediate ends, the identification of the user to be processed is evenly distributed to each intermediate end.
Specifically, the number of the intermediate ends is obtained, the number of all the users to be processed, namely the number of the identifiers of all the users to be processed is obtained, and the number to be processed corresponding to each intermediate end is determined according to s1=n1/N2 so as to be used for distributing the identifiers of the users to be processed. Wherein S1 is the number of the intermediate terminals to be processed, N1 is the number of the identifiers of all the users to be processed, and N2 is the number of all the intermediate terminals. For example, the number of the identifiers of the users to be processed is 20 ten thousand, and the number of the intermediate ends is 5, so that the number of the users to be processed corresponding to each intermediate end is 4 ten thousand, that is, each intermediate end is responsible for processing the identifiers of 4 ten thousand users to be processed, that is, the user ticket data corresponding to the identifiers of the 4 ten thousand users to be processed is searched from the database, that is, the user ticket data of the 4 ten thousand users to be processed is searched.
The database is a distributed database, and stores detailed list data, namely call ticket data, of a plurality of users. The intermediate terminal comprises a computer, a server and other terminal equipment with data processing capability.
S202, obtaining the user ticket data sent by each intermediate end, and distributing the user ticket data to a plurality of message middleware, so that each message middleware respectively determines the rollback user ticket data from the user ticket data distributed by the message middleware.
In this embodiment, after receiving user ticket data of a user to be processed sent by each intermediate end, that is, after receiving user ticket data corresponding to an identifier of the user to be processed, which is sent by each intermediate end and is obtained by each intermediate end, the electronic device distributes all user ticket data to a plurality of message middleware, each message middleware is only responsible for part of the user ticket data in all the user ticket data, that is, for each message middleware, the message middleware is distributed according to a rollback rule, that is, the user ticket data to be rolled back is screened from the user ticket data obtained by distribution, so as to obtain rollback user ticket data, that is, a rollback user is determined from the user to be processed obtained by distribution according to the user ticket data of the user to be processed. After the rollback user, namely rollback user ticket data, is screened out, the rollback user ticket data is sent to the electronic equipment, so that the parallel inquiry of the rollback user ticket data is realized, namely, the parallel inquiry of the user to be processed needing rollback is realized.
In this embodiment, alternatively, when the user call ticket data is distributed to the plurality of message middleware, the distribution may be performed in two ways.
One way is to evenly distribute the user call ticket data, i.e. to evenly distribute the user call ticket data to the message middleware.
Specifically, the number of message middleware and the number of call ticket data of all users are obtained, namely the number of identifiers of all users to be processed are obtained, the number to be processed corresponding to each message middleware is determined according to s2=n1/N3, so that the call ticket data of the users are distributed by using the number to be processed corresponding to each message middleware, namely the number of call ticket data of the users distributed in each message is the number to be processed corresponding to the message middleware. Wherein S2 is the number of to-be-processed corresponding to the message middleware, N1 is the number of identifiers of all to-be-processed users, that is, the number of call ticket data of all users, and N3 is the number of all message middleware.
Alternatively, the allocation is based on the processing power, i.e. the weight, of the message middleware.
Optionally, the rollback rule is a rollback condition, which is a condition defined by a relevant person for screening the user with charging problem, including screening date, rollback problem type, and the like. The rollback problem type indicates a type of charging problem, e.g. tariff change. For example, the rollback rule includes a screening date and a question type, wherein the screening date is 1 month and 20 days, the rollback question type is a call tariff change, and when the rollback user is screened according to the rollback rule, it is actually determined that the user has performed a call on 1 month and 20 days.
Optionally, the user call ticket data represents communication detail data of the user, which includes data of user identification, billing, and the like.
In addition, optionally, after receiving the user ticket data of the users to be processed sent by each intermediate end, the user ticket data of all the users to be processed are aggregated to obtain the user ticket data of all the users to be processed.
In addition, optionally, after the call ticket data of the rollback user is screened out from the database, the related call ticket data of the rollback user in the memory database is deleted, so that the repetition of the call ticket data is avoided during the subsequent warehousing.
S203, the call ticket data of the rollback user sent by each message middleware is obtained, and all call ticket data of the rollback user are sent to the target charging system.
In this embodiment, the message middleware determines the data of the rollback user ticket from the user ticket data, that is, after screening the rollback user from the users to be processed, sends the data of the user ticket of the rollback user, that is, the data of the rollback user ticket to the electronic device. After receiving the bill data of the rollback user sent by all the message middleware, the electronic equipment indicates that the bill data of the rollback user corresponding to the rollback user needs to be re-rated, namely, the rollback user is re-charged, and then the received bill data of all the users is sent to the target charging system, so that the target charging system re-carries out rating according to the bill data of the user, and bill rollback is realized.
Optionally, the target billing system is actually priced by the rating program in the target billing system when re-rating.
It will be appreciated that the operations (e.g., screening fallback users) performed by the message middleware described above are actually performed by the terminal to which the message middleware corresponds, i.e., the terminal at which the message middleware resides.
In the embodiment, when the ticket data of the user to be processed is queried from the database, a plurality of intermediate ends are utilized for parallel query, and the ticket data acquisition efficiency is improved. When the rollback user is determined from the user to be processed, namely, the rollback user ticket data is determined from the ticket data, a plurality of message middleware are utilized for parallel determination, so that the obtaining efficiency of the rollback user, namely, the rollback user ticket data is improved, and the rollback processing efficiency can be improved. And when the user bill data is transmitted back, a message transmission mode is adopted instead of file transmission, so that the transmission by only one output channel is avoided, the data transmission efficiency is greatly improved, and the back processing efficiency is further improved.
As can be seen from the above description, when the identifier of the user to be processed is obtained, it indicates that the back-off user needs to be determined from the user to be processed, the identifier of the user to be processed is distributed to the intermediate ends, so that each intermediate end respectively obtains the user ticket data corresponding to the identifier of the user to be processed, which is obtained by distributing the identifier of the user to be processed, from the database, that is, each intermediate end is only responsible for searching part of the user ticket data corresponding to the user to be processed, and each intermediate end can simultaneously search, so as to realize parallel obtaining of the user ticket data, reduce the time required for obtaining the user ticket data, and after obtaining the user ticket data corresponding to the user to be processed, distribute the user ticket data corresponding to the user to be processed to the message middleware, so that each message middleware respectively determines the back-off user ticket data from the user ticket data distributed to be processed, that is determined from the user to be processed. And receiving the call ticket data of the rollback user sent by each message middleware and sending the call ticket data to the target charging system so that the target charging system reclassifies the call ticket data of the rollback user, thereby realizing the quick processing of the call ticket rollback, reducing the time required by the call ticket rollback and improving the call ticket rollback efficiency.
Fig. 3 is a second flow chart of a ticket processing method according to the embodiment of the present invention, where, based on the embodiment of fig. 2, when user ticket data is allocated to a message middleware, the user ticket data that needs to be processed by the message middleware can be determined according to the processing capability of the message middleware, that is, the weight, and this process will be described in connection with a specific embodiment. As shown in fig. 3, the method includes:
S301, obtaining the identification of the user to be processed, and distributing the identification of the user to be processed to a plurality of intermediate ends, so that each intermediate end respectively obtains user ticket data corresponding to the identification of the user to be processed, which is distributed and obtained from a database.
S302, obtaining user ticket data sent by each intermediate terminal.
S303, obtaining hash value intervals corresponding to the message middleware, and determining hash values corresponding to the call ticket data of each user.
In this embodiment, when user ticket data is allocated to each message middleware, that is, when determining the message middleware to which each user ticket data belongs, a hash value corresponding to each user ticket data is calculated, so that the message middleware to which each user ticket data belongs is determined by using a hash value interval to which the hash value corresponding to each user ticket data belongs.
In this embodiment, optionally, when calculating the hash value corresponding to each user call ticket data, for each user call ticket data, a key field corresponding to the user call ticket data is obtained, and hash calculation is performed on the key field to obtain the hash value corresponding to the user call ticket data.
Specifically, for each user ticket data, a key field is extracted from the user ticket data, and hash calculation is performed on the key field by using a preset hash function to obtain a hash value corresponding to the user ticket data, namely, a hash value of a user to be processed corresponding to the user ticket data.
The preset hash function is an existing hash function, and can be set according to actual requirements, and is not limited herein.
Alternatively, the key field may be a user identification, i.e. an identification of the user to be processed. Specifically, the last four digits in the user identifier may be.
In addition, alternatively, when determining the hash value interval corresponding to the message middleware, that is, when determining the hash value interval that the message middleware is responsible for, the determination may be performed in the following two ways.
In one mode, related personnel set hash value intervals corresponding to the message middleware, namely the hash value intervals in charge of the message middleware are set directly by manpower, so that quick setting of the hash value intervals is realized.
In another mode, the weight corresponding to each message middleware is obtained, and the hash value interval corresponding to each message intermediate value is determined according to the weight corresponding to each message middleware.
Specifically, the weight coefficient corresponding to each message middleware is obtained, so that the hash value interval responsible for each message middleware is determined by using the weight coefficient corresponding to each message middleware.
Further, when the hash value interval responsible for the message middleware is determined by using the weight coefficient, the hash value interval corresponding to the weight coefficient of the message middleware can be determined according to the weight hash mapping table, that is, for each message middleware, the hash value interval corresponding to the weight coefficient of the message middleware is searched from the weight Ha Xiying table, so as to obtain the hash value interval corresponding to the message middleware.
Optionally, when determining the hash value interval that the message middleware is responsible for by using the weight coefficient, setting the value space 0-9999 of the consistent hash function H, and calculating the hash value that each message middleware is responsible for according to the formula of phase (N) = Σ i=1,...,n10000*wn to obtain the hash value interval corresponding to each message middleware. Where w n represents the weight of the nth message middleware, and the number of message middleware is N.
Optionally, the weight system of the message middleware is determined according to the performance of the message middleware, that is, the terminal corresponding to the message middleware. Specifically, the related personnel or electronic equipment are distributed to the message middleware according to the back-end performance analysis report of the message middleware.
S304, for each user call ticket data, determining the message middleware to which the user call ticket data belongs according to the hash value corresponding to the user call ticket data, wherein the hash value corresponding to the user call ticket data is in the hash value interval corresponding to the message middleware to which the user call ticket data belongs.
In this embodiment, when the hash value corresponding to each user ticket data is calculated, that is, when the hash value corresponding to each user to be processed is calculated, for each user to be processed, a hash interval to which the hash value corresponding to the user to be processed belongs is determined, and a message middleware corresponding to the hash interval is determined as a message middleware for processing user ticket data of the user to be processed, so as to obtain the message middleware to which the user ticket data of the user to be processed belongs, and thus, distribution of the user ticket data is realized.
S305, distributing the user ticket data to the message middleware to which the user ticket data belongs, so that the message middleware determines the rollback user ticket data from the user ticket data distributed by the message middleware.
S306, the call ticket data of the rollback user sent by each message middleware is obtained, and all call ticket data of the rollback user are sent to the target charging system.
In the embodiment, when the user ticket data is allocated to the message middleware, the message middleware is allocated according to the weight, namely the processing capacity, of the message middleware, so that the message middleware can rapidly process the user ticket data, namely rapidly screening the rollback user ticket data from the user ticket data, thereby realizing rapid determination of the rollback user ticket data and improving the processing efficiency of the data.
Fig. 4 is a schematic structural diagram of a ticket processing apparatus according to an embodiment of the present invention, as shown in fig. 4, the ticket processing apparatus 400 includes: an information acquisition module 401 and a processing module 402.
The information obtaining module 401 is configured to obtain an identifier of a user to be processed, and allocate the identifier of the user to be processed to a plurality of intermediate ends, so that each intermediate end obtains, from a database, user ticket data corresponding to the identifier of the user to be processed, which is obtained by allocation.
And the processing module 402 is configured to obtain the user ticket data sent by each intermediate end, and distribute the user ticket data to a plurality of message middleware, so that each message middleware determines rollback user ticket data from the user ticket data obtained by the distribution.
And the processing module 402 is configured to obtain the data of the back-off user call ticket sent by each message middleware, and send all the data of the back-off user call ticket to the target charging system.
In another embodiment of the present invention, based on the embodiment shown in fig. 4, the processing module 402 is further configured to:
And acquiring a hash value interval corresponding to each message middleware, and determining a hash value corresponding to each user call ticket data.
And for each user call ticket data, determining the message middleware to which the user call ticket data belongs according to the hash value corresponding to the user call ticket data. The hash value corresponding to the user call ticket data is in the hash value interval corresponding to the message middleware to which the user call ticket data belongs.
In this embodiment, optionally, the processing module 402 is further configured to:
And for each user call ticket data, acquiring a key field corresponding to the user call ticket data, and carrying out hash calculation on the key field to obtain a hash value corresponding to the user call ticket data.
In this embodiment, optionally, the processing module 402 is further configured to:
and acquiring the weight corresponding to each message middleware, and determining a hash value interval corresponding to each message middleware value according to the weight corresponding to each message middleware.
In any embodiment, optionally, the processing module 402 is further configured to:
the user call ticket data is evenly distributed to each message middleware.
In any embodiment, optionally, the information obtaining module 401 is further configured to:
And the identification of the user to be processed is evenly distributed to each intermediate end.
The ticket processing device provided by the embodiment of the invention can realize the ticket processing method of the embodiment, and the implementation principle and the technical effect are similar, and are not repeated here.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention. As shown in fig. 5, the electronic apparatus 500 of the present embodiment includes: a processor 501 and a memory 502;
Wherein, the memory 502 is used for storing computer execution instructions;
The processor 501 is configured to execute computer-executable instructions stored in the memory to implement the steps performed by the receiving device in the above-described embodiment. Reference may be made in particular to the relevant description of the embodiments of the method described above.
Alternatively, the memory 502 may be separate or integrated with the processor 501.
When the memory 502 is provided separately, the electronic device further comprises a bus 503 for connecting said memory 502 and the processor 501.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the ticket processing method is realized.
The embodiment of the invention also provides a computer program product, comprising a computer program which realizes the ticket processing method when being executed by a processor.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the application.
It should be understood that the above Processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, a digital signal Processor (english: DIGITAL SIGNAL Processor, abbreviated as DSP), an Application-specific integrated Circuit (english: application SPECIFIC INTEGRATED Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the 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 scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. A ticket processing method, comprising:
Acquiring a plurality of identifiers of users to be processed, distributing the identifiers of the users to be processed to a plurality of intermediate ends, and enabling the identifiers of the users to be processed distributed to each intermediate end to be different, so that each intermediate end respectively acquires user ticket data corresponding to the identifiers of the users to be processed distributed from a database;
Acquiring user ticket data sent by each intermediate end, and distributing the user ticket data to a plurality of message middleware so that each message middleware can respectively determine rollback user ticket data from the user ticket data distributed by the message middleware;
and acquiring the call ticket data of the rollback user sent by each message middleware, and sending all call ticket data of the rollback user to the target charging system.
2. The method of claim 1, wherein said distributing the user ticket data to a plurality of message middleware comprises:
acquiring hash value intervals corresponding to the message middleware, and determining hash values corresponding to the call ticket data of each user;
For each user bill data, determining a message middleware to which the user bill data belongs according to a hash value corresponding to the user bill data; the hash value corresponding to the user call ticket data is in a hash value interval corresponding to the message middleware to which the user call ticket data belongs.
3. The method according to claim 2, wherein determining the hash value corresponding to each user ticket data includes:
And for each user bill data, acquiring a key field corresponding to the user bill data, and carrying out hash calculation on the key field to obtain a hash value corresponding to the user bill data.
4. The method according to claim 2, wherein the method further comprises:
and acquiring the weight corresponding to each message middleware, and determining a hash value interval corresponding to each message middleware value according to the weight corresponding to each message middleware.
5. The method of claim 1, wherein said distributing the user ticket data to a plurality of message middleware comprises:
And equally distributing the user call ticket data to each message middleware.
6. The method according to any one of claims 1 to 5, wherein said assigning the identity of the user to be processed to a plurality of intermediate ends comprises:
and the identification of the user to be processed is evenly distributed to each intermediate end.
7. A ticket processing apparatus, comprising:
The information acquisition module is used for acquiring a plurality of identifiers of the users to be processed, distributing the identifiers of the users to be processed to a plurality of intermediate ends, and enabling the identifiers of the users to be processed distributed to each intermediate end to be different, so that each intermediate end can acquire user ticket data corresponding to the identifiers of the users to be processed distributed from the database;
the processing module is used for acquiring the user ticket data sent by each intermediate end and distributing the user ticket data to a plurality of message middleware so that each message middleware can respectively determine the rollback user ticket data from the user ticket data distributed by the message middleware;
And the processing module is used for acquiring the call ticket data of the rollback user sent by each message middleware and sending all the call ticket data of the rollback user to the target charging system.
8. An electronic device, comprising: at least one processor and memory;
The memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the ticket processing method of any of claims 1 to 6.
9. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the ticket processing method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the ticket processing method of any of claims 1 to 6.
CN202110657233.9A 2021-06-11 2021-06-11 Ticket processing method and device Active CN115473968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110657233.9A CN115473968B (en) 2021-06-11 2021-06-11 Ticket processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110657233.9A CN115473968B (en) 2021-06-11 2021-06-11 Ticket processing method and device

Publications (2)

Publication Number Publication Date
CN115473968A CN115473968A (en) 2022-12-13
CN115473968B true CN115473968B (en) 2024-04-30

Family

ID=84363329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110657233.9A Active CN115473968B (en) 2021-06-11 2021-06-11 Ticket processing method and device

Country Status (1)

Country Link
CN (1) CN115473968B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708010A (en) * 2004-06-08 2005-12-14 华为技术有限公司 Charged gateway decoding error toll ticket processing method in radio communication system
CN102546189A (en) * 2010-12-07 2012-07-04 中国移动通信集团上海有限公司 Rebilling method and device for telephone bills
CN110333944A (en) * 2019-04-19 2019-10-15 中国联合网络通信集团有限公司 Call bill data method for processing business and equipment
CN112838932A (en) * 2019-11-25 2021-05-25 中国移动通信集团浙江有限公司 Re-rating method and device based on volume accumulated rating and computing equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288526A1 (en) * 2006-06-08 2007-12-13 Emc Corporation Method and apparatus for processing a database replica
US10873499B2 (en) * 2018-12-04 2020-12-22 T-Mobile Usa, Inc. Network-charging communication-failure handling

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1708010A (en) * 2004-06-08 2005-12-14 华为技术有限公司 Charged gateway decoding error toll ticket processing method in radio communication system
CN102546189A (en) * 2010-12-07 2012-07-04 中国移动通信集团上海有限公司 Rebilling method and device for telephone bills
CN110333944A (en) * 2019-04-19 2019-10-15 中国联合网络通信集团有限公司 Call bill data method for processing business and equipment
CN112838932A (en) * 2019-11-25 2021-05-25 中国移动通信集团浙江有限公司 Re-rating method and device based on volume accumulated rating and computing equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
强化计费分析确保运营收入;李华;;电信技术;20070525(第05期);全文 *
电信计费批价管理信息系统的研究;李惠林;中国优秀硕士学位论文全文数据库-信息科技辑;20140815;全文 *

Also Published As

Publication number Publication date
CN115473968A (en) 2022-12-13

Similar Documents

Publication Publication Date Title
CN111221726A (en) Test data generation method and device, storage medium and intelligent equipment
CN109313642B (en) Bill information caching method, bill information query method and terminal equipment
CN110830234B (en) User traffic distribution method and device
CN110233741B (en) Service charging method, device, equipment and storage medium
CN111061752B (en) Data processing method and device and electronic equipment
CN111722918A (en) Service identification code generation method and device, storage medium and electronic equipment
CN110570311B (en) Block chain consensus method, device and equipment
CN111159211B (en) Order information generation method, device, system, computer equipment and storage medium
CN111459919A (en) Data query method, loading assembly, search assembly and storage medium
CN110990350A (en) Log analysis method and device
CN110807035A (en) Serial number generation method, device, equipment and storage medium
CN114398520A (en) Data retrieval method, system, device, electronic equipment and storage medium
CN115473968B (en) Ticket processing method and device
CN110377276B (en) Source code file management method and device
CN109618070B (en) Call bill charging method, device, equipment and medium
CN109842482B (en) Information synchronization method, system and terminal equipment
CN106156169B (en) Discrete data processing method and device
CN108256839B (en) Numerical resource rollback method, device, server and storage medium
CN114169451A (en) Behavior data classification processing method, device, equipment and storage medium
CN113419792A (en) Event processing method and device, terminal equipment and storage medium
CN113836145A (en) Method and device for requesting data, electronic equipment and computer-readable storage medium
CN109547526B (en) Message pushing method, computer readable storage medium and server
CN112734543A (en) Accounting processing method and device, computer equipment and storage medium
CN112256689A (en) Service data cleaning method and device and electronic equipment
CN113361891B (en) Data acquisition method and device

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