CN110019271A - Data consistency detection, device, equipment and computer storage medium - Google Patents

Data consistency detection, device, equipment and computer storage medium Download PDF

Info

Publication number
CN110019271A
CN110019271A CN201711395044.9A CN201711395044A CN110019271A CN 110019271 A CN110019271 A CN 110019271A CN 201711395044 A CN201711395044 A CN 201711395044A CN 110019271 A CN110019271 A CN 110019271A
Authority
CN
China
Prior art keywords
data
group
detection
index
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711395044.9A
Other languages
Chinese (zh)
Inventor
陈海龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Chongqing Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Chongqing 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 Mobile Communications Group Co Ltd, China Mobile Group Chongqing Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201711395044.9A priority Critical patent/CN110019271A/en
Publication of CN110019271A publication Critical patent/CN110019271A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data consistency detection, device, equipment and computer storage mediums.Wherein, which includes: reception data to be tested, and data to be tested are divided into multiple data groups;For data group distribution index;The data group for needing to carry out fragment compression according to indexed search carries out fragment compression to data in organizing;The compressed data to be tested of fragment are converted into Detection task according to the subscription list of dynamic generation, and will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection.According to embodiments of the present invention, by by data grouping and establishing index, the detection processing to each data is avoided, to reduce the data volume that need to be detected;By carrying out fragment compression to data in organizing, solves the problems, such as fragmentation of data;By subscription/publication mechanism, the whole process recording and tracking of trade identity detection is realized, while promoting the scalability of detection system.

Description

