Disclosure of Invention
The invention mainly aims to provide a ticket checking method, ticket checking equipment and a computer readable storage medium, which aim to achieve the effect of improving the effectiveness of the evaluation of the experience of an operator to a user.
In order to achieve the above object, the present invention provides a ticket checking method, which includes the following steps:
acquiring key fields and preset field combinations of the to-be-checked repeated ticket association corresponding to the current period;
generating an initial key field combination based on the preset field combination and the key field;
determining a risk coefficient corresponding to each initial key field combination according to a preset key field duplicate checking risk coefficient function model;
Selecting a target key field combination from the initial key field combinations according to the risk coefficient;
and performing ticket checking on the to-be-checked repeated ticket corresponding to the current period based on the target key field combination.
Optionally, before the step of determining the risk coefficient corresponding to each initial key field combination according to the preset key field duplicate risk coefficient function model, the method further includes:
Acquiring a first parameter estimation result corresponding to the previous period and first system observation information;
calculating a Kalman gain according to the first parameter estimation result and the first system observation information;
determining an optimization parameter according to the Kalman gain and the system measurement parameter corresponding to the current period;
And carrying out parameter optimization on the preset critical field weight checking risk coefficient function model according to the optimization parameters.
Optionally, after the step of calculating the kalman gain according to the first parameter estimation result and the first system observation information, the method further includes:
and determining a second parameter estimation result and second system observation information corresponding to the next period according to the Kalman gain and the system measurement parameters corresponding to the current period, and storing the second parameter estimation result and the second system observation information.
Optionally, the step of performing ticket checking on the to-be-checked heavy ticket corresponding to the current period based on the target key field combination includes:
Determining a first ticket information abstract corresponding to the prior ticket and a second ticket information abstract corresponding to the to-be-checked repeated ticket based on the target key field combination;
and determining whether the to-be-checked repeated call ticket is the repeated call ticket according to the first call ticket information abstract and the second call ticket information abstract.
Optionally, the step of determining the first ticket information abstract corresponding to the prior ticket and the second ticket information abstract corresponding to the to-be-checked repeated ticket based on the target key field combination includes:
Determining index information corresponding to the prior ticket according to the target key field combination;
Calculating a character string corresponding to the index information through the SHA1 algorithm by taking the index information as an input parameter of a secure hash algorithm SHA1, taking the character string as the first ticket information abstract, and
And calculating the second ticket information abstract corresponding to the to-be-checked heavy ticket through the SHA1 algorithm based on the target key field combination.
Optionally, after the step of performing ticket checking on the to-be-checked heavy ticket corresponding to the current period based on the target key field combination, the method further includes:
Determining a normal ticket according to the ticket check result, and carrying out rating treatment on the normal ticket;
acquiring the rating amount of the normal ticket after rating treatment;
And checking the ticket again for the normal ticket after the rating treatment according to the rating amount and the target key field combination so as to determine whether repeated rating tickets exist.
Optionally, when the normal ticket is subjected to the rating treatment, a token bucket mechanism is adopted to carry out the rating ticket treatment.
In addition, in order to achieve the above purpose, the present invention also provides a ticket checking device, which includes a memory, a processor, and a ticket checking program stored in the memory and capable of running on the processor, wherein the ticket checking program implements the steps of the ticket checking method as described above when being executed by the processor.
In addition, to achieve the above object, the present invention also provides a ticket checking apparatus including:
The acquisition module is used for acquiring key fields and preset field combinations of the to-be-checked repeated ticket association corresponding to the current period;
The generation module is used for generating an initial key field combination based on the preset field combination and the key field;
the calculation module is used for determining a risk coefficient corresponding to each initial key field combination according to a preset key field duplicate checking risk coefficient function model;
A selection module, configured to select a target key field combination from the initial key field combinations according to the risk coefficient;
And the duplicate checking module is used for checking the ticket duplicate of the to-be-checked ticket corresponding to the current period based on the target key field combination.
In addition, in order to achieve the above object, the present invention also provides a computer readable storage medium having a ticket checking program stored thereon, which when executed by a processor, implements the steps of the ticket checking method as described above.
According to the ticket checking method, the ticket checking equipment and the computer readable storage medium, key fields and preset field combinations corresponding to the current period and related to the to-be-checked repeated ticket are obtained, initial key field combinations are generated based on the preset field combinations and the key fields, risk coefficients corresponding to the initial key field combinations are determined according to a preset key field checking risk coefficient function model, a target key field combination is selected from the initial key field combinations according to the risk coefficients, and finally ticket checking is performed on the to-be-checked repeated ticket corresponding to the current period based on the target key field combination. Because the optimal key field combination can be automatically selected according to the actual ticket situation, the ticket checking efficiency is improved.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, fig. 1 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the control terminal may include a processor 1001, such as a CPU, a network interface 1003, a memory 1004, and a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The network interface 1003 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1004 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1004 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, and a ticket check program may be included in the memory 1004, which is a type of computer storage medium.
In the terminal shown in fig. 1, the processor 1001 may be configured to call a ticket check program stored in the memory 1004, and perform the following operations:
acquiring key fields and preset field combinations of the to-be-checked repeated ticket association corresponding to the current period;
generating an initial key field combination based on the preset field combination and the key field;
determining a risk coefficient corresponding to each initial key field combination according to a preset key field duplicate checking risk coefficient function model;
Selecting a target key field combination from the initial key field combinations according to the risk coefficient;
and performing ticket checking on the to-be-checked repeated ticket corresponding to the current period based on the target key field combination.
Further, the processor 1001 may call a ticket check re-program stored in the memory 1004, and further perform the following operations:
Acquiring a first parameter estimation result corresponding to the previous period and first system observation information;
calculating a Kalman gain according to the first parameter estimation result and the first system observation information;
determining an optimization parameter according to the Kalman gain and the system measurement parameter corresponding to the current period;
And carrying out parameter optimization on the preset critical field weight checking risk coefficient function model according to the optimization parameters.
Further, the processor 1001 may call a ticket check re-program stored in the memory 1004, and further perform the following operations:
and determining a second parameter estimation result and second system observation information corresponding to the next period according to the Kalman gain and the system measurement parameters corresponding to the current period, and storing the second parameter estimation result and the second system observation information.
Further, the processor 1001 may call a ticket check re-program stored in the memory 1004, and further perform the following operations:
Determining a first ticket information abstract corresponding to the prior ticket and a second ticket information abstract corresponding to the to-be-checked repeated ticket based on the target key field combination;
and determining whether the to-be-checked repeated call ticket is the repeated call ticket according to the first call ticket information abstract and the second call ticket information abstract.
Further, the processor 1001 may call a ticket check re-program stored in the memory 1004, and further perform the following operations:
Determining index information corresponding to the prior ticket according to the target key field combination;
Calculating a character string corresponding to the index information through the SHA1 algorithm by taking the index information as an input parameter of a secure hash algorithm SHA1, taking the character string as the first ticket information abstract, and
And calculating the second ticket information abstract corresponding to the to-be-checked heavy ticket through the SHA1 algorithm based on the target key field combination.
Further, the processor 1001 may call a ticket check re-program stored in the memory 1004, and further perform the following operations:
Determining a normal ticket according to the ticket check result, and carrying out rating treatment on the normal ticket;
acquiring the rating amount of the normal ticket after rating treatment;
And checking the ticket again for the normal ticket after the rating treatment according to the rating amount and the target key field combination so as to determine whether repeated rating tickets exist.
The existing billing and settlement ticket warehousing generally comprises ticket collection, decoding, analysis, pricing and warehousing. Because of considering repeated collection caused by network problems and other reasons, the repeated collection is carried out on the dialogue list after analysis link, and the main flow is shown in figure 2. The ticket collecting and decoding module is used for collecting original tickets generated by network elements of different manufacturers, and converting the original tickets according to a set rule to form an internal ticket in a standard format. And the service analysis module combines the enumerated values of the fields in the ticket into an expression (expression) through separation fields, and all the tickets have a unique expression correspondence. After the various business bill scenes are processed through business analysis by the expression, the business bill scenes are abstracted into expr _id values one by one, and then the expr _id values are filled in a detail condition_id field to be output, and then the detail condition_id field is transmitted to a subsequent rating processing call. The check and repeat module stores the total call ticket index information through check and repeat MDB (memory database) and provides an interface for checking and updating prior call ticket index. And the rating module is combined with the subscription information of the user, and rating is carried out according to the agreed rate dialogue list, so that the charging and settlement updating of the original dialogue list of the user are completed.
As the service types and the service amount of operators are increased, the traditional ticket checking method can not meet the ticket price mode in the existing high concurrency scene, and the concurrency can not take effect to cause checking backlog easily. In the related art, when a conversation sheet is required to be checked, manual check and repeat searching is usually adopted to select check and repeat searching from a large number of conversation sheet fields, and the optimal key field combination cannot be automatically selected according to the actual conversation sheet condition, so that the efficiency of checking and repeat of the conversation sheet is lower. In addition, the manually designed check-up field cannot reach the optimum, and redundancy or deficiency exists, wherein the redundancy check-up field occupies a memory database and also causes low check-up efficiency. However, the lack of the duplication checking field may result in insufficient duplication checking accuracy, and finally, repeated price approval may be caused, thereby causing customer complaints of billing or settlement.
In order to solve the defects of the related technology, the ticket duplication checking method is provided, and from the perspective of improving ticket duplication checking efficiency and price accuracy, key index fields can be optimally selected on the premise of a certain memory, so that the ticket duplication checking accuracy and ticket processing timeliness are realized.
The call ticket check method provided by the invention is further explained by a specific embodiment.
In one embodiment, referring to fig. 2, the ticket checking method includes the following steps:
step S10, acquiring key fields and preset field combinations of the to-be-checked repeated ticket association corresponding to the current period;
step S20, generating an initial key field combination based on the preset field combination and the key field;
Step S30, determining a risk coefficient corresponding to each initial key field combination according to a preset key field duplicate risk coefficient function model;
Step S40, selecting a target key field combination from the initial key field combinations according to the risk coefficient;
And step S50, performing ticket check on the to-be-checked repeated ticket corresponding to the current period based on the target key field combination.
In this embodiment, an aging period corresponding to the check and repeat analysis may be set. For example, for a large traffic volume, the failure period may be set to 1 day. The aging period may also be set to 1 week when the traffic is small. Alternatively, the aging period may be set to N days, depending on the buffering and/or computing capabilities of the system. The period length of the aging period can be set in a self-defined mode according to the system requirements. The present embodiment is not particularly limited thereto.
Further, key fields and preset field combinations of the to-be-checked repeated ticket association corresponding to the current period can be obtained. It is understood that the key field of the to-be-checked heavy ticket association may refer to the total key field of the to-be-checked heavy ticket association. The preset field combination is preset and comprises one or more field combinations of key fields. Wherein, the preset field is a custom field combination. For example, the roaming traffic CNGO file may select the subscriber number |start time| roaming traffic value as its corresponding preset field combination.
After obtaining the key field and the preset field combination of the to-be-checked repeated ticket association corresponding to the current period, generating a plurality of initial key field combinations according to the key field of the to-be-checked repeated ticket association based on the preset field combination. On the basis of the preset combined field, selecting one or more new key fields from the key fields associated with the to-be-checked repeated telephone bill each time, and adding the selected new key fields into the preset combined field to form an initial key field combination.
Exemplary, based on the preset combined field X 0, a new key field not included in X 0 and X 0 are selected to form an initial key field combination X 1, and then based on X 1, a new key field not included in X 1 and X 1 are selected to form an initial key field combination X 2. And so on until an initial key field combination X n is generated that contains the full amount of key fields.
Further, after determining the initial key field combinations, risk coefficients corresponding to each initial key field combination can be determined according to a preset key field duplicate risk coefficient function model.
It will be appreciated that, as an embodiment, the steps S20 and S30 may also be performed simultaneously. I.e., each time an initial key field combination is generated, the risk factor corresponding to that initial key field combination is determined.
Further, after determining risk factors corresponding to the initial key field combinations, an optimal key field combination can be selected from the initial key field combinations according to the risk factors to serve as a target key field combination.
For example, the optimal key field of the current period may be confirmed on the basis of minimizing the risk coefficient. For example, the risk coefficient mean σ and standard deviation μ corresponding to each initial key field combination may be taken one by one, and the variation coefficient C.V may be calculated according to the following formula:
C.V=σ/μ
and further, based on the variation coefficient, determining an initial key field combination with the minimum risk coefficient as a target key field combination. And then, performing ticket checking on the to-be-checked repeated ticket corresponding to the current period based on the target key field combination.
Optionally, when the ticket is re-checked for the to-be-checked-for-repeated ticket corresponding to the current period based on the target key field combination, a first ticket information abstract corresponding to an priori ticket and a second ticket information abstract corresponding to the to-be-checked-for-repeated ticket may be determined based on the target key field combination, and then whether the to-be-checked-for-repeated ticket is the repeated ticket is determined according to the first ticket information abstract and the second ticket information abstract.
When determining the first ticket information abstract corresponding to the prior ticket and the second ticket information abstract corresponding to the to-be-checked repeated ticket based on the target key field combination, the method can determine the index information corresponding to the prior ticket according to the target key field combination, then calculate the character string corresponding to the index information through the SHA1 algorithm by taking the index information as the input parameter of the secure hash algorithm SHA1, and use the character string as the first ticket information abstract, and calculate the second ticket information abstract corresponding to the to-be-checked repeated ticket through the SHA1 algorithm based on the target key field combination.
For example, index information corresponding to the target key field combination of the prior ticket may be extracted as input information, and then the input information may be processed. The processing of the input information may include filling length information of the information message, processing of the information packet, and initializing the buffer memory. Because SHA1 uses a 160-bit message digest, 5 linking variables are required.
And then, calculating a character string corresponding to the index information, namely a first ticket information abstract, based on an SHA1 algorithm. And storing the first ticket information abstract of the prior ticket in the current period by searching the MDB memory database.
And further, for the newly input ticket, based on the same mode, calculating the corresponding second ticket information abstract through the SHA1 algorithm. And eliminating the user ticket without rating according to the user data MDB, and comparing the ticket information abstract of the remaining newly input ticket with the prior ticket in the MDB (namely, comparing the first ticket information abstract with the second ticket information abstract). And then determining the repeated ticket and the non-repeated ticket according to the comparison result.
Alternatively, after determining the repeated ticket and the non-repeated ticket, the non-repeated ticket may be used as a normal ticket, and the normal ticket may be subjected to rating processing. And then, acquiring the rating amount of the normal ticket after rating, and checking the ticket again according to the rating amount and the target key field combination to determine whether repeated rating tickets exist. And combining the rating amount and the target key field combination into a new rechecking key field combination, and then checking the rated ticket based on the rechecking key field combination. Thereby further determining whether there are duplicate rating tickets.
Optionally, in order to prevent concurrent processing failure during high-traffic ticket volume processing, a token bucket mechanism is used for ticket rating processing. Wherein the token bucket approach refers to filling the internal memory pool at a given rate, tokens, i.e., virtual packets. The working procedure comprises the following steps:
a. putting a ticket file to be processed into a token bucket-internal storage pool according to a specific rate, classifying services according to a matching rule ticket, and setting ticket priority;
b. and the ticket file conforming to the matching rule enters a token bucket storage pool for processing. When enough tokens exist in the storage pool, the token can be continuously processed and put in storage, and meanwhile, the token amount in the token bucket is correspondingly reduced according to the size of the file;
c. When the tokens in the storage pool are insufficient, the tokens are processed according to the priority of the files, and meanwhile, when the concurrent processing of the system fails, the system is used for preventing the file backlog from allowing burst transmission, so that the purpose of stabilizing the processing is achieved.
Optionally, when the received ticket is determined to be a repeated ticket according to a comparison result of the first ticket information abstract and the second ticket information abstract, the ticket adding key field of the same information abstract in the reverse checking cache MDB can be checked to be compared, if the fields are inconsistent, a reverse recovery rating request is initiated to perform rating processing on the misjudged ticket.
Optionally, referring to fig. 4, as an alternative embodiment, before step S30, the method further includes:
Step S60, obtaining a first parameter estimation result and first system observation information corresponding to the previous period;
step S70, calculating Kalman gain according to the first parameter estimation result and the first system observation information;
step S80, determining optimization parameters according to the Kalman gain and the system measurement parameters corresponding to the current period;
Step S90, performing parameter optimization on the preset critical field weight risk factor function model according to the optimization parameters
In this embodiment, the first parameter estimation result and the first system observation information corresponding to the previous period may be obtained first, and then the kalman gain K T may be calculated according to the following formula:
Wherein, For the covariance matrix of the parameter estimation result theta T-1 (i.e. the first parameter estimation result) of the previous period,Observing information for the system of the previous periodFirst order inverse of (i.e., first system observations), covariance of measured noise.
Further, after the kalman gain K T is currently determined, the system measurement parameter corresponding to the current period may be calculated according to the following formula to determine the optimization parameter θ T:
Wherein, Parameters are measured for the system corresponding to the current period,Is the first order reciprocal of thetat.
It can be understood that, in order to construct the kalman filter, to realize the purpose of auto-regressively updating the risk parameters of the next stage by the prior demand parameters step by step, the covariance matrix P T of the parameter estimation result corresponding to the next period and the system observation information Z T can be calculated according to the following formula.
Wherein the method comprises the steps ofIn order to measure the noise of the light,Is the first order reciprocal of PT.
In the technical scheme disclosed in this embodiment, key fields and preset field combinations corresponding to a current period of to-be-checked repeated telephone bill are acquired first, then an initial key field combination is generated based on the preset field combinations and the key fields, further, a risk coefficient corresponding to each initial key field combination is determined according to a preset key field repeated risk factor function model, a target key field combination is selected in the initial key field combination according to the risk coefficient, and finally, the telephone bill to-be-checked repeated telephone bill corresponding to the current period is checked based on the target key field combination. Because the optimal key field combination can be automatically selected according to the actual ticket situation, the ticket checking efficiency is improved.
In addition, the embodiment of the invention also provides a ticket checking equipment, which comprises a memory, a processor and a ticket checking re-program which is stored in the memory and can run on the processor, wherein the ticket checking re-program realizes the steps of the ticket checking re-method in each embodiment when being executed by the processor.
In addition, referring to fig. 5, an embodiment of the present invention further provides a ticket checking and resetting device 100, where the ticket checking and resetting device 100 includes:
The obtaining module 101 is configured to obtain a key field and a preset field combination associated with a to-be-checked repeat ticket corresponding to a current period;
A generating module 102, configured to generate an initial key field combination based on the preset field combination and the key field;
a calculation module 103, configured to determine a risk coefficient corresponding to each initial key field combination according to a preset key field duplicate checking risk coefficient function model;
A selection module 104, configured to select a target key field combination from the initial key field combinations according to the risk coefficient;
And the check and repeat module 105 is configured to perform ticket check and repeat on the to-be-checked and repeated ticket corresponding to the current period based on the target key field combination.
In addition, the embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a ticket checking program which realizes the steps of the ticket checking method in the above embodiments when being executed by a processor.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising several instructions for causing a ticket checking device (e.g. server) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.