CN108073712A - Master data delet method, device and computer equipment in information system - Google Patents

Master data delet method, device and computer equipment in information system Download PDF

Info

Publication number
CN108073712A
CN108073712A CN201711404896.XA CN201711404896A CN108073712A CN 108073712 A CN108073712 A CN 108073712A CN 201711404896 A CN201711404896 A CN 201711404896A CN 108073712 A CN108073712 A CN 108073712A
Authority
CN
China
Prior art keywords
master data
reference count
field
deleted
name
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
CN201711404896.XA
Other languages
Chinese (zh)
Other versions
CN108073712B (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201711404896.XA priority Critical patent/CN108073712B/en
Publication of CN108073712A publication Critical patent/CN108073712A/en
Application granted granted Critical
Publication of CN108073712B publication Critical patent/CN108073712B/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/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/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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2445Data retrieval commands; View definitions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A kind of master data delet method in information system, including:Obtain master data to be deleted and corresponding master data mark;Table name, reference field name and the reference count of corresponding reference list are searched from default reference count table according to master data mark;The reference count is ranked up, obtains the corresponding reference list of reference count maximum in ranking results and reference field name;Judge whether the reference list quotes the master data to be deleted;If not, then delete the reference count of the maximum, and it returns and is ranked up the reference count, the step of obtaining the corresponding reference list of reference count maximum in ranking results and reference field name, until the reference count is deleted entirely, the master data to be deleted is then deleted, realizes and is gone to judge whether the corresponding reference list of maximum reference count quotes master data successively according to the size of reference count, master data is enable to improve efficiency and performance stabilization when deleting.

Description

Master data delet method, device and computer equipment in information system
Technical field
The present invention relates to data processing field, more particularly in a kind of information system master data delet method, device, Computer equipment and storage medium.
Background technology
In existing information system delete master data when, in order to ensure the uniformity of data, it is necessary to judge business datum with Adduction relationship between master data, if the master data not cited in business datum, could delete the master data.Wherein, The data that master data refers to share between each system in entire enterprise-wide are (for example, client, supplier, account and tissue Department's related data).It is general judge business datum and master data adduction relationship means it is main there are two:First, utilize data The foreign key relationship in storehouse goes to determine adduction relationship, and this method establishes substantial amounts of foreign key relationship in complex business systems, increased to deposit Space is stored up, system performance can be caused to reduce;Second is that being cited based on adduction relationship to check whether, basic skills is based on table Relation establishes adduction relationship table, when quoting inspection, cycles all reference lists, and table judges one by one.This method quotes the review time Complexity is highly unstable, and best situation is to check 1 time, and worst situation is n times, exactly needs to check that all applications are closed It is table, very at random, causes performance poor and unstable, efficiency is than relatively low.
The content of the invention
Based on this, it is necessary to for above-mentioned technical problem, provide a kind of information system that can be improved efficiency and performance and stablize Master data delet method, device, computer equipment and storage medium in system.
A kind of master data delet method in information system, including:
Obtain master data to be deleted and corresponding master data mark;
The table name that corresponding reference list is searched from default reference count table, reference field name are identified according to master data and drawn With counting;
Reference count is ranked up, obtains the corresponding reference list of reference count maximum in ranking results and reference field Name;
Judge whether reference list quotes master data to be deleted;
It if it is not, then deleting maximum reference count, and returns and is ranked up the reference count, obtain in ranking results The step of maximum corresponding reference list of reference count and reference field name, until reference count is deleted entirely, then deletes and waits to delete Except master data.
In one of the embodiments, after judging whether reference list quotes master data, further include:
If quoting table reference master data to be deleted, prompt master data to be deleted that can not delete.
In one of the embodiments, judge whether reference list quotes master data to be deleted, including:
Judge to correspond in reference list in the data in reference field name with the presence or absence of the corresponding master data of maximum reference count Mark, if there are master data marks, quotes table reference master data to be deleted, otherwise, if not drawing there are master data mark Master data to be deleted is not quoted with table.
In one of the embodiments, this method further includes:
Default reference count table is established, master data mark, reference list table name are had recorded in default reference count table, quotes word Section name and the correspondence of reference count.
In one of the embodiments, default reference count table is established, including:
The attribute field of reference count table is established, attribute field includes master data identification field, reference list file-name field, quotes Field name field and reference count field;
Business datum is obtained, obtains the master data mark of business datum;
When business datum is written to the tables of data in information system, the word that master data mark is write in tables of data is obtained Section;
The reference count of the field of record write-in master data mark identifies master data, the table name of tables of data, the main number of write-in It is written to according to the field name of mark with the reference count of record in the corresponding attribute field of reference count table, generates and default quote meter Number table.
In one of the embodiments, the reference count of the field of record write-in master data mark, master data is identified, is counted The corresponding attribute word of reference count table is written to according to the reference count of the table name of table, the field name and record of write-in master data mark Duan Zhong generates default reference count table, including:
Reference counter is established to the field of write-in master data mark, the data being written to when business datum in information system After table, reference counter, which increases, to be counted, and obtains reference count;
Each reference counter increase then identifies master data after counting to get reference count, the table name of tables of data, write-in It is corresponding that the field name of master data mark and the corresponding reference count of field identified with writing master data are written to reference count table Attribute field in, generate default reference count table.
In one of the embodiments, the reference count of the field of record write-in master data mark, master data is identified, is counted The corresponding attribute word of reference count table is written to according to the reference count of the table name of table, the field name and record of write-in master data mark Duan Zhong generates default reference count table, including:
Reference counter is established to the field of write-in master data mark, the data being written to when business datum in information system After table, reference counter, which increases, to be counted, and obtains reference count, the corresponding reference count of business datum is added up, is obtained Reference count total value is saved in redis by reference count total value;
Master data is identified, the table name of tables of data, write-in master data mark field name and redis in preserve with write-in The corresponding reference count total value of field of master data mark is written in the corresponding attribute field of reference count table, and generation is default to draw Use count table.
A kind of master data in information system deletes device, including
Master data acquisition module, for obtaining master data to be deleted and corresponding master data mark;
Searching module, for searched according to master data mark from default reference count table the table name of corresponding reference list, Reference field name and reference count;
Reference information acquisition module for reference count to be ranked up, obtains reference count maximum in ranking results Corresponding reference list and reference field name;
Judgment module, for judging whether reference list quotes master data to be deleted;
Removing module for if it is not, then delete maximum reference count, and returns and is ranked up the reference count, The step of obtaining the corresponding reference list of reference count maximum in ranking results and reference field name, until reference count is deleted entirely It removes, then deletes master data to be deleted.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage Computer program, processor realize the step in the master data delet method in any of the above-described information system when performing program.
A kind of computer storage media, is stored thereon with computer program, which realizes above-mentioned when being executed by processor The step in master data delet method in any one information system
Master data delet method, device, computer equipment and storage medium in above- mentioned information system will be deleted by obtaining The master data removed and corresponding master data mark search corresponding master data according to master data mark from default reference count table Table name, reference field name and the reference count of reference list.Reference count is ranked up, obtains reference maximum in ranking results Corresponding reference list and reference field name are counted, judges whether reference list quotes master data to be deleted.If it is not, then delete maximum Reference count, and return and be ranked up the reference count, obtain the corresponding reference of reference count maximum in ranking results The step of table and reference field name, until reference count is deleted entirely, then deletes master data to be deleted.It realizes and is counted according to reference Several sizes goes to judge whether the corresponding reference list of maximum reference count quotes master data successively, reduces the accidental of casual inspection Property so that the stability of efficiency and performance can be improved when master data is deleted.
Description of the drawings
Fig. 1 is the application scenario diagram of the master data delet method in information system in one embodiment;
Fig. 2 is the flow diagram of the master data delet method in information system in one embodiment;
Fig. 3 is the flow diagram that default reference count table is established in one embodiment;
Fig. 3-a are the control schematic diagram for the default reference count table and reference list established in one embodiment;
Fig. 4 is the flow diagram that default reference count table is generated in one embodiment;
Fig. 5 is the flow diagram that default reference count table is generated in another embodiment;
Fig. 6 is the structure diagram of the master data deletion device in information system in one embodiment
Fig. 7 is the structure diagram that count table establishes module in one embodiment;
Fig. 8 is the cut-away view of one embodiment Computer equipment.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
As shown in Figure 1, in one embodiment, provide a kind of concrete application of the master data delet method in information system Scene graph, including server 102 and terminal 104.Server 102 and 104 network connection of terminal.Terminal 104 is deleted for receiving Then the order of master data sends master data to be deleted to server 102.Server 102 obtains master data to be deleted and right The master data mark answered searches the table name of corresponding reference list according to master data mark from default reference count table, quotes word Section name and reference count.Reference count is ranked up, obtain in ranking results the maximum corresponding reference list of reference count and Reference field name.Judge whether reference list quotes master data to be deleted, if it is not, then delete maximum reference count, and return by The reference count is ranked up, and obtains the step of the corresponding reference list of reference count maximum in ranking results and reference field name Suddenly, until reference count is deleted entirely, then master data to be deleted is deleted.
As shown in Fig. 2, in one embodiment, provide a kind of flow signal of the master data delet method in information system Figure.This method is applied to the server 102 in Fig. 1, comprises the following steps:
S202 obtains master data to be deleted and corresponding master data mark.
Each master data has its corresponding master data mark, when user will delete master data, gets to be deleted Master data and corresponding master data mark.
S204 searches table name, the reference field of corresponding reference list according to master data mark from default reference count table Name and reference count.
The table for the reference list for quoting master data is found from the reference count table pre-set according to master data mark Reference field name and the reference count of master data mark are stored in name, reference list.Reference count table is record reference table and main number The tables of data of adduction relationship between.Mark, the reference master data mark that master data is had recorded in reference count table are corresponding The master data and reference count that specific field is quoted in the table name of the reference list of master data, reference list.Wherein, reference list is Finger, which is stored in master data in information system, the tables of data of adduction relationship.Reference count refers to be saved in information system in business datum When in during tables of data of uniting, the number that is cited of master data of master data mark.
Reference count is ranked up by S206, is obtained the corresponding reference list of reference count maximum in ranking results and is drawn Use field name.
Since master data can be cited in different tables, multiple reference counts can be found, will be looked into using sort algorithm The reference count found is ranked up, and sort algorithm can use bubble sort, selected and sorted, insertion sort, merger sequence, heap Sequence and quicksort etc..
The maximum corresponding reference list of reference count and reference word are found in default reference count table according to ranking results Section name.Wherein, the master data of maximum reference count corresponding master data mark is cited in most possible referenced table reality, So directly acquiring the maximum corresponding reference list of reference count and reference field name, facilitate subsequent processing, improve master data The treatment effeciency of deletion.
S208, judges whether reference list quotes master data to be deleted.
Specifically, judging whether reference list quotes master data to be deleted, it is possible to which having with master data in reference list is drawn It has been deleted with the data of relation, that is, has had recorded reference number, but actually master data is not cited, if referring to wait to delete Except master data, then illustrate that the master data cited in the maximum corresponding reference list of reference count, then directly performs step S208A.If not quoting master data to be deleted, need to judge in ranking results maximum in addition to maximum reference count Whether the corresponding reference list of reference count refers to master data to be deleted, then needs to perform step S208a.
S208A prompts master data to be deleted that can not delete.
Specifically, it in most cases, after a master data is established and uses a period of time, can not all delete. As long as quoting table reference master data to be deleted, suggest that user's master data is cited and can not delete.Under normal circumstances, pass through Judgement once, it is possible to judge whether reference list quotes master data to be deleted, i.e., whether can delete master data to be deleted. Typically there is reference, i.e., can not delete.Just finish master data deletion process flow, no longer in other reference list into It is capable to judge whether to quote master data to be deleted, improve the stability of efficiency and performance.
S208a deletes maximum reference count.
If judging, reference list does not quote master data to be deleted, deletes the reference count, carries out data correction, next time It would not carry out repeating judgement when delete the master data.
S208b, judges whether reference count is deleted entirely.
Specifically, each master data generally all can not be drawn by multiple reference table references when actual in all references table During with the master data, the master data could be deleted, that is, judges whether reference count is deleted entirely, if complete be deleted, performs step Rapid S208c, otherwise, that is, judges that reference count is not deleted entirely, then is continued to judge remaining reference count according to ranking results Whether the corresponding reference list of reference count of middle maximum quotes master data.Then return to step S206 is continued to execute.
S208c deletes master data to be deleted.
It is not only all cited in all reference lists when master data is actual, master data to be deleted could be deleted.One As in the case of master data established in information system and using a period of time after can not all delete, judge whether to delete The judgement that master data to be deleted only needs reference list of progress whether to quote master data to be deleted is assured that master to be deleted Data cannot delete.
In one embodiment, if a master data is just established, user wants to delete the master data again.At this point, default draw With the reference count there are no the master data in count table, i.e. default reference count table search main number corresponding less than the master data According to mark, then the master data can be deleted at once, solve master data and increase newly when deleting, it is necessary to check all adduction relationships The problem of table is judged improves the stabilization row of efficiency and performance.
In the above-described embodiments, identified by obtaining the master data to be deleted and corresponding master data, according to master data mark Know table name, reference field name and the reference count for the reference list that corresponding master data is searched from default reference count table.It will quote Counting is ranked up, and is obtained the corresponding reference list of reference count maximum in ranking results and reference field name, is judged reference list Whether to be deleted master data is quoted.If it is not, maximum reference count is then deleted, and return to step S206, until reference count is complete It is deleted, then deletes master data to be deleted.If so, prompt master data to be deleted that can not delete.It realizes according to reference count Size go to judge whether the corresponding reference list of maximum reference count quotes master data successively, reduce the accidental of casual inspection Property so that can be improved when master data is deleted and the stability of performance.
In one embodiment, judge whether reference list quotes master data to be deleted, including:Judge that correspondence is drawn in reference list It is identified with the presence or absence of the corresponding master data of maximum reference count in the data in field name, if there are master data marks, drawn With table reference master data to be deleted, otherwise, if not there are master data mark, reference list does not quote master data to be deleted.
If to quote master data in reference list, will be identified there are one the corresponding master data of field storage master data, i.e., It is deposited if judging to correspond in reference list in the data in reference field name with the presence or absence of the corresponding master data mark of maximum reference count It is identified in master data, then table reference master data to be deleted is quoted, otherwise, if not there are master data mark, reference list does not have Quote master data to be deleted.
In one embodiment, the master data delet method in information system further includes:Default reference count table is established, in advance If the correspondence of master data mark, reference list table name, reference field name and reference count is had recorded in reference count table.
In information system, pre-set reference count table is established, master data mark is had recorded in default reference count table The correspondence of knowledge, reference list table name, reference field name and reference count, when business datum is saved in information system, The corresponding master data mark of the business datum, reference list table name, reference field name are write in default reference count table and quotes meter Number.
As shown in figure 3, in one embodiment, default reference count table is established, including:
S302, establishes the attribute field of reference count table, and attribute field includes master data identification field, reference list name Section, reference field file-name field and reference count field.
Reference count table is established in information system, the attribute field of the reference count table include master data identification field, Reference list file-name field, reference field file-name field and reference count field.Wherein, attribute field refers to that the reference count table is being established When required object
S304 obtains business datum, obtains the master data mark of business datum.
Business datum is obtained, wherein business datum refers to the data that business specifically occurs, and with time-shift, data volume is got over Come more.The master data that business object is obtained according to business datum identifies.I.e. by analyzing each property value in business object, It determines the adduction relationship with master data, obtains the corresponding master data mark of master data.For example, get the business number of buying material According to the master data for getting the business datum of material is identified as ABC.The then association attributes of material, the size of material, specification, face Color, quantity, price....Etc., be all material A BC master data.A business datum is generated, when generating a purchase order, It needs to obtain different master datas, purchases size, color, quantity, the price of material;And the number of supplier, credit rating and Warehouse this data of grade stored after buying is exactly a business datum.
S306 when business datum is written to the tables of data in information system, is obtained and master data mark is write in tables of data Field.
When business datum is written to the tables of data in information system, the word that master data mark is write in tables of data is got Section.For example, when in the purchase order table business datum of buying material being written in information system, material is written The field of ABC is material field.
S308, the reference count of the field of record write-in master data mark, master data is identified, the table name of tables of data, is write The reference count for becoming owner of the field name and record of Data Identification is written in the corresponding attribute field of reference count table, and generation is default Reference count table.
The reference count of the field of record write-in master data mark, by the master data mark of business datum, the number to be write The corresponding attribute word of reference count table is written to according to the reference count of the table name of table, the field name and record of write-in master data mark Duan Zhong generates default reference count table.As shown in Fig. 3-a, when the business datum that material A BC is write in purchase order table, The field for obtaining writing master data mark ABC in purchase order table is this field of material, then in the master of reference count table ABC is write in data identification field, purchase order table is write in table name is quoted, material is write in reference field name, then It is 1000 times to write reference count, obtains default reference count table.
In the above-described embodiments, by establishing the attribute field of reference count table, business datum is obtained, obtains business datum Master data mark, obtain the field that master data mark is write in tables of data, the field of final entry write-in master data mark Reference count will identify master data, the reference count of the field name and record of the table name of tables of data, write-in master data mark is write Enter into the corresponding attribute field of reference count table, generate default reference count table.By establishing default reference count table, realize Reference count when master data is deleted in default reference count table judge whether that master data can be deleted, carries The stability of efficiency and performance when high master data is deleted.
As shown in figure 4, in one embodiment, the reference count of the field of record write-in master data mark, by master data The reference count of field name and record that mark, the table name of tables of data, write-in master data identify is written to reference count table correspondence Attribute field in, generate default reference count table, including:
S402 establishes reference counter, when business datum is written in information system to the field of write-in master data mark Tables of data after, reference counter increase count, obtain reference count.
Specifically, each master data has and establishes multiple reference counters, i.e., in different tables, write-in master data mark Field it is different, a reference counter is established to each corresponding field, when business datum is written in information system After tables of data, reference counter, which increases, to be counted, and is obtained reference count, i.e., when business datum is written to information system, all can Master data is quoted, quote all can add 1 every time by counter, obtain reference count.
S404, each reference counter increase then identifies master data after counting to get reference count, the table name of tables of data, The field name of write-in master data mark and reference count corresponding with the field of write-in master data mark are written to reference count table In corresponding attribute field, default reference count table is generated.
The reference count that obtains after the tables of data that each business datum is written in information system, master data mark, The table name of tables of data is written to the field name of write-in master data mark in the corresponding attribute field of reference count table, and generation is default Reference count table.
In the above-described embodiments, reference counter, each business datum are established by the field identified to write-in master data Write tables of data when, reference counter increase count, obtain reference count, finally by obtained reference count, master data mark, The table name of tables of data is written to the field name of write-in master data mark in the corresponding attribute field of reference count table, and generation is default Reference count table realizes and pre-establishes reference count table, enables to carry directly using reference count table when master data is deleted Efficiency when high master data is deleted.
As shown in figure 5, in one embodiment, the reference count of the field of record write-in master data mark, by master data The reference count of field name and record that mark, the table name of tables of data, write-in master data identify is written to reference count table correspondence Attribute field in, generate default reference count table, including:
S502 establishes reference counter, when business datum is written in information system to the field of write-in master data mark Tables of data after, reference counter increase count, obtain reference count, the corresponding reference count of business datum tired out Add, obtain reference count total value, reference count total value is saved in redis.
Specifically, reference counter is established to the field of write-in master data mark, when multiple users write business datum When entering the tables of data into information system, during the tables of data being written to business datum to each user in information system, quote Counter increase count, obtain the corresponding reference count of each user business datum to be write, by all reference counts into Row is cumulative, obtains the reference count total value of the business datum, reference count total value is saved in redis, wherein, redis is One is increased income, the data structure server of memory storage, can be used as database, cache and message queue agency.It is propped up Hold the data types such as character string, Hash table, list, set, ordered set, bitmap, hyperloglogs.
Master data is identified, preserved in the field name and redis of the table name of tables of data, write-in master data mark by S504 Reference count total value corresponding with the field of write-in master data mark is written in the corresponding attribute field of reference count table, is generated Default reference count table.
Specifically, then master data is identified, in the field name and redis of the table name of tables of data, write-in master data mark The reference count total value timing corresponding with the field of write-in master data mark preserved is written to the corresponding attribute of reference count table In field, default reference count table is generated.
In the above-described embodiments, by the way that the corresponding reference count of business datum is added up, reference count total value is obtained, Reference count total value is saved in redis, is then identified master data, the table name of tables of data, the word of write-in master data mark What is preserved in section name and redis is written to reference count table pair with the corresponding reference count total value of field of write-in master data mark In the attribute field answered, default reference count table is generated.By the way that first obtained reference count is saved in redis, Ran Houzai It is written to reference count total value is preserved in redis in default reference count table, improves the stability of performance.
In one embodiment, after the default reference count table of generation, business datum writes information system When in tables of data, the field for the mark for writing master data in business datum in the mark and tables of data of master data is obtained, record is write Become owner of the new reference count of the field of Data Identification.The corresponding reference count of mark of master data in reference count table is obtained, Reference count in reference count table and the new reference count of record are added up, obtain total reference count, then will Total reference count is written to master data in reference count table and identifies in corresponding reference count field, realizes reference count Update so that the reference count obtained when master data is deleted can be more accurate.
As shown in fig. 6, in one embodiment, the master data in a kind of information system deletes device, is obtained including master data Modulus block 602 looks for module 604, reference information acquisition module 606, judgment module 608 and removing module 610, wherein:
Master data acquisition module 602, for obtaining master data to be deleted and corresponding master data mark.
Searching module 604, for searching the table of corresponding reference list from default reference count table according to master data mark Name, reference field name and reference count.
Reference information acquisition module 606 for reference count to be ranked up, obtains reference meter maximum in ranking results The corresponding reference list of number and reference field name.
Judgment module 608, for judging whether reference list quotes master data to be deleted.
Removing module 610 for if it is not, then delete maximum reference count, and returns and arranges the reference count Sequence, the step of obtaining the maximum corresponding reference list of reference count and reference field name in ranking results, until reference count is complete It is deleted, then deletes master data to be deleted.
In the above-described embodiments, master data to be deleted and corresponding main number are got by master data acquisition module 602 According to mark, the table that corresponding reference list is found from default reference count table is identified according to master data in searching module 604 Name, reference field name and reference count.Reference information acquisition module 606 get the corresponding reference list of maximum reference count and Reference field, judges whether reference list quotes master data to be deleted in judgment module 608, is treated in removing module 610 The deletion of master data is deleted, ensure that the stability that efficiency and performance can be improved during master data deletion.
In one embodiment, the master data in a kind of information system deletes device, further includes:
Can not removing module, if for quote table reference master data to be deleted, prompt master data to be deleted that can not delete.
In one embodiment, judgment module 608, including:
Judgment module is identified, is quoted for judging to correspond in reference list in the data in reference field name with the presence or absence of maximum Corresponding master data mark is counted, if there are master data marks, table reference master data to be deleted is quoted, otherwise, if not depositing It is identified in master data, then reference list does not quote master data to be deleted.
In one embodiment, the master data in a kind of information system deletes device, further includes:
Count table establishes module, and for establishing default reference count table, master data mark is had recorded in default reference count table The correspondence of knowledge, reference list table name, reference field name and reference count.
As shown in fig. 7, in one embodiment, count table establishes module, including:
Field establishes module 702, and for establishing the attribute field of reference count table, attribute field includes master data identifier word Section, reference list file-name field, reference field file-name field and reference count field.
Identifier acquisition module 704 for obtaining business datum, obtains the master data mark of business datum.
Field acquisition module 706 is write, for when business datum is written to the tables of data in information system, obtaining data The field of master data mark is write in table.
Count table generation module 708, for recording the reference count of the field of write-in master data mark, by master data mark It is corresponding that the reference count of field name and record that knowledge, the table name of tables of data, write-in master data identify is written to reference count table In attribute field, default reference count table is generated.
In one embodiment, count table generation module, including:
Counter establishes module, reference counter is established for the field to write-in master data mark, when business datum is write After entering the tables of data into information system, reference counter, which increases, to be counted, and obtains reference count.
Writing module then identifies master data after counting to get reference count for each reference counter increase, data The table name of table, the field name of write-in master data mark and reference count corresponding with the field of write-in master data mark are written to and draw With in the corresponding attribute field of count table, generate and preset reference count table.
In one embodiment, count table generation module, including:
Preserving module is counted, reference counter is established for the field to write-in master data mark, when business datum writes After tables of data into information system, reference counter, which increases, to be counted, and reference count is obtained, by the corresponding reference of business datum Counting adds up, and obtains reference count total value, and reference count total value is saved in redis.
Attribute field writing module, for master data to be identified, the table name of tables of data, write-in master data mark field name It is corresponding that reference count total value corresponding with the field identified with write-in master data preserved in redis is written to reference count table In attribute field, default reference count table is generated.
As shown in figure 8, in one embodiment, a kind of computer equipment is provided, including what is connected by system bus Processor, memory, storage medium, network interface.Memory includes built-in storage and non-volatile memory medium, the computer The master data being stored in the non-volatile memory medium of equipment in operating system and a kind of information system deletes the calculating of device Machine program, the computer program that the master data in the information system deletes device are used to implement a kind of master data in information system Delet method.The processor of the computer equipment is configured as performing a kind of information system for providing calculating and control ability In master data delet method.Built-in storage in the computer equipment is the computer program in non-volatile memory medium Operation provides environment.Network interface in the computer equipment identifies for obtaining master data to be deleted and corresponding master data Deng.The computer equipment can be desktop computer or such as smart mobile phone, tablet computer or personal digital assistant Mobile terminal.It will be understood by those skilled in the art that the structure shown in Fig. 8, only with the relevant portion of the present invention program The block diagram of separation structure does not form the restriction for the computer equipment being applied thereon to the present invention program, specific computer Equipment can include either combining some components or with different component cloth than more or fewer components shown in figure It puts.
A kind of computer readable storage medium, is stored thereon with computer program, which realizes when being executed by processor The step of master data delet method in above- mentioned information system:Obtain master data to be deleted and corresponding master data mark;According to Master data identifies table name, reference field name and the reference count that corresponding reference list is searched from default reference count table;It will draw It is ranked up with counting, obtains the corresponding reference list of reference count maximum in ranking results and reference field name;Judge to quote Whether table quotes master data to be deleted;If it is not, then deleting maximum reference count, and return and arrange the reference count Sequence, the step of obtaining the maximum corresponding reference list of reference count and reference field name in ranking results, until reference count is complete It is deleted, then deletes master data to be deleted.
In one embodiment, after judging whether reference list quotes master data, further include:If it quotes table reference to wait to delete Except master data, then prompt master data to be deleted that can not delete.
In one embodiment, judge whether reference list quotes master data to be deleted, including:Judge that correspondence is drawn in reference list It is identified with the presence or absence of the corresponding master data of maximum reference count in the data in field name, if there are master data marks, drawn With table reference master data to be deleted, otherwise, if not there are master data mark, reference list does not quote master data to be deleted.
In one embodiment, this method further includes:Default reference count table is established, is had recorded in default reference count table The correspondence of master data mark, reference list table name, reference field name and reference count.
In one embodiment, default reference count table is established, including:Establish the attribute field of reference count table, attribute Field includes master data identification field, reference list file-name field, reference field file-name field and reference count field;Acquisition business number According to the master data for obtaining business datum identifies;When business datum is written to the tables of data in information system, obtain in tables of data Write the field of master data mark;The reference count of the field of record write-in master data mark, master data is identified, tables of data The reference count of field name and record that table name, write-in master data identify is written in the corresponding attribute field of reference count table, The default reference count table of generation.
In one embodiment, the reference count of the field of record write-in master data mark, master data is identified, tables of data The reference count of field name and record of table name, write-in master data mark be written to the corresponding attribute field of reference count table In, default reference count table is generated, including:Reference counter is established to the field of write-in master data mark, when business datum is write After entering the tables of data into information system, reference counter, which increases, to be counted, and obtains reference count;Each reference counter increases Count to get then master data is identified after reference count, the field name of the table name of tables of data, write-in master data mark and with write-in The corresponding reference count of field of master data mark is written in the corresponding attribute field of reference count table, is generated default quote and is counted Number table.
In one embodiment, the reference count of the field of record write-in master data mark, master data is identified, tables of data The reference count of field name and record of table name, write-in master data mark be written to the corresponding attribute field of reference count table In, default reference count table is generated, including:Reference counter is established to the field of write-in master data mark, when business datum is write After entering the tables of data into information system, reference counter, which increases, to be counted, and is obtained reference count, is drawn business datum is corresponding It is added up with counting, obtains reference count total value, reference count total value is saved in redis;Master data is identified, data The table name of table, write-in master data mark field name and redis in preserve corresponding with the field of write-in master data mark draw It is written to counting total value in the corresponding attribute field of reference count table, generates default reference count table.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, it is non-volatile computer-readable that the program can be stored in one It takes in storage medium, in the embodiment of the present invention, which can be stored in the non-volatile memory medium of computer system, and It is performed by least one processor in the computer system, to realize the flow for including the embodiment such as above-mentioned each method.Its In, the storage medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random storage Memory body (RandomAccess Memory, RAM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited In contradiction, the scope that this specification is recorded all is considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and description is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that come for those of ordinary skill in the art It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

1. a kind of master data delet method in information system, which is characterized in that including:
Obtain master data to be deleted and corresponding master data mark;
The table name that corresponding reference list is searched from default reference count table, reference field name are identified according to the master data and drawn With counting;
The reference count is ranked up, obtains the corresponding reference list of reference count maximum in ranking results and reference field Name;
Judge whether the reference list quotes the master data to be deleted;
It if it is not, then deleting the reference count of the maximum, and returns and is ranked up the reference count, obtain in ranking results The step of maximum corresponding reference list of reference count and reference field name, until the reference count is deleted entirely, then deletes The master data to be deleted.
2. according to the method described in claim 1, it is characterized in that, judge the reference list whether quote the master data it Afterwards, further include:
If master data to be deleted described in the reference table reference, prompts the master data to be deleted that can not delete.
3. according to the method described in claim 1, it is characterized in that, judge whether the reference list quotes the main number to be deleted According to, including:
Judge to correspond in the reference list in the data in the reference field name and be corresponded to the presence or absence of the maximum reference count Master data mark, if there are master data mark, it is described to quote master data to be deleted described in table reference, otherwise, if not having Have there are master data mark, then the reference list does not quote the master data to be deleted.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
The default reference count table is established, master data mark, reference list table name are had recorded in the default reference count table, is drawn With field name and the correspondence of reference count.
5. according to the method described in claim 4, it is characterized in that, described establish the default reference count table, including:
The attribute field of reference count table is established, the attribute field includes master data identification field, reference list file-name field, quotes Field name field and reference count field;
Business datum is obtained, obtains the master data mark of the business datum;
When the business datum is written to the tables of data in information system, obtains and the master data mark is write in the tables of data The field of knowledge;
Record the reference count of the field of said write master data mark, by master data mark, the tables of data table name, The field name of said write master data mark and the reference count recorded are written to the corresponding attribute field of the reference count table In, generate the default reference count table.
6. according to the method described in claim 5, it is characterized in that, the field of the record said write master data mark is drawn With counting, field name that master data mark, the table name of the tables of data, said write master data are identified and record draw It is written to counting in the corresponding attribute field of the reference count table, generates the default reference count table, including:
Reference counter is established to the field of said write master data mark, when the business datum is written in information system After tables of data, the reference counter, which increases, to be counted, and obtains reference count;
Each reference counter increase count to get after reference count then by master data mark, the tables of data table name, The field name of said write master data mark and reference count corresponding with the field of write-in master data mark are written to described draw With in the corresponding attribute field of count table, the default reference count table is generated.
7. according to the method described in claim 5, it is characterized in that, the field of the record said write master data mark is drawn With counting, field name that master data mark, the table name of the tables of data, said write master data are identified and record draw It is written to counting in the corresponding attribute field of the reference count table, generates the default reference count table, including:
Reference counter is established to the field of said write master data mark, when the business datum is written in information system After tables of data, the reference counter, which increases, to be counted, and obtains reference count, the corresponding reference count of business datum is tired out Add, obtain reference count total value, the reference count total value is saved in redis;
It is preserved in field name and redis that master data mark, the table name of the tables of data, said write master data are identified Be written to the corresponding attribute field of the reference count table with the corresponding reference count total value of field of write-in master data mark In, generate the default reference count table.
8. the master data in a kind of information system deletes device, which is characterized in that including
Master data acquisition module, for obtaining master data to be deleted and corresponding master data mark;
Searching module, for searched according to master data mark from default reference count table the table name of corresponding reference list, Reference field name and reference count;
Reference information acquisition module for the reference count to be ranked up, obtains reference count maximum in ranking results Corresponding reference list and reference field name;
Judgment module, for judging whether the reference list quotes the master data to be deleted;
Removing module for if it is not, then delete the reference count of the maximum, and returns and is ranked up the reference count, The step of obtaining the corresponding reference list of reference count maximum in ranking results and reference field name, until the reference count is complete It is deleted, then deletes the master data to be deleted.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes any one of claim 1-7 described information system when performing described program In master data delet method in step.
10. a kind of computer storage media, is stored thereon with computer program, which is characterized in that the program is executed by processor The step in master data delet method in any one of Shi Shixian claims 1-7 described information system.
CN201711404896.XA 2017-12-22 2017-12-22 Method and device for deleting main data in information system and computer equipment Active CN108073712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711404896.XA CN108073712B (en) 2017-12-22 2017-12-22 Method and device for deleting main data in information system and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711404896.XA CN108073712B (en) 2017-12-22 2017-12-22 Method and device for deleting main data in information system and computer equipment

Publications (2)

Publication Number Publication Date
CN108073712A true CN108073712A (en) 2018-05-25
CN108073712B CN108073712B (en) 2020-08-18

Family

ID=62155420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711404896.XA Active CN108073712B (en) 2017-12-22 2017-12-22 Method and device for deleting main data in information system and computer equipment

Country Status (1)

Country Link
CN (1) CN108073712B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667690A (en) * 2021-01-29 2021-04-16 浪潮通用软件有限公司 Data reference query method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090030997A1 (en) * 2000-11-30 2009-01-29 At&T Intellectual Property I, Lp. Method and Apparatus for Minimizing Storage of Common Attachment Files in an E-Mail Communications Server
CN101430707A (en) * 2008-11-03 2009-05-13 金蝶软件(中国)有限公司 Verification method, system and equipment for record deletion operation
CN102710381A (en) * 2012-06-07 2012-10-03 飞天诚信科技股份有限公司 Data transmission processing method and device
CN103379099A (en) * 2012-04-19 2013-10-30 阿里巴巴集团控股有限公司 Hostile attack identification method and system
CN104123318A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Method and system for displaying interest points in map

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090030997A1 (en) * 2000-11-30 2009-01-29 At&T Intellectual Property I, Lp. Method and Apparatus for Minimizing Storage of Common Attachment Files in an E-Mail Communications Server
CN101430707A (en) * 2008-11-03 2009-05-13 金蝶软件(中国)有限公司 Verification method, system and equipment for record deletion operation
CN103379099A (en) * 2012-04-19 2013-10-30 阿里巴巴集团控股有限公司 Hostile attack identification method and system
CN102710381A (en) * 2012-06-07 2012-10-03 飞天诚信科技股份有限公司 Data transmission processing method and device
CN104123318A (en) * 2013-04-28 2014-10-29 百度在线网络技术(北京)有限公司 Method and system for displaying interest points in map

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667690A (en) * 2021-01-29 2021-04-16 浪潮通用软件有限公司 Data reference query method and device

Also Published As

Publication number Publication date
CN108073712B (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN104461390B (en) Write data into the method and device of imbricate magnetic recording SMR hard disks
CN107451831A (en) Task method for pushing
CN106970930A (en) Message, which is sent, determines method and device, tables of data creation method and device
CN107402821A (en) Access control method, device and the equipment of shared resource
CN111385294B (en) Data processing method, system, computer device and storage medium
CN107368545A (en) A kind of De-weight method and device based on MerkleTree deformation algorithms
CN108073712A (en) Master data delet method, device and computer equipment in information system
WO2018177414A1 (en) Data processing method, data processing device, computing device, and storage medium
CN107169065B (en) Method and device for removing specific content
CN109471917B (en) Data processing method, device, equipment and medium
CN113419792A (en) Event processing method and device, terminal equipment and storage medium
CN107436918B (en) Database implementation method, device and equipment
CN108694219B (en) Data processing method and device
CN110825717A (en) Data normalization method, device and medium for identity recognition
CN117729176B (en) Method and device for aggregating application program interfaces based on network address and response body
US11921787B2 (en) Identity-aware data management
CN114519628A (en) Associated card processing method and device, computer equipment and storage medium
CN117435135B (en) Method, device and system for recovering storage space related to repeated data deletion
CN118133331A (en) Privacy protection method and device for chip stored data and computer equipment
CN117742586A (en) Data storage method, device, computer equipment and storage medium
CN114647630A (en) File synchronization method, information generation method, file synchronization device, information generation device, computer equipment and storage medium
CN117827895A (en) Index data processing method and device and computer equipment
CN117216164A (en) Financial data synchronous processing method, apparatus, device, medium and program product
CN115983691A (en) Abnormal enterprise discrimination method and device
CN115934419A (en) Deleted document recovery method and related equipment

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