Data consistency detection, device, equipment and computer storage medium
Technical field
The invention belongs to field of data processing systems more particularly to a kind of data consistency detection, data consistencies Detection device, computer equipment and computer storage medium.
Background technique
All transaction can all generate data.The effect of data is the core composition as transaction first, directly determines to hand over Easy success or failure quality, followed by as a part of transaction log, ex-post analysis and inspection for quality of trading.For because same One transaction generates, and similar but different with propagation path using the object data of characteristic, we are normally referred to as homologous reducing number According to.
When data are as transaction log a part, when inspection for quality of trading, it is therefore an objective to data exception is found in time, Avoiding data is more than the limitation of rule.The core of transaction quality inspection is the consistency detection of transaction data, existing general detection There are two types of methods: one is transaction log is handled, the second is transaction log reconciliation again.The mode that transaction log is reformed is to trade ETL module (ETL refers to that Extract is extracted, Transform is converted, Load is loaded) is completed to mention daily record data in time after the completion It takes, parse and formats, weight processing module is based on the data snapshot for start time of trading, one by one to daily record data according to friendship Easily rule is handled again, finally the real data snapshot of final data and transaction finish time more generated than heavier processing, with Determine the consistency of data, the data consistency detection of the types such as usual bank account, credit balance mostly uses this method.It hands over The mode of easy log reconciliation is that log ETL module is simultaneously to the log number of transaction originating end and actuating station of trading after the completion of transaction According to extracting, parsing and formatting, reconciliation module compares this two parts of daily record datas one by one, determines data one according to comparison result Cause property, the data consistency detection of the types such as rechargeable card, the remote network access record of usual telecom operators and online game Mostly use this method.
With the fast development of business and technology, the transaction of the types such as high-frequency, peak value is more and more, transaction data Become more fragmentation, transaction log amount amplification is huge.For example, the second in electric business field kill can be generated in business very short time it is hundreds of Ten thousand grades of log, the quantity amplification that 4G network popularizes the equal data charge on traffic ticket of descendant is more than 30 times, Real-time charging messages Quantity amplification is even more more than 100 times.
Transaction data consistency detecting method in the related technology, either transaction log handle again or transaction log pair Account, basic principle are all to be handled according to business rule and detection logic transaction log data one by one.Such scheme faces Common issue be that can not successfully manage the huge amplification of data first, often can only be by business scenario caused by data It is segmented, the data volume that single batch need to be handled is reduced with this, scalability is poor;Followed by cause to count in face of high frequency transaction According to the actual conditions of fragmentation, it could not effectively accomplish the fragmentation that goes of data, system resource spent by consistency detection and institute Data volume to be treated mismatches.Although the application of the technologies such as cloud computing may insure the sufficient to meet one of system resource Demand of the cause property detection to system resource, but the service logic complexity of consistency detection can be also greatly increased simultaneously.
Summary of the invention
The embodiment of the present invention provides a kind of data consistency detection, device, equipment and computer storage medium, passes through Data to be tested are grouped and establish index, consistency detection is carried out to data group respectively, avoids the inspection to each data Survey processing, to reduce the data volume that need to be detected;By carrying out fragment compression to data in organizing, solves fragmentation of data Problem;By subscription/publication mechanism, the whole process recording and tracking of trade identity detection is realized, while promoting detection system The scalability of system.
On the one hand, the embodiment of the present invention provides a kind of data consistency detection, comprising: data to be tested are received, it will Data to be tested are divided into multiple data groups;For data group distribution index;Need to carry out the data of fragment compression according to indexed search Group carries out fragment compression to data in organizing;The compressed data to be tested of fragment are converted according to the subscription list of dynamic generation For Detection task, and it will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection.
With reference to first aspect, in the first embodiment of first aspect, data to be tested are divided into multiple data groups, Specifically: data to be tested are divided into multiple original data sets according to dimension;And according to data carry rules by original data set It is split as integer numerical value group and non-integer values group.
With reference to first aspect, in second of embodiment of first aspect, index includes that publicly-owned section of index and index are private There is section;Wherein indexing publicly-owned section includes following at least any one or combinations thereof: transaction id, period, class of service;It indexes privately owned Section include it is following any one of at least or combinations thereof: data source category, number, records number in group at timestamp.
With reference to first aspect, it in the third embodiment of first aspect, is needed to carry out fragment pressure according to indexed search The data group of contracting carries out fragment compression to data in organizing, specifically: need to carry out fragment compression according to publicly-owned section of retrieval of index Data group;It adds up to the data in integer numerical value group;It adds up to the data in non-integer values group, and according to data The integer numerical part of accumulation result is added to integer numerical value group by carry rules.
With reference to first aspect, in the 4th kind of embodiment of first aspect, this method further include: gone through according to search index History associated data group, when inquiring historical context data group, according to Indexed Dependencies relationship, by the number in historical context data group According to being added to corresponding integer numerical value group and non-integer values group respectively, and fragment compression is carried out again.
With reference to first aspect, in the 5th kind of embodiment of first aspect, this method further include: according to consistency detection Testing result, update subscription list, subscribing relationship and Detection task life state and life cycle.
With reference to first aspect, in the 6th kind of embodiment of first aspect, testing result includes following at least any one: Consistent but transaction does not finish, inconsistent and transaction does not finish, trading has finished, traded extremely;Life state includes at least any : silencing, waiting, active, failure;Life cycle is the time-to-live of Detection task.
On the other hand, the embodiment of the invention provides a kind of data consistency detection devices, comprising: grouping module is used for Data to be tested are received, data to be tested are divided into multiple data groups;Index module, for being data group distribution index;Fragment Compression module carries out fragment compression to data in organizing for needing to carry out the data group of fragment compression according to indexed search;Unanimously Property detection module, for complete integration after, according to subscription list generate Detection task, and according to subscribing relationship will test task hair Cloth carries out consistency detection to corresponding detection node.
In another aspect, the embodiment of the invention provides a kind of computer equipments, comprising: processor and be stored with computer The memory of program instruction;Processor realizes the number such as any one of first aspect embodiment when executing computer program instructions According to consistency detecting method.
In another aspect, being stored in computer storage medium the embodiment of the invention provides a kind of computer storage medium Computer program instructions realize the number such as any one of first aspect embodiment when computer program instructions are executed by processor According to consistency detecting method.
Data consistency detection, device, equipment and the computer storage medium of the embodiment of the present invention, by will be to be checked Measured data is grouped and establishes index, carries out consistency detection to data group respectively, avoids the detection processing to each data, To reduce the data volume that need to be detected.In some embodiments, by carrying out fragment compression to data in organizing, data are solved The problem of fragmentation.In some embodiments, by subscription/publication mechanism, the whole process note of trade identity detection is realized Record and tracking, while promoting the scalability of detection system.In some embodiments, index is formed by publicly-owned section and privately owned section, Publicly-owned section of responsible data group association control is indexed, privately owned section of responsible unique identification data group is indexed, avoids to index and establish to single Data can save system resource, promote search efficiency.Using business datum carry principle by data sectional, and by each section Data add up respectively to be merged, and finally reduces the data volume that end link need to be handled, solves the problems, such as fragmentation of data, moreover it is possible to It is enough accurately to realize Data Detection control.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described, for those of ordinary skill in the art, without creative efforts, also Other drawings may be obtained according to these drawings without any creative labor.
Fig. 1 is the flow diagram of data consistency detection provided by one embodiment of the present invention;
Fig. 2 is the flow diagram for the data consistency detection that another embodiment of the present invention provides;
Fig. 3 is the flow diagram for the data consistency detection that further embodiment of the present invention provides;
Fig. 4 is the flow diagram for the data consistency detection that further embodiment of the present invention provides;
Fig. 5 is the flow diagram for the data consistency detection that further embodiment of the present invention provides;
Fig. 6 is the schematic block diagram of data consistency detection device provided by one embodiment of the present invention;
Fig. 7 is the schematic block diagram for the data consistency detection device that another embodiment of the present invention provides;
Fig. 8 is the schematic diagram for the data consistency detection device that further embodiment of the present invention provides;
Fig. 9 is the structural schematic diagram of computer equipment provided by one embodiment of the present invention.
Specific embodiment
The feature and exemplary embodiment of various aspects of the invention is described more fully below, in order to make mesh of the invention , technical solution and advantage be more clearly understood, below in conjunction with drawings and the specific embodiments, the present invention is carried out further detailed Description.It should be understood that specific embodiment described herein is only configured to explain the present invention, it is not configured as limiting this hair It is bright.To those skilled in the art, the present invention can be in the case where not needing some details in these details Implement.The description of embodiment is preferably managed just for the sake of being provided by showing example of the invention of the invention below Solution.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence " including ... ", it is not excluded that including There is also other identical elements in the process, method, article or equipment of the element.
In order to solve prior art problem, the embodiment of the invention provides a kind of data consistency detection, device, set Standby and computer storage medium.Data consistency detection is provided for the embodiments of the invention first below to be introduced.
Fig. 1 shows the flow diagram of data consistency detection provided by one embodiment of the present invention.Such as Fig. 1 institute Show, which includes:
Step 102, data to be tested are received, data to be tested are divided into multiple data groups;
It step 104, is data group distribution index;
Step 106, the data group for needing to carry out fragment compression according to indexed search carries out fragment compression to data in organizing;
Step 108, the compressed data to be tested of fragment are converted to by Detection task according to the subscription list of dynamic generation, And will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection.
The data consistency detection of the embodiment of the present invention, by the way that data to be tested to be grouped to and established index, respectively Consistency detection is carried out to data group, the detection processing to each data is avoided, to reduce the data volume that need to be detected; By carrying out fragment compression to data in organizing, solves the problems, such as fragmentation of data;By subscription/publication mechanism, friendship is realized The whole process recording and tracking of easy consistency detection, while promoting the scalability of detection system.
Fig. 2 shows the flow diagrams for the data consistency detection that another embodiment of the present invention provides.Such as Fig. 2 Shown, which includes:
Step 202, data to be tested are received, data to be tested are divided into multiple original data sets according to dimension, and according to Original data set is split as integer numerical value group and non-integer values group by data carry rules;
It step 204, is data group distribution index;
Step 206, the data group for needing to carry out fragment compression according to indexed search carries out fragment compression to data in organizing;
Step 208, the compressed data to be tested of fragment are converted to by Detection task according to the subscription list of dynamic generation, And will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection.
In this embodiment, to the data to be tested received according to transaction id, period, class of service, data source class The dimensions such as not are grouped, and original data set is then split as integer numerical value group and non-integer according to business datum carry rules Numerical value group is merged by that will organize interior each segment data and add up respectively, finally reduces the data volume that end link need to be handled, solve The problem of fragmentation of data, additionally it is possible to accurately realize Data Detection control.
In one embodiment of the invention, it is preferable that index includes publicly-owned section of index and privately owned section of index;Wherein index Publicly-owned section includes following at least any one or combinations thereof: transaction id, period, class of service;Index privately owned section include with down toward Any one of few or combinations thereof: data source category, number, records number in group at timestamp.
In this embodiment, data are adopted as and establish data group, distribute one by publicly-owned section and privately owned to every group of data The unique index ID of Duan Zucheng.Wherein, publicly-owned segment index by any one of information such as transaction id, period, class of service or its Group is combined into, and for realizing the association control between data group, privately owned section in data source category, timestamp, number, group by recording Any one of information such as number or combinations thereof avoid to index foundation to single for identifying the uniqueness of each data group Data can save system resource, promote search efficiency.
Fig. 3 shows the flow diagram for the data consistency detection that further embodiment of the present invention provides.Such as Fig. 3 Shown, which includes:
Step 302, data to be tested are received, data to be tested are divided into multiple original data sets according to dimension, and according to Original data set is split as integer numerical value group and non-integer values group by data carry rules;
It step 304, is data group distribution index;
Step 306, the data group for needing to carry out fragment compression is retrieved according to publicly-owned section of index;
Step 308, it adds up to the data in integer numerical value group in organizing;
Step 310, it adds up to the data in non-integer values group in organizing, and according to data carry rules by cumulative knot The integer numerical part of fruit is added to integer numerical value group, and non-integer values part continues to retain;
Step 312, the compressed data to be tested of fragment are converted to by Detection task according to the subscription list of dynamic generation, And will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection.
In this embodiment, fragment compression in group is carried out first, i.e., integer numerical value group in organizing directly is merged cumulative; The merging accumulation result of non-integer values group need to be further processed according to the carry rules of business datum, specifically, will tire out The integer numerical part of result is added to be added to associated integer numerical value group, and non-integer numerical part continues to retain.The present invention Embodiment, by will organize interior each segment data respectively add up merge, finally reduce the data volume that end link need to be handled, solve The problem of fragmentation of data, additionally it is possible to accurately realize Data Detection control.
Fig. 4 shows the flow diagram for the data consistency detection that further embodiment of the present invention provides.Such as Fig. 4 Shown, which includes:
Step 402, data to be tested are received, data to be tested are divided into multiple original data sets according to dimension, and according to Original data set is split as integer numerical value group and non-integer values group by data carry rules;
It step 404, is data group distribution index;
Step 406, the data group for needing to carry out fragment compression is retrieved according to publicly-owned section of index;
Step 408, it adds up to the data in group integer numerical value group;
Step 410, it adds up to the data in non-integer values group in organizing, and according to data carry rules by cumulative knot The integer numerical part of fruit is added to integer numerical value group, and non-integer values part continues to retain;
Step 412, according to search index historical context data group, when inquiring historical context data group, according to index Data in historical context data group are added to corresponding integer numerical value group and non-integer values group by dependence respectively, into The cumulative merging of data between row group;
Step 414, the compressed data to be tested of fragment are converted to by Detection task according to the subscription list of dynamic generation, And will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection.
In this embodiment, the inquiry of historical context data group is initiated by index (preferably passing through publicly-owned section of index segment) Request, when there are historical context data group, need to be added to respectively historical data corresponding integer numerical value group and non-integer number Value group carries out fragment compression again.By the cumulative merging in organizing between group, the consistency inspection of data group is then carried out respectively It surveys, avoids the detection processing to each data, to reduce the data volume that need to be detected, the compression of this crumb data is closed And method needs to protect.
Fig. 5 shows the flow diagram for the data consistency detection that further embodiment of the present invention provides.Such as Fig. 5 Shown, which includes:
Step 502, data to be tested are received, data to be tested are divided into multiple original data sets according to dimension, and according to Original data set is split as integer numerical value group and non-integer values group by data carry rules;
It step 504, is data group distribution index;
Step 506, the data group for needing to carry out fragment compression is retrieved according to publicly-owned section of index, to the data of integer numerical value group It adds up;It adds up to the data of non-integer values group, and according to data carry rules by the integer numerical value of accumulation result Part is added to integer numerical value group, and non-integer values part continues to retain;
Step 508, according to search index historical context data group, when inquiring historical context data group, according to index Data in historical context data group are added to corresponding integer numerical value group and non-integer values group by dependence respectively, into The cumulative merging of data between row group;
Step 510, the compressed data to be tested of fragment are converted to by Detection task according to the subscription list of dynamic generation, And will test task according to subscribing relationship and be published to corresponding detection node, carry out consistency detection;
Step 512, according to the testing result of consistency detection, the life of subscription list, subscribing relationship and Detection task is updated Life state and life cycle.
In this embodiment, according to the testing result of consistency detection, subscription list and Detection task life state are updated And life cycle, wherein testing result includes consistent but transaction does not finish, inconsistent and transaction does not finish, trading has finished, handed over Easily abnormal to wait four kinds, life state includes silencing, waiting, active, failure etc., and life cycle is the time-to-live of each task, It solves the problems, such as the data tracking of Long routine type transaction, realizes the consistency detection closed-loop control in transaction.
Fig. 6 shows the schematic block diagram of data consistency detection device provided by one embodiment of the present invention.Such as Fig. 6 institute Show, which includes:
Data to be tested are divided into multiple data groups for receiving data to be tested by grouping module 602;
Index module 604, for being data group distribution index;
Fragment compression module 606, for needing to carry out the data group of fragment compression according to indexed search, to organize in data into The compression of row fragment;
Consistency detection module 608 generates Detection task according to subscription list, and according to subscription after completing integration Relationship will test task and be published to corresponding detection node, carry out consistency detection.
The data consistency detection device of the embodiment of the present invention, by the way that data to be tested to be grouped to and established index, respectively Consistency detection is carried out to data group, the detection processing to each data is avoided, to reduce the data volume that need to be detected; By carrying out fragment compression to data in organizing, solves the problems, such as fragmentation of data;By subscription/publication mechanism, friendship is realized The whole process recording and tracking of easy consistency detection, while promoting the scalability of detection system.
In one embodiment of the invention, it is preferable that grouping module 602 is specifically used for, and receives data to be tested, according to Data to be tested are divided into multiple original data sets by dimension, and original data set is split as integer number according to data carry rules Value group and non-integer values group.
In this embodiment, to the data to be tested received according to transaction id, period, class of service, data source class The dimensions such as not are grouped, and original data set is then split as integer numerical value group and non-integer according to business datum carry rules Numerical value group is merged by that will organize interior each segment data and add up respectively, finally reduces the data volume that end link need to be handled, solve The problem of fragmentation of data, additionally it is possible to accurately realize Data Detection control.
In one embodiment of the invention, it is preferable that index includes publicly-owned section of index and privately owned section of index;Wherein index Publicly-owned section includes following at least any one or combinations thereof: transaction id, period, class of service;Index privately owned section include with down toward Any one of few or combinations thereof: data source category, number, records number in group at timestamp.
In this embodiment, data are adopted as and establish data group, distribute one by publicly-owned section and privately owned to every group of data The unique index ID of Duan Zucheng.Wherein, publicly-owned segment index by any one of information such as transaction id, period, class of service or its Group is combined into, and for realizing the association control between data group, privately owned section in data source category, timestamp, number, group by recording Any one of information such as number or combinations thereof avoid to index foundation to single for identifying the uniqueness of each data group Data can save system resource, promote search efficiency.
In one embodiment of the invention, it is preferable that fragment compression module 606 is initially used for data in group and carries out fragment Compression, specifically: the data group for needing to carry out fragment compression is retrieved according to publicly-owned section of index;To the data in integer numerical value group into Row is cumulative;It adds up to the data in non-integer values group, and according to data carry rules by the integer numerical value of accumulation result Part is added to integer numerical value group.
In this embodiment, fragment compression in group is carried out first, i.e., integer numerical value group in organizing directly is merged cumulative; The merging accumulation result of non-integer values group need to be further processed according to the carry rules of business datum, specifically, will tire out The integer numerical part of result is added to be added to associated integer numerical value group, and non-integer numerical part continues to retain.The present invention Embodiment, by will organize interior each segment data respectively add up merge, finally reduce the data volume that end link need to be handled, solve The problem of fragmentation of data, additionally it is possible to accurately realize Data Detection control.
In one embodiment of the invention, it is preferable that fragment compression module 606 is also used to carry out fragment to data group Compression, specifically: according to search index historical context data group, when inquiring historical context data group, according to Indexed Dependencies Data in historical context data group are added to corresponding integer numerical value group and non-integer values group respectively, carry out group by relationship Between data cumulative merging.
In this embodiment, the inquiry of historical context data group is initiated by index (preferably passing through publicly-owned section of index segment) Request, when there are historical context data group, need to be added to respectively historical data corresponding integer numerical value group and non-integer number Value group carries out fragment compression again.By the cumulative merging in organizing between group, the consistency inspection of data group is then carried out respectively It surveys, avoids the detection processing to each data, to reduce the data volume that need to be detected, the compression of this crumb data is closed And method needs to protect.
Fig. 7 shows the schematic block diagram of the data consistency detection device of another embodiment of the present invention offer.Such as Fig. 7 institute Show, which includes:
Data to be tested are divided into multiple data groups for receiving data to be tested by grouping module 702;
Index module 704, for being data group distribution index;
Fragment compression module 706, for needing to carry out the data group of fragment compression according to indexed search, to organize in data into The compression of row fragment;It is also used to according to search index historical context data group, when inquiring historical context data group, according to index Data in historical context data group are added to corresponding integer numerical value group and non-integer values group by dependence respectively, into The cumulative merging of data between row group;
Consistency detection module 708 generates Detection task according to subscription list, and according to subscription after completing integration Relationship will test task and be published to corresponding detection node, carry out consistency detection;
Subscribing module 710 updates subscription list, subscribing relationship and detection for the testing result according to consistency detection The life state and life cycle of task.
In this embodiment, according to the testing result of consistency detection, subscription list and Detection task life state are updated And life cycle, wherein testing result includes consistent but transaction does not finish, inconsistent and transaction does not finish, trading has finished, handed over Easily abnormal to wait four kinds, life state includes silencing, waiting, active, failure etc., and life cycle is the time-to-live of each task, It solves the problems, such as the data tracking of Long routine type transaction, realizes the consistency detection closed-loop control in transaction.
Fig. 8 shows the schematic diagram for the data consistency detection device that further embodiment of the present invention provides.The device by Transaction generation module, transaction execution module, data acquisition module, data resolution module, data grouping module, index control mould The compositions such as block, fragment compression module, publication control module, subscription control module, consistency detection module.
Wherein, transaction generation module is the starting point of transaction and transaction data, sends transaction initial data to transaction and executes mould Block, receives the transaction results of its return, while generating the log recording of originating end.
Transaction execution module is the terminal of transaction and transaction data, the data of transaction generation module is received, by service logic Transaction results are returned to it after processing, while generating the log recording of actuating station.
Data acquisition module is responsible for collecting the daily record data of transaction beginning and end, and collection method, which can be, actively to be grabbed, It is also possible to passively receive.Usually real-time collecting, the timeliness for ensuring to detect with this.
Data resolution module is responsible for the Various types of data that solution reports data acquisition module and is parsed and pre-processed, and uses ETL process flow converts thereof into the data format for meeting examination criteria.
Data grouping module is responsible for dividing the standardized data of data resolution module output according to rule of classification And combination, a series of data group is generated, common grouping dimension has transaction id, time cycle etc..
Control module is indexed, the data group of verification data grouping module output is responsible for, it is then raw for each data group With a unique mark, mark generally comprises session id, timestamp, serial number, records number etc. in group ingredient.
Fragment compression module is responsible for carrying out Data Integration, including group to the data group of index control module distribution index The integration of interior data and there are the integration of data between the group of Indexed Dependencies relationship.
Control module is issued, according to the subscription list that subscription control module is issued, by the compressed number to be detected of fragment According to Detection task is converted to, corresponding detection node is distributed to according to subscribing relationship.
Control module is subscribed to, the testing result submitted according to consistency detection module is needed, updates subscription list and detection Task life state and life cycle, life state include silencing, waiting, active, failure etc., and life cycle is each task Time-to-live.
Consistency detection module is responsible for receiving the Detection task of publication control module output, completes one according to service logic The detection of cause property, will test result and is reported to subscribing module, as a result include consistent but transaction not, inconsistent and transaction do not terminate, hands over Easily finish four classes such as termination, transaction exception.
Consistency detecting method is as follows:
The real-time exchange that generation module and transaction execution module pass through to business datum of trading handles the core for realizing transaction Logic, at the same generate transaction log, result snapshot etc. for detection data, active push to data acquisition module or waiting number Data are collected according to acquisition module;
After data acquisition module obtains data to be tested, real-time report is to data resolution module, then data resolution module According to presetting rule, standardized data to be tested, notification data grouping module are converted raw data into;
After data grouping module is notified, first, in accordance with preset rule of classification (including transaction id, affiliated period, industry Be engaged in classification etc.), standardized data is repartitioned and is combined into a series of original data set, then by original data set according to The carry rules of business datum are further broken into two data groups such as integer numerical value group and non-integer values group, finally notify Index control module;
Control module is indexed to each data group, calculates and distributes uniquely by publicly-owned section and the privately owned section of index formed ID, publicly-owned segment index are made of transaction id, period, class of service, are controlled for realizing the association between data group, privately owned section It is formed by recording the information such as number in data source category, timestamp, number, group, for identifying the uniqueness of each data group, then Notify fragment compression module;
Fragment compression module retrieves the data group for needing fragment to compress by indexing publicly-owned section, carries out fragment pressure in group first Contracting, i.e., to organize in data merge it is cumulative, need to be according to the carry of business datum to the merging accumulation result of non-integer values group The integer numerical part of accumulation result is added to associated integer numerical value group by rule, and non-integer numerical part is after continuation of insurance It stays, the inquiry request of historical context data group is then initiated to publication control module by publicly-owned section of index segment, when there are history When associated data group, historical data is added to corresponding integer numerical value group and non-integer values group need to respectively, carried out again broken Piece compression, notice issues control module after the completion;
The inquiry request that publication control module receives fragment compression module then returns to associated data group polling as a result, receiving broken The notification information of piece compression module then generates Detection task, and notifies to give consistency detection module, receives and subscribes to control module Notice then makes corresponding history data set control operation;
After consistency detection module receives Detection task, the detection of consistency is carried out to data group, will test result submission To control module is subscribed to, as a result it is divided into unanimously but transaction does not finish, inconsistent and transaction does not finish, trading has finished, is abnormal complete Four kinds of knot etc.;
Subscribe to after control module receives according to testing result, to consistent but transaction do not finish as a result, setting associated data Group life state be silencing and longest quiet hour, to it is inconsistent and transaction do not finish as a result, setting associated data group life State be it is active, to the result to have finished then set associated data group life state as fail and clear up subscribing relationship, to exception The result to finish sets associated data group life state to wait, and sets high latency.
Below by taking the typical scene that consistency detection is likely encountered as an example, to illustrate the data consistency of the embodiment of the present invention Detect detailed process.
Specific example one, detection process when first group of data generates:
Step 1, data acquisition, parsing module are handled according to the ETL that standard completes data;
Step 2, data grouping module is to the data received according to transaction id, period, class of service, data source category etc. Dimension is grouped, and original data set is then split as integer numerical value group and non-integer values according to business datum carry rules Group;
Step 3, index control module distributes one by publicly-owned section and the privately owned section of unique index formed to every group of data ID;
Step 4, it because first group of data will not inquire historical context data group from publication control module, only needs The fragment compression of data and the carry of non-integer values group are compressed in completion group;
Step 5, after issuing the notified information of control module, according to the subscription consistency detection for subscribing to control module generation Subscription list generates consistency detection task, and task is published to corresponding consistency detection module;
Step 6, consistency detection module completes detection, and result is submitted to subscription control module, subscribes to control module root Publicly-owned section of life cycle setting is indexed accordingly according to testing result completion.
Specific example two, detection process when being compressed there are fragment between group:
Step 1, the data group after the resume modules such as acquisition, parsing, grouping, index control normally submits to fragment pressure Contracting module;
Step 2, the fragment of data compresses in fragment compression module completion group;
Step 3, fragment compression module initiates the inquiry request of associated data group to publication control module;
Step 4, publication control module is matched to the incidence number that inconsistent and transaction does not finish according to publicly-owned segment information is indexed According to the index of group, it is returned to fragment compression module;
Step 5, fragmentation of data compresses between fragment compression module completion group, and compressed data group is submitted to publication control Module;
Step 6, publication control mould generates Detection task and is distributed to corresponding consistency detection module;
Step 7, after consistency detection module completes detection, it will test result and submit to subscription control module;
Step 8, it subscribes to control module according to testing result, completes data group life cycle and update.
Specific example three, the life cycle control flow for the data group that do not finish:
Step 1, it subscribes to control module and inquires consistency detection task subscription list one in real time or quasi real time;
Step 2, to the Detection task for being waited for and be more than maximum duration, subscribing relationship clean-up task column are generated Table;To in silencing and be more than longest quiet hour Detection task, its state is reset into waiting, and set longest wait Time;
Step 3, it subscribes to control module and completes subscribing relationship cleaning.
Data consistency detection device and method provided in an embodiment of the present invention, compensate for traditional consistency detection scheme Deficiency can effectively reduce the data volume that need to be detected, while promote the scalability of detection system.
Fig. 9 shows hardware structure of computer schematic diagram provided in an embodiment of the present invention.
The computer equipment may include processor 901 and the memory 902 for being stored with computer program instructions.
Specifically, above-mentioned processor 901 may include central processing unit (CPU) or specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement implementation of the present invention One or more integrated circuits of example.
Memory 902 may include the mass storage for data or instruction.For example it rather than limits, memory 902 may include hard disk drive (Hard Disk Drive, HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape or logical With the combination of universal serial bus (Universal Serial Bus, USB) driver or two or more the above.It is closing In the case where suitable, memory 902 may include the medium of removable or non-removable (or fixed).In a suitable case, it stores Device 902 can be inside or outside synthesized gateway disaster tolerance equipment.In a particular embodiment, memory 902 is nonvolatile solid state Memory.In a particular embodiment, memory 902 includes read-only memory (ROM).In a suitable case, which can be ROM, programming ROM (PROM), erasable PROM (EPROM), the electric erasable PROM (EEPROM), electrically rewritable of masked edit program The combination of ROM (EAROM) or flash memory or two or more the above.
Processor 901 is by reading and executing the computer program instructions stored in memory 902, to realize above-mentioned implementation Any one data consistency detection in example.
In one embodiment of the invention, computer equipment may also include communication interface 909 and bus 910.Wherein, such as Shown in Fig. 9, processor 901, memory 902, communication interface 909 connect by bus 910 and complete mutual communication.
Communication interface 909 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment Communication.
Bus 910 includes hardware, software or both, and the component of computer equipment is coupled to each other together.For example Rather than limit, bus may include accelerated graphics port (AGP) or other graphics bus, enhance Industry Standard Architecture (EISA) always Line, front side bus (FSB), super transmission (HT) interconnection, the interconnection of Industry Standard Architecture (ISA) bus, infinite bandwidth, low pin count (LPC) bus, memory bus, micro- channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association part (VLB) bus or other conjunctions The combination of suitable bus or two or more the above.In a suitable case, bus 910 may include one or more Bus.Although specific bus has been described and illustrated in the embodiment of the present invention, the present invention considers any suitable bus or interconnection.
The computer equipment can execute the data consistency detection in the embodiment of the present invention, to realize in conjunction with figure 1 to Fig. 8 description in data consistency detection and device.
In addition, the embodiment of the present invention can provide a kind of calculating in conjunction with the data consistency detection in above-described embodiment Machine storage medium is realized.Computer program instructions are stored in the computer storage medium;The computer program instructions are located Reason device realizes any one data consistency detection in above-described embodiment when executing.
It should be clear that the invention is not limited to specific configuration described above and shown in figure and processing. For brevity, it is omitted here the detailed description to known method.In the above-described embodiments, several tools have been described and illustrated The step of body, is as example.But method process of the invention is not limited to described and illustrated specific steps, this field Technical staff can be variously modified, modification and addition after understanding spirit of the invention, or suitable between changing the step Sequence.
Functional block shown in structures described above block diagram can be implemented as hardware, software, firmware or their group It closes.When realizing in hardware, it may, for example, be electronic circuit, specific integrated circuit (ASIC), firmware appropriate, insert Part, function card etc..When being realized with software mode, element of the invention is used to execute program or the generation of required task Code section.Perhaps code segment can store in machine readable media program or the data-signal by carrying in carrier wave is passing Defeated medium or communication links are sent." machine readable media " may include any medium for capableing of storage or transmission information. The example of machine readable media includes electronic circuit, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), soft Disk, CD-ROM, CD, hard disk, fiber medium, radio frequency (RF) link, etc..Code segment can be via such as internet, inline The computer network of net etc. is downloaded.
It should also be noted that, the exemplary embodiment referred in the present invention, is retouched based on a series of step or device State certain methods or system.But the present invention is not limited to the sequence of above-mentioned steps, that is to say, that can be according in embodiment The sequence referred to executes step, may also be distinct from that the sequence in embodiment or several steps are performed simultaneously.
The above description is merely a specific embodiment, it is apparent to those skilled in the art that, For convenience of description and succinctly, the system, module of foregoing description and the specific work process of unit can refer to preceding method Corresponding process in embodiment, details are not described herein.It should be understood that scope of protection of the present invention is not limited thereto, it is any to be familiar with Those skilled in the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or substitutions, These modifications or substitutions should be covered by the protection scope of the present invention.

