CN108280134A - The data system for the distribution of commodities and method, storage medium, terminal based on the control of account amount - Google Patents

The data system for the distribution of commodities and method, storage medium, terminal based on the control of account amount Download PDF

Info

Publication number
CN108280134A
CN108280134A CN201711434976.XA CN201711434976A CN108280134A CN 108280134 A CN108280134 A CN 108280134A CN 201711434976 A CN201711434976 A CN 201711434976A CN 108280134 A CN108280134 A CN 108280134A
Authority
CN
China
Prior art keywords
data
user identifier
inquiry
amount
updated
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.)
Granted
Application number
CN201711434976.XA
Other languages
Chinese (zh)
Other versions
CN108280134B (en
Inventor
汤奇峰
龙文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Data Trading Center Ltd
Original Assignee
Shanghai Data Trading Center 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 Shanghai Data Trading Center Ltd filed Critical Shanghai Data Trading Center Ltd
Priority to CN201711434976.XA priority Critical patent/CN108280134B/en
Publication of CN108280134A publication Critical patent/CN108280134A/en
Application granted granted Critical
Publication of CN108280134B publication Critical patent/CN108280134B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • 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/2358Change logging, detection, and notification
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

It is a kind of based on account amount control the data system for the distribution of commodities and method, storage medium, terminal, the data system for the distribution of commodities include:Data are listed module, are suitable for propelling user information, and user information includes user identifier and its can use amount, initial amount state;Multiple data fusion modules, suitable for receiving the inquiry request of user information and multiple processes from demander, determine whether to carry out data query according to inquiry request according to the initial amount state of the corresponding inquiry user identifier of inquiry request, the process number of each process and inquiry user identifier are stored as major key, using the cost of process as label value, total cost of inquiry user identifier is stated in remittance, the difference for calculating the available amount of inquiry user identifier and always spending, the initial amount state of update inquiry user identifier, for the judgement of data query next time.The accuracy that the data system for the distribution of commodities controls user account amount may be implemented in technical solution through the invention, and then improves data circulation efficiency.

Description

The data system for the distribution of commodities and method, storage medium, terminal based on the control of account amount
Technical field
The present invention relates to data circulation technical field more particularly to a kind of data system for the distribution of commodities based on the control of account amount And method, storage medium, terminal.
Background technology
Data distribution is the core link of data trade.Party in request usually requires to pay to the data that it is asked.
In the prior art, the cost of the mode request data of party in request's generally use one process, party in request can be according to list Process counts to obtain.Party in request can also pay before request data.
But handle up, in the data distributing system of low latency in high concurrent, height, user needs to supplement with money in advance, according to each Dispatching (or inquiry) result carries out cost calculating, i.e., is first detained after.Under the scene of multi-process, how to be counted between multi-process The cost for summarizing same user is a great problem of real-time control amount.
Invention content
Present invention solves the technical problem that be the accuracy how realized the data system for the distribution of commodities and controlled user account amount, And then improve data circulation efficiency.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of data circulation system controlled based on account amount System, the data system for the distribution of commodities based on the control of account amount include:Data are listed module, are suitable for propelling user information, the user Information includes user identifier and its can use amount, initial amount state, and whether the initial amount state instruction can be into line number It is investigated that asking;Multiple data fusion modules are suitable for receiving the inquiry request of the user information and multiple processes from demander, Determine whether to be carried out according to the inquiry request according to the initial amount state of the corresponding inquiry user identifier of the inquiry request Data query, using the process number of each process and the corresponding inquiry user identifier of the inquiry request as major key, will it is described into The cost of journey is stored as label value, is summarized total cost of the inquiry user identifier, is calculated the inquiry user identifier Available amount and the difference always spent, the initial amount state of the inquiry user identifier is updated, for next time The judgement of data query.
Optionally, the data fusion module updates the inquiry user when the difference reaches the first given threshold The initial amount state of mark is that can carry out data query;When the difference is not up to first given threshold, update The initial amount state of the inquiry user identifier is that cannot carry out data query.
Optionally, further include caching and database, it is described when the number of the inquiry request is less than the second given threshold The major key and its label value are stored in the caching by data fusion module;Reach described in the number of the inquiry request When two given thresholds, the data are written in the major key and its label value that are stored in the caching by the data fusion module Library, and empty the caching.
Optionally, the data system for the distribution of commodities further includes:Data analysis module is suitable for obtaining according to the setting period described more Daily record data described in the daily record data of a data fusion module includes inquiry request, the inquiry user identifier and process number;Institute It states the listed module of data and week of the user of each user identifier direction within the setting period is counted according to the daily record data Phase always spends, and always the available amount of cost and each user identifier updates the available of each user identifier according to the period Amount and initial amount state, and by updated user information pushing to the multiple data fusion module.
Optionally, the earliest acquisition moment that the data fusion module records the daily record data was the first moment, and The second moment for receiving updated user information, calculate each user identifier first moment and second moment it Between error spend, and spent according to the error and updated available amount updates the updated available amount and more Initial amount state after new, for data query.
Optionally, the data system for the distribution of commodities further includes database and removing module;The removing module is according to setting week Phase clears up the data in the database;Alternatively, the removing module receives user's letter in the data fusion module After breath, the data in the database are cleared up.
In order to solve the above technical problems, the embodiment of the invention also discloses a kind of data circulations based on the control of account amount Method, data circulation method include:Propelling user information, the user information include user identifier and its can use amount, initial Whether amount state, the initial amount state instruction can carry out data query;Receiving the user information and coming from needs The inquiry request of multiple processes of side, the initial amount state determination according to the corresponding inquiry user identifier of the inquiry request are It is no that data query is carried out according to the inquiry request;By the process number of each process and the corresponding inquiry user of the inquiry request Mark is stored as major key, using the cost of the process as label value, summarizes total cost of the inquiry user identifier; The available amount of the inquiry user identifier and the difference always spent are calculated, the initial volume of the inquiry user identifier is updated Degree state, for the judgement of data query next time.
Optionally, available amount and the difference always spent for calculating the inquiry user identifier, described in update Inquiry user identifier initial amount state include:When the difference reaches the first given threshold, the inquiry user is updated The initial amount state of mark is that can carry out data query;When the difference is not up to first given threshold, update The initial amount state of the inquiry user identifier is that cannot carry out data query.
Optionally, described using the process number of each process and the corresponding inquiry user identifier of the inquiry request as master Key, using the cost of the process as label value carry out storage include:It is less than the second setting threshold in the number of the inquiry request When value, the major key and its label value are stored in caching;Reach second given threshold in the number of the inquiry request When, database is written into the major key and its label value that are stored in the caching, and empty the caching.
Optionally, the data circulation method further includes:The multiple data fusion module is obtained according to the setting period Daily record data described in daily record data includes inquiry request, the inquiry user identifier and process number;It is united according to the daily record data User that each user identifier is directed toward is counted always to spend in the period within the setting period, and always spent according to the period and The available amount of each user identifier updates the available amount of each user identifier and initial amount state;By updated user Information pushes out, for the judgement of data query next time.
Optionally, the data circulation method further includes:When the earliest acquisition moment for recording the daily record data is first It carves, and receives the second moment of updated user information;Each user identifier is calculated at first moment and described Error between two moment is spent;It is spent according to the error and updated available amount updates the updated available volume Degree and updated initial amount state, for data query.
Optionally, the major key and its label value are stored in database, and the data circulation method further includes:According to setting Fixed cycle clears up the data in the database;Alternatively, after receiving the user information, the number in the database is cleared up According to.
The embodiment of the invention also discloses a kind of storage medium, it is stored thereon with computer instruction described in computer instruction and transports The step of data circulation method is executed when row.
The embodiment of the invention also discloses a kind of terminal, including memory and processor, being stored on the memory can The computer instruction run on the processor, the processor execute the data circulation when running the computer instruction The step of method.
Compared with prior art, the technical solution of the embodiment of the present invention has the advantages that:
The data system for the distribution of commodities based on the control of account amount of technical solution of the present invention includes the listed module of data, suitable for pushing away Send user information, the user information includes user identifier and its can use amount, initial amount state, the initial amount state Indicate whether that data query can be carried out;Multiple data fusion modules are suitable for receiving the user information and from demander's The inquiry request of multiple processes determines whether root according to the initial amount state of the corresponding inquiry user identifier of the inquiry request Data query is carried out according to the inquiry request, by the process number of each process and the corresponding inquiry user identifier of the inquiry request It is stored as label value as major key, using the cost of the process, summarizes total cost of the inquiry user identifier, calculate The available amount and the difference always spent of the inquiry user identifier, update the initial amount shape of the inquiry user identifier State, for the judgement of data query next time.The data fusion module of technical solution of the present invention is by combining process number and looking into The cost that user identifier stores each process is ask, to which when demander carries out data query using multi-process, process can be combined Number and inquiry user identifier summarize total cost of each user, to which on the basis of realizing multiprocess communication, raising is to user The accuracy of amount control, ensures the efficiency of data circulation.
Further, when the number of the inquiry request is less than the second given threshold, the data fusion module will be described Major key and its label value are stored in the caching;It is described when the number of the inquiry request reaches second given threshold The database is written in the major key and its label value that are stored in the caching by data fusion module, and empties the caching. Technical solution of the present invention is stored data in slow by the way that caching and database is used in combination when the data volume to be stored is smaller It deposits, when data volume is larger, then stores data in database, avoid the frequent read-write of memory, reduce resource overhead.
Further, the earliest acquisition moment that the data fusion module records the daily record data was the first moment, and The second moment for receiving updated user information, calculate each user identifier first moment and second moment it Between error spend, and spent according to the error and updated available amount updates the updated available amount and more Initial amount state after new, for data query.Technical solution of the present invention by recording the first moment and the second moment, and Error between first moment and the second moment is spent, secondary update is carried out to available amount and initial amount state, ensure that The accuracy that amount calculates, and then improve the efficiency of the data circulation controlled based on amount.
Further, the removing module clears up the data in the database according to the setting period;Alternatively, the removing mould Block clears up the data in the database after the data fusion module receives the user information.The technology of the present invention side Case clears up the data in database by using different modes, can to avoid the data expansion problem of memory database, Stability, reliability and the availability for promoting the data system for the distribution of commodities, to further increase the efficiency of data circulation.
Description of the drawings
Fig. 1 is a kind of structural schematic diagram of the data system for the distribution of commodities controlled based on account amount of the embodiment of the present invention;
Fig. 2 is the structural schematic diagram for the data system for the distribution of commodities that another kind of the embodiment of the present invention is controlled based on account amount;
Fig. 3 is a kind of flow chart of the data circulation method controlled based on account amount of the embodiment of the present invention.
Specific implementation mode
As described in the background art, the prior art is handled up, in high concurrent, height in the data distributing system of low latency, user It needs to supplement with money in advance, cost calculating is carried out according to each dispatching (or inquiry) result, i.e., is first detained after.In the scene of multi-process Under, how between multi-process statistics summarize same user cost be real-time control amount a great problem.
The data fusion module of technical solution of the present invention is by combining process number and inquiry user identifier to store each process Cost, to demander using multi-process carry out data query when, can in conjunction with process number and inquiry user identifier summarize often Total cost of a user ensures number on the basis of realizing multiprocess communication, improve the accuracy controlled user's amount According to the efficiency of circulation.
To make the above purposes, features and advantages of the invention more obvious and understandable, below in conjunction with the accompanying drawings to the present invention Specific embodiment be described in detail.
Fig. 1 is a kind of structural schematic diagram of the data system for the distribution of commodities controlled based on account amount of the embodiment of the present invention.
The data system for the distribution of commodities shown in Fig. 1 10 may include the listed module 101 of data and data fusion module 102.
Wherein, data are listed module 101 suitable for propelling user information, and the user information includes user identifier and its can be used Whether amount, initial amount state, the initial amount state instruction can carry out data query.Specifically, the user It is identified as the mark of demander namely the mark of request of data side.The available amount of user identifier can be pointed by user identifier User account in remaining amount.
In specific implementation, the data module that is listed 101 can safeguard user information, and can be melted with propelling user information to data Block 102 is molded, so that data fusion module 102 can use user information to carry out data query.The mould specifically, data are listed Block 101 can according to setting period propelling user information, for example, data are listed module 101 can daily zero, 3 points or five The times propelling user informations such as point.
Specifically, initial amount state may be used 1 bit and be indicated.For example, when bit is 1, instruction can carry out Data query;When bit is 0, instruction cannot carry out data query.
Specifically, the user information can be form document, such as EXCEL file.Form document records user identifier And its amount, initial amount state can be used.
Data fusion module 102 is suitable for receiving the inquiry request of the user information and multiple processes from demander, Determine whether to be carried out according to the inquiry request according to the initial amount state of the corresponding inquiry user identifier of the inquiry request Data query, using the process number of each process and the corresponding inquiry user identifier of the inquiry request as major key, will it is described into The cost of journey is stored as label value, is summarized total cost of the inquiry user identifier, is calculated the inquiry user identifier Available amount and the difference always spent, the initial amount state of the inquiry user identifier is updated, for next time The judgement of data query.
In specific implementation, data fusion module 102 can utilize the user information received to determine that inquiry request is corresponding The initial amount state of user identifier is inquired, and then progress data query is determined whether according to the amount original state.If should Initial amount state instruction can carry out data query, then data fusion module 102 executes data query step;Otherwise, data Fusion Module 102 will not execute data query step.
Since inquiry request is sent by the way of multi-process, inquiry request may be from different demanders, therefore in order to Ensure to calculate its accuracy spent to each demander, data fusion module 102 can also be by the process number of each process and institute The corresponding inquiry user identifier of inquiry request is stated to store as label value as major key, using the cost of the process.
In turn, data fusion module 102 summarizes total cost of each inquiry user identifier, calculates each inquiry user identifier Available amount and the difference always spent, to update the initial amount state of each inquiry user identifier.Due to aforementioned side Formula can ensure to calculate each demander the accuracy of its cost, therefore can ensure the accuracy of initial amount state, in turn Ensure the accuracy that data query judges.Further, it is also possible to realize data fusion module 102 to the update of initial amount state and Shi Xing is avoided still carrying out data query when user can not be with amount and is led to problem.
Specifically, data fusion module 102 can store the key assignments and its label value according to setting time interval, summarize Total cost calculates the difference, the initial amount state of update.For example, above-mentioned steps can be executed every one minute, also may be used To execute above-mentioned steps in real time.
The data system for the distribution of commodities 10 of the embodiment of the present invention can in real time calculate the available amount of demander in real time, with this To achieve the purpose that real-time control, whether it can continue payment request.This needs system efficiently accurate in real time can calculate amount Variation and real-time judge its available mode.
The data fusion module of the embodiment of the present invention is by combining process number and inquiry user identifier to store each process It spends, to when demander carries out data query using multi-process, summarize in conjunction with process number and inquiry user identifier each Total cost of user ensures data on the basis of realizing multiprocess communication, improve the accuracy controlled user's amount The efficiency of circulation.
In a specific embodiment of the invention, the data fusion module 102 reaches the first given threshold in the difference When, the initial amount state for updating the inquiry user identifier is that can carry out data query;It is not up to described in the difference When the first given threshold, the initial amount state for updating the inquiry user identifier is that cannot carry out data query.
Specifically, first given threshold can be 0.The available amount for inquiring user identifier is always spent with described Difference is more than 0 and indicates that this is inquired after the completion of charging, and the available amount for inquiring user identifier is more than 0, can be for inquiring next time It uses, therefore it is that can carry out data query to update initial amount state.Inquire the available amount of user identifier and total flower The difference taken is less than or equal to 0 and indicates that this is inquired after the completion of charging, and the available amount for inquiring user identifier is less than or equal to 0, user It, can not be for inquiring use next time in no amount or arrearage state, therefore it is that cannot carry out data to update initial amount state Inquiry.
Further, first given threshold can also be User Defined value.For example, user identifier 1 is self-defined Value is 300, then when the available amount of user identifier 1 and its difference always spent are less than 300, just updates user identifier 1 Initial amount state is that cannot carry out data query.
In a preferred embodiment of the invention, the data system for the distribution of commodities shown in Fig. 1 10 can also include caching (not shown) With database (not shown).When the number of the inquiry request is less than the second given threshold, the data fusion module 102 will The major key and its label value are stored in the caching;When the number of the inquiry request reaches second given threshold, The database is written in the major key and its label value that are stored in the caching by the data fusion module 102, and empties institute State caching.Wherein, the second given threshold can be as the judgment basis for the storage location for determining major key and its label value, and second sets Adaptability configuration, such as 100,90 etc. can be carried out according to actual application environment by determining the concrete numerical value of threshold value, and the present invention is implemented Example is without limitation.
In the present embodiment, when the number of inquiry request is less than the second given threshold, the major key stored and its label value are needed Data volume it is smaller, therefore the major key and its label value can be stored in the caching by data fusion module 102.Inquiry request Number when being more than the second given threshold, need the data volume of the major key stored and its label value larger, then be written into described Database, and empty the caching.
The embodiment of the present invention by using caching with database by the way of, may be implemented under distributed structure/architecture mostly into When Cheng Tongxin, solve the problems, such as that memory frequently reads and writes the overhead brought.
Further, the database can be Redis databases.
In another preferred embodiment of the present invention, Fig. 2 is please referred to, the data system for the distribution of commodities 20 can also include data analysis (Data Analysis) module 203, data analysis module 203 are suitable for obtaining the multiple data fusion according to the setting period Daily record data described in the daily record data of (Data MIX) module 202 includes inquiry request, the inquiry user identifier and process number.
Listed (Data Listing) module 201 of data counts the use that each user identifier is directed toward according to the daily record data Period of the family within the setting period always spends, and according to the period total cost and the available amount of each user identifier Update the available amount of each user identifier and initial amount state, and by updated user information pushing to the multiple number According to Fusion Module.
It is understood that data are listed, the period that module 201 counted in the setting period of each user always spends, and more The process of new available amount and initial amount state is properly termed as lump-sum settlement process.
In a concrete application scene of the invention, data analysis module 203 can (such as can be in daily fixed time T1 It is 00:05) start to obtain daily record data from data fusion module 202.Acquired daily record data is the T1 moment of proxima luce (prox. luc) To when the daily record produced between the T1 moment of the day before yesterday.Log information can also be stored in data bins by data analysis module 203 Library (hive databases) obtains daily dispensed amounts and counts by inquiring, and the data for module 201 that statistic write-in data are listed It is settled accounts for the data module 201 that is listed in library.Daily record data is obtained due to data analysis module 203 and statistic is written The be listed database of module 201 of data needs the regular hour, thus data be listed module 201 can consolidating after moment T0 Timing quarter (such as can be 03:00) start Automatic-settlement.To ensure that data are written in statistic by data analysis module 203 The database of listed module 201.Data are listed in the slave database of module 201 and read statistic, and are ordered by pre-stored Only price is obtained in valence information, calculates total cost of the user in setting period (such as one day).
Data are listed module 201 according to total available amount for spending each user identifier of calculating of calculating and initial amount shape State.The data module 201 that is listed generates new user information (namely demander using updated available amount and initial amount state Credit), such as title is mem_info.xml.Data are listed module 201 every setting time (such as 30 minutes) life At order information table order_info.xml and user information table mem_info.xml;The data module that is listed 201 can lead to It crosses watcher thread to compare the file that is currently generated and last time whether generate file consistent, if it is inconsistent, the module 201 that is listed pushes away Send order information table order_info.xml and user information table mem_info.xml to data fusion module 202, otherwise, Not push.Specifically, order information table can be with order number, supplier ID, demander ID, the data ID bought and price.
Present inventor has found, under the distributed structure/architecture of current transaction system, primary complete settlement process need through Go through trading volume statistics, total cost calculates, amount updates and the push etc. of user information file.These processes can be happened at not Same module, generates the very important time difference, causes the available amount for data query not to be last look, bring prodigious Error;This error will influence the accuracy of amount control, and many troubles are brought to reality production.
In the present embodiment, the earliest acquisition moment that the data fusion module 202 can record the daily record data is the One moment T1, and the second moment T2 of updated user information is received, each user identifier is calculated at first moment Error between T1 and the second moment T2 is spent, and according to described in error cost and updated available amount update Updated available amount and updated initial amount state, for data query.
In another concrete application scene of the invention, during carrying out data query, data fusion module 202 records number Start the first moment T1 of acquisition daily record data according to analysis module 203, such as the time for starting to settle accounts is set to daily 00:05, the One moment T1 is 00:05.Data fusion module 202 receives order information table order_info.xml and user information table After mem_info.xml, the record time of reception is the second moment T2.Total flower of the first moment T1 and the second moment T2 are taken out respectively Take CostT1 and CostT2, then error spends dev=CostT2-CostT1.Practical currently available amount rTotLmt= TotLmt-dev, wherein totLmt is newer for the listed module 201 of data recorded in user information table mem_info.xml Amount can be used.
With continued reference to Fig. 2, the data system for the distribution of commodities 20 can also include database 204 and removing module (not shown);It is described It removes module and clears up the data in the database 204 according to the setting period;Alternatively, the removing module is in the data fusion After module 202 receives the user information, the data in the database 204 are cleared up.
Further, database 204 can be Redis clusters.Redis clusters can provide, and convenient, quick data are delayed The service of depositing, in systems realizing process communication and data cached.
In another concrete application scene of the invention, the data system for the distribution of commodities 20 can also include the data management of multiple demanders Platform (Data-Management Platform, DMP):Demander DMP-1, demander DMP-2, demander DMP-N, the data of party in request The main transmission data inquiry request of management platform.The load balancing that the data system for the distribution of commodities 20 passes through Reverse Proxy Nginx Multiple queries request is distributed to multiple data fusion modules 202 by function, full to execute the query task of distribution, multi-process The requirement of sufficient high concurrent, high-throughput, low latency.Data analysis module 203 obtains multiple data fusion moulds according to the setting period The practical dispatching daily record of block 202 is for statistical analysis, obtains the daily total effective trading volume of each demander, and data are listed module 201 calculate daily spending limit by effective trading volume, then can use at most a data fusion mould of the file push such as amount Block 202.
The data system for the distribution of commodities 20 can also include the data management platform of multiple suppliers:Supplier DMP-1, it supplier DMP-2, supplies Square DMP-N.The data management platform of supplier can provide data resource and inquiry service.The data system for the distribution of commodities 20 can be from supplier Data management platform obtain demander request data.
Specifically, multiple data fusion modules 202 can be data fusion module cluster.
As shown in figure 3, data circulation method may comprise steps of:
Step S301:Propelling user information, the user information include user identifier and its can use amount, initial amount shape Whether state, the initial amount state instruction can carry out data query;
Step S302:The inquiry request for receiving the user information and multiple processes from demander, is looked into according to described The initial amount state for asking the corresponding inquiry user identifier of request determines whether to carry out data query according to the inquiry request;
Step S303:Using the process number of each process and the corresponding inquiry user identifier of the inquiry request as major key, The cost of the process is stored as label value, summarizes total cost of the inquiry user identifier;
Step S304:The available amount of the inquiry user identifier and the difference always spent are calculated, is looked into described in update The initial amount state for asking user identifier, for the judgement of data query next time.
The present embodiment is by combining process number and inquiry user identifier to store the cost of each process, to be used in demander When multi-process carries out data query, total cost of each user can be summarized in conjunction with process number and inquiry user identifier, thus On the basis of realizing multiprocess communication, the accuracy controlled user's amount is improved, ensures the efficiency of data circulation.
In a specific embodiment of the invention, step S304 may comprise steps of:Reach first in the difference to set When determining threshold value, the initial amount state for updating the inquiry user identifier is that can carry out data query;It is not reached in the difference When to first given threshold, the initial amount state for updating the inquiry user identifier is that cannot carry out data query.
In another specific embodiment of the invention, step S303 may comprise steps of:In time of the inquiry request When number is less than the second given threshold, the major key and its label value are stored in caching;Reach in the number of the inquiry request When second given threshold, database is written into the major key and its label value that are stored in the caching, and is emptied described slow It deposits.
The embodiment of the present invention is deposited data when the data volume to be stored is smaller by the way that caching and database is used in combination It is stored in caching, when data volume is larger, then stores data in database, the frequent read-write of memory is avoided, reduces resource Expense.
Data circulation method shown in Fig. 3 can also include the following steps:The multiple data are obtained according to the setting period Daily record data described in the daily record data of Fusion Module includes inquiry request, the inquiry user identifier and process number;According to described Daily record data counts the user of each user identifier direction and always spends in the period within the setting period, and according to the period The available amount of total cost and each user identifier updates the available amount of each user identifier and initial amount state;It will more User information pushing after new is gone out, for the judgement of data query next time.
Further, data circulation method shown in Fig. 3 can also include the following steps:Record the daily record data most It is early to obtain the moment as the first moment, and receive the second moment of updated user information;Each user identifier is calculated in institute The error stated between the first moment and second moment is spent;It is spent according to the error and updated available amount updates The updated available amount and updated initial amount state, for data query.
The embodiment of the present invention is by recording the first moment and the second moment, and by the mistake between the first moment and the second moment Difference is spent carries out secondary update to available amount and initial amount state, ensure that the accuracy that amount calculates, and then improve base In the efficiency of the data circulation of amount control.
In a preferred embodiment of the invention, the major key and its label value are stored in database, data shown in Fig. 3 Circulation method can also include the following steps:The data in the database are cleared up according to the setting period;Alternatively, receiving After stating user information, the data in the database are cleared up.
The embodiment of the present invention clears up the data in database by using different modes, can be to avoid internal storage data The data expansion problem in library promotes stability, reliability and the availability of the data system for the distribution of commodities, to further increase data flow Logical efficiency.
About more specific implementation modes of the data circulation method, the associated description being referred in Fig. 1 to Fig. 2, Which is not described herein again.
The embodiment of the invention also discloses a kind of storage mediums, are stored thereon with computer instruction, the computer instruction The step of data circulation method shown in Fig. 3 can be executed when operation.The storage medium may include ROM, RAM, disk Or CD etc..The storage medium can also include non-volatility memorizer (non-volatile) or non-transient (non- Transitory) memory etc..
The embodiment of the invention also discloses a kind of terminal, the terminal may include memory and processor, the storage The computer instruction that can be run on the processor is stored on device.The processor can be with when running the computer instruction The step of executing data circulation method shown in Fig. 3.The terminal includes but not limited to mobile phone, computer, tablet computer etc. Terminal device.
Although present disclosure is as above, present invention is not limited to this.Any those skilled in the art are not departing from this It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute Subject to the range of restriction.

Claims (14)

1. a kind of data system for the distribution of commodities based on the control of account amount, which is characterized in that including:
Data are listed module, are suitable for propelling user information, and the user information includes user identifier and its can use amount, initial volume Whether degree state, the initial amount state instruction can carry out data query;
Multiple data fusion modules are suitable for receiving the inquiry request of the user information and multiple processes from demander, root Initial amount state according to the corresponding inquiry user identifier of the inquiry request determines whether according to the inquiry request into line number It is investigated that asking, using the process number of each process and the corresponding inquiry user identifier of the inquiry request as major key, by the process Cost stored as label value, summarize the total cost of the inquiry user identifier, calculate the inquiry user identifier Amount and the difference always spent can be used, the initial amount state of the inquiry user identifier is updated, for next number It is investigated that the judgement ask.
2. the data system for the distribution of commodities according to claim 1, which is characterized in that the data fusion module is reached in the difference When to the first given threshold, the initial amount state for updating the inquiry user identifier is that can carry out data query;Described When difference is not up to first given threshold, the initial amount state for updating the inquiry user identifier is that cannot carry out data Inquiry.
3. the data system for the distribution of commodities according to claim 1, which is characterized in that further include caching and database, looked into described When asking the number of request less than the second given threshold, the major key and its label value are stored in described by the data fusion module Caching;When the number of the inquiry request reaches second given threshold, the data fusion module will be in the caching The database is written in the major key and its label value stored, and empties the caching.
4. the data system for the distribution of commodities according to claim 1, which is characterized in that further include:
Data analysis module, suitable for obtaining daily record number described in the daily record data of the multiple data fusion module according to the setting period According to including inquiry request, the inquiry user identifier and process number;
The listed module of the data counts the user of each user identifier direction in the setting period according to the daily record data The interior period always spends, and always the available amount of cost and each user identifier updates each user identifier according to the period Available amount and initial amount state, and by updated user information pushing to the multiple data fusion module.
5. the data system for the distribution of commodities according to claim 4, which is characterized in that the data fusion module records the daily record The earliest acquisition moment of data was the first moment, and received the second moment of updated user information, calculated each user Error between first moment and second moment is identified to spend, and spent according to the error and it is updated can The updated available amount and updated initial amount state are updated with amount, for data query.
6. the data system for the distribution of commodities according to claim 1, which is characterized in that further include database and removing module;
The removing module clears up the data in the database according to the setting period;Alternatively, the removing module is in the number After receiving the user information according to Fusion Module, the data in the database are cleared up.
7. a kind of data circulation method based on the control of account amount, which is characterized in that including:
Propelling user information, the user information include user identifier and its can use amount, initial amount state, the initial volume Whether degree state instruction can carry out data query;
The inquiry request for receiving the user information and multiple processes from demander is looked into according to the inquiry request is corresponding The initial amount state for asking user identifier determines whether to carry out data query according to the inquiry request;
Using the corresponding inquiry user identifier of the process number of each process and the inquiry request as major key, by the flower of the process Expense is stored as label value, summarizes total cost of the inquiry user identifier;
The available amount of the inquiry user identifier and the difference always spent are calculated, the first of the inquiry user identifier is updated Beginning amount state, for the judgement of data query next time.
8. data circulation method according to claim 7, which is characterized in that it is described calculate it is described inquiry user identifier can With amount and the difference always spent, the initial amount state for updating the inquiry user identifier includes:
When the difference reaches the first given threshold, the initial amount state for updating the inquiry user identifier is that can carry out Data query;
When the difference is not up to first given threshold, the initial amount state for updating the inquiry user identifier is not It can carry out data query.
9. data circulation method according to claim 7, which is characterized in that described by the process number of each process and described The corresponding inquiry user identifier of inquiry request as major key, using the cost of the process as label value carry out storage include:
When the number of the inquiry request is less than the second given threshold, the major key and its label value are stored in caching;
When the number of the inquiry request reaches second given threshold, the major key and its mark that will be stored in the caching Database is written in label value, and empties the caching.
10. data circulation method according to claim 7, which is characterized in that further include:
It includes inquiry request, institute to obtain daily record data described in the daily record data of the multiple data fusion module according to the setting period State inquiry user identifier and process number;
The user of each user identifier direction is counted according to the daily record data always to spend in the period within the setting period, and It is always spent according to the period and the available amount of each user identifier updates the available amount of each user identifier and initial Amount state;
Updated user information pushing is gone out, for the judgement of data query next time.
11. data circulation method according to claim 10, which is characterized in that further include:
When recording the earliest acquisition moment of the daily record data as the first moment, and receiving the second of updated user information It carves;
Error of each user identifier between first moment and second moment is calculated to spend;
It is spent according to the error and updated available amount updates the updated available amount and updated initial Amount state, for data query.
12. data circulation method according to claim 7, which is characterized in that the major key and its label value are stored in number According in library, the data circulation method further includes:
The data in the database are cleared up according to the setting period;
Alternatively, after receiving the user information, the data in the database are cleared up.
13. a kind of storage medium, is stored thereon with computer instruction, which is characterized in that executed when the computer instruction operation The step of any one of claim 7 to 12 data circulation method.
14. a kind of terminal, including memory and processor, the meter that can be run on the processor is stored on the memory Calculation machine instructs, which is characterized in that perform claim requires any one of 7 to 12 institutes when the processor runs the computer instruction The step of stating data circulation method.
CN201711434976.XA 2017-12-26 2017-12-26 Data circulation system and method based on account limit control, storage medium and terminal Active CN108280134B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711434976.XA CN108280134B (en) 2017-12-26 2017-12-26 Data circulation system and method based on account limit control, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711434976.XA CN108280134B (en) 2017-12-26 2017-12-26 Data circulation system and method based on account limit control, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN108280134A true CN108280134A (en) 2018-07-13
CN108280134B CN108280134B (en) 2020-08-04

Family

ID=62802224

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711434976.XA Active CN108280134B (en) 2017-12-26 2017-12-26 Data circulation system and method based on account limit control, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN108280134B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491772A (en) * 2018-09-28 2019-03-19 深圳财富农场互联网金融服务有限公司 Business serial number gencration method, apparatus, computer equipment and storage medium
CN110599185A (en) * 2019-07-30 2019-12-20 上海数据交易中心有限公司 Account synchronization method and device, data transaction system, storage medium and terminal
CN110597848A (en) * 2019-08-06 2019-12-20 上海数据交易中心有限公司 Data service settlement method and system, storage medium and server

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070271506A1 (en) * 2006-05-18 2007-11-22 Steven Sholtis Configurable information transmission
CN101819574A (en) * 2009-10-13 2010-09-01 腾讯科技(深圳)有限公司 Search engine system and information searching method
CN102195998A (en) * 2010-03-03 2011-09-21 英业达股份有限公司 Personalized data query and operating system and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070271506A1 (en) * 2006-05-18 2007-11-22 Steven Sholtis Configurable information transmission
CN101819574A (en) * 2009-10-13 2010-09-01 腾讯科技(深圳)有限公司 Search engine system and information searching method
CN102195998A (en) * 2010-03-03 2011-09-21 英业达股份有限公司 Personalized data query and operating system and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
拖洪华: "云计算环境中的数据查询处理方法研究", 《无线互联科技》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109491772A (en) * 2018-09-28 2019-03-19 深圳财富农场互联网金融服务有限公司 Business serial number gencration method, apparatus, computer equipment and storage medium
CN109491772B (en) * 2018-09-28 2020-10-27 深圳财富农场互联网金融服务有限公司 Service sequence number generation method and device, computer equipment and storage medium
CN110599185A (en) * 2019-07-30 2019-12-20 上海数据交易中心有限公司 Account synchronization method and device, data transaction system, storage medium and terminal
CN110597848A (en) * 2019-08-06 2019-12-20 上海数据交易中心有限公司 Data service settlement method and system, storage medium and server

Also Published As

Publication number Publication date
CN108280134B (en) 2020-08-04

Similar Documents

Publication Publication Date Title
JP2848703B2 (en) Equipment for billing and delivering materials in a manufacturing environment
US7043444B2 (en) Synchronization of planning information in a high availability planning and scheduling architecture
CN108446975B (en) Quota management method and device
CN108280134A (en) The data system for the distribution of commodities and method, storage medium, terminal based on the control of account amount
US8078294B2 (en) Conditional download of data from embedded historians
CN102609466B (en) Method and system for controlling shared memory
CN106302122B (en) Virtual objects management method and device
CN104407926A (en) Scheduling method of cloud computing resources
CN104462432A (en) Self-adaptive distributed computing method
CN108960790A (en) A kind of processing method, device, server and the system of bill business
CN108416657A (en) A kind of order generation method and equipment based on counseling services
CN111400356A (en) Data query method, device and equipment
CN111985862A (en) Method and apparatus for locating inventory items
CN102073940A (en) Station platform dynamic distribution method and system during on-line reservation of supplier
CN110069533A (en) A kind of event subscription method and device based on block chain
CN102511041A (en) Attributing causality to program execution capacity modifications and dynamically modifying program execution capacity
CN108958891A (en) A kind of virutal machine memory distribution method, device and terminal
CN105978744B (en) A kind of resource allocation methods, apparatus and system
CN102054229A (en) Distributed member information management system and method for member information management
CN109741153A (en) Overtime transaction processing method, device, computer equipment and storage medium
CN110599133A (en) Data processing method and device based on block chain network and storage medium
CN105354317A (en) Hotel database updating method and system
US7024371B2 (en) High availability planning and scheduling architecture
CN109614386B (en) Data processing method, device, server and computer readable storage medium
CN110648129A (en) Quota control method and device for batch distribution system, storage medium and terminal

Legal Events

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