Claims (10)

1. a kind of data consistency detection characterized by comprising
Data to be tested are received, the data to be tested are divided into multiple data groups;
For the data group distribution index;
The data group for needing to carry out fragment compression according to the indexed search carries out fragment compression to data in organizing;
The compressed data to be tested of fragment are converted into Detection task according to the subscription list of dynamic generation, and according to ordering It reads relationship and the Detection task is published to corresponding detection node, carry out consistency detection.
2. data consistency detection according to claim 1, which is characterized in that described by the data to be tested point For multiple data groups, specifically:
The data to be tested are divided into multiple original data sets according to dimension;And
The original data set is split as integer numerical value group and non-integer values group according to data carry rules.
3. data consistency detection according to claim 2, which is characterized in that
The index includes publicly-owned section of index and privately owned section of index;Wherein,
Publicly-owned section of the index includes following at least any one or combinations thereof: transaction id, period, class of service;
Privately owned section of the index include it is following any one of at least or combinations thereof: data source category, number, records in group timestamp Number.
4. data consistency detection according to claim 3, which is characterized in that described according to the indexed search need The data group for carrying out fragment compression carries out fragment compression to data in organizing, specifically:
The data group for needing to carry out fragment compression is retrieved according to publicly-owned section of the index;
It adds up to the data in the integer numerical value group;
It adds up to the data in the non-integer values group, and according to the data carry rules by the integer of accumulation result Numerical part is added to the integer numerical value group.
5. data consistency detection according to claim 4, which is characterized in that further include:
According to the search index historical context data group, when inquiring the historical context data group, according to Indexed Dependencies Data in the historical context data group are added to the corresponding integer numerical value group and non-integer values by relationship respectively Group, and fragment compression is carried out again.
6. data consistency detection described in -5 any one according to claim 1, which is characterized in that further include:
According to the testing result of the consistency detection, the subscription list, the subscribing relationship and the Detection task are updated Life state and life cycle.
7. data consistency detection according to claim 6, which is characterized in that
The testing result includes following at least any one: consistent but transaction does not finish, inconsistent and transaction does not finish, trades It finishes, exception of trading;
The life state includes at least any one: silencing, waiting, active, failure;
The life cycle is the time-to-live of the Detection task.
8. a kind of data consistency detection device, which is characterized in that described device includes:
The data to be tested are divided into multiple data groups for receiving data to be tested by grouping module;
Index module, for being the data group distribution index;
Fragment compression module, for needing to carry out the data group of fragment compression according to the indexed search, to data in organizing Carry out the fragment compression;
Consistency detection module generates Detection task according to subscription list, and according to subscribing relationship by institute after completing integration It states Detection task and is published to corresponding detection node, carry out consistency detection.
9. a kind of computer equipment, which is characterized in that the equipment includes: processor and is stored with computer program instructions Memory;
The processor realizes that the data as described in claim 1-7 any one are consistent when executing the computer program instructions Property detection method.
10. a kind of computer storage medium, which is characterized in that be stored with computer program in the computer storage medium and refer to It enables, the data consistency as described in claim 1-7 any one is realized when the computer program instructions are executed by processor Detection method.
CN201711395044.9A 2017-12-21 2017-12-21 Data consistency detection, device, equipment and computer storage medium Pending CN110019271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711395044.9A CN110019271A (en) 2017-12-21 2017-12-21 Data consistency detection, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711395044.9A CN110019271A (en) 2017-12-21 2017-12-21 Data consistency detection, device, equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN110019271A true CN110019271A (en) 2019-07-16

Family

ID=67187094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711395044.9A Pending CN110019271A (en) 2017-12-21 2017-12-21 Data consistency detection, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN110019271A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259027A (en) * 2020-01-15 2020-06-09 中国科学院软件研究所 Data consistency detection method
CN112370773A (en) * 2020-10-20 2021-02-19 广州西山居世游网络科技有限公司 User integral value reconciliation test method and system
CN112667868A (en) * 2019-10-15 2021-04-16 腾讯科技(深圳)有限公司 Data detection method and device
CN113569910A (en) * 2021-06-25 2021-10-29 石化盈科信息技术有限责任公司 Account type identification method and device, computer equipment and storage medium
CN117278439A (en) * 2023-11-23 2023-12-22 广东广宇科技发展有限公司 Communication quick verification method based on compression algorithm

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106703A1 (en) * 2005-10-04 2007-05-10 Tatsuyuki Shiomi Apparatus, system, and method for determining the consistency of a database
US20110320412A1 (en) * 2010-06-28 2011-12-29 International Business Machines Corporation Using repeated incremental background consistency checking to detect problems with content closer in time to when a failure occurs
US20130332428A1 (en) * 2012-06-11 2013-12-12 Microsoft Corporation Online and Workload Driven Index Defragmentation
CN104462080A (en) * 2013-09-12 2015-03-25 北大方正集团有限公司 Index structure creating method and system with group statistics for search results
US20150120771A1 (en) * 2013-10-31 2015-04-30 Samsung Electronics Co., Ltd. Method for processing data and electronic device thereof
US20170068675A1 (en) * 2015-09-03 2017-03-09 Deep Information Sciences, Inc. Method and system for adapting a database kernel using machine learning
CN107644077A (en) * 2017-09-19 2018-01-30 杭州贝购科技有限公司 Data consistency monitoring method, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106703A1 (en) * 2005-10-04 2007-05-10 Tatsuyuki Shiomi Apparatus, system, and method for determining the consistency of a database
US20110320412A1 (en) * 2010-06-28 2011-12-29 International Business Machines Corporation Using repeated incremental background consistency checking to detect problems with content closer in time to when a failure occurs
US20130332428A1 (en) * 2012-06-11 2013-12-12 Microsoft Corporation Online and Workload Driven Index Defragmentation
CN104462080A (en) * 2013-09-12 2015-03-25 北大方正集团有限公司 Index structure creating method and system with group statistics for search results
US20150120771A1 (en) * 2013-10-31 2015-04-30 Samsung Electronics Co., Ltd. Method for processing data and electronic device thereof
US20170068675A1 (en) * 2015-09-03 2017-03-09 Deep Information Sciences, Inc. Method and system for adapting a database kernel using machine learning
CN107644077A (en) * 2017-09-19 2018-01-30 杭州贝购科技有限公司 Data consistency monitoring method, computer equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
D.P.阿奇利亚(D.P.ACHARJYA)等: "《FoxBASE+关系型数据库基础》", 国防工业出版社, pages: 258 - 260 *
李建新: "基于测试数据分组合并的索引编码压缩方案", 《计算机工程》, 5 June 2010 (2010-06-05), pages 1 - 3 *
禚伟等: "基于发布/订阅中间件的时空事件检测研究", 《计算机科学》 *
禚伟等: "基于发布/订阅中间件的时空事件检测研究", 《计算机科学》, no. 10, 15 October 2012 (2012-10-15) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667868A (en) * 2019-10-15 2021-04-16 腾讯科技(深圳)有限公司 Data detection method and device
CN112667868B (en) * 2019-10-15 2023-11-24 腾讯科技(深圳)有限公司 Data detection method and device
CN111259027A (en) * 2020-01-15 2020-06-09 中国科学院软件研究所 Data consistency detection method
CN111259027B (en) * 2020-01-15 2023-01-17 中国科学院软件研究所 Data consistency detection method
CN112370773A (en) * 2020-10-20 2021-02-19 广州西山居世游网络科技有限公司 User integral value reconciliation test method and system
CN113569910A (en) * 2021-06-25 2021-10-29 石化盈科信息技术有限责任公司 Account type identification method and device, computer equipment and storage medium
CN117278439A (en) * 2023-11-23 2023-12-22 广东广宇科技发展有限公司 Communication quick verification method based on compression algorithm
CN117278439B (en) * 2023-11-23 2024-02-09 广东广宇科技发展有限公司 Communication quick verification method based on compression algorithm

Similar Documents

Publication Publication Date Title
CN110019271A (en) Data consistency detection, device, equipment and computer storage medium
CN110807085B (en) Fault information query method and device, storage medium and electronic device
CN105303437A (en) Processing method and device for account checking
CN109213758B (en) Data access method, device, equipment and computer readable storage medium
CN111552509A (en) Method and device for determining dependency relationship between interfaces
CN114840527A (en) Data processing method, device and computer readable storage medium
CN114398520A (en) Data retrieval method, system, device, electronic equipment and storage medium
CN112990769A (en) Service processing method and device, electronic equipment and storage medium
CN112445787A (en) Data auditing method and system based on real-time service
CN117081835A (en) Firewall policy optimization method and system
CN114218173B (en) Batch processing system, processing method, medium and equipment for account-transfer transaction files
CN109377391B (en) Information tracking method, storage medium and server
CN109377206B (en) Payment limit system, method, device and storage medium
CN111506455A (en) Checking method and device for service release result
CN110647448A (en) Mobile application operation log data real-time analysis method, server and system
CN116109322A (en) Data acquisition method, data acquisition device, and computer-readable storage medium
CN113973043B (en) Fault analysis method and device and computer readable storage medium
CN112270537B (en) Multi-channel bill storage method, system and storage medium
CN112907009B (en) Standardized model construction method and device, storage medium and equipment
CN114463100A (en) Order data processing method, device, equipment and storage medium
CN112988829A (en) Big data analysis processing system
CN113225228B (en) Data processing method and device
CN112686760B (en) Financial business processing method and platform based on big data
CN110349025B (en) Method and device for preventing loss of contract assets based on non-cost transaction output
CN115473968A (en) Call bill processing 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190716

RJ01 Rejection of invention patent application after publication