Specific embodiment
The scheme that current most operation system all uses domain model to drive is designed, with the development of business,
Operation system needs increase new function on original basis, and field possessed by domain model is also required to constantly expand.
And before the field of domain model is expanded, need first to comb out domain model possessed feature field at present, in order to avoid
The attribute that the feature field of subsequent expansion indicates is similar to the attribute that already present feature field indicates, causes complete after expanding
Domain model in the attribute that indicates of some feature fields it is smudgy.Therefore it is badly in need of a kind of available domain model mesh at present
The solution of feature field possessed by preceding.
In order to obtain domain model at present possessed by feature field, the mode generallyd use at present is: manually checking neck
Domain model program code corresponding at present combs out domain model possessed feature field at present from program code.And
At present by the way of manually combing, domain model possessed feature field at present is combed out, is easy to omit certain tagged words
Section, and the mode manually combed needs to take a substantial amount of time and energy, and carding efficiency is lower error-prone.
In view of the above-mentioned problems, this specification embodiment provides a kind of technical solution, the feature of domain model is automatically extracted out
Field, and the feature field of the domain model extracted is that business datum is extracted when being run based on operation system.Relative to people
The mode of work combing, will not omit certain feature fields, it is possible to reduce a large amount of carding duration improves carding efficiency, is not easy
Error.
The technical solution that specific this specification embodiment provides is as follows:
A plurality of business datum is obtained, wherein business datum has different fields, and each field has corresponding field value:
From acquired a plurality of business datum, integrate out multiple and different fields, and record the corresponding field value of each field and
Frequency of occurrence;The codomain of each field is calculated according to the field value and frequency of occurrence that are recorded;In the field integrated out,
The field that field codomain meets preset requirement is extracted, determines that extracted field is the feature field of domain model.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
As shown in Figure 1, the process of the extracting method of the feature field of the domain model provided for this specification embodiment is shown
It is intended to, this method may comprise steps of:
S101 obtains a plurality of business datum, and wherein business datum has different fields, and each field has corresponding word
Segment value:
The business datum that generates usually needs storage medium to be stored when operation system is run, and storage medium can be with here
It is database, caching, disk etc., the form of storage medium is varied, and this is no longer going to repeat them for this specification embodiment.When
The business datum that operation system generates when running is stored to storage medium, and a plurality of business number can be obtained from storage medium
According to, such as obtain 10000 business datums, the subsequent feature that domain model can be extracted according to a plurality of business datum of acquisition
Field.
Wherein business datum has different fields, possessed by different field, that is, domain model possessed by business datum
Field, each field have corresponding field value, as shown in table 1 below:
Field |
Time |
Swift Number |
…… |
Field value |
20180827 |
201808272200146 |
|
Table 1
Field, indicates the mark of a certain attribute in a program, and field Time as escribed above is used to indicate this category of date
Property, each field has corresponding field value, such as the corresponding field value of field Time is 20180827.
In addition, judging to store in the storage medium of operation system storage service data before obtaining a plurality of business datum
The quantity of business datum whether be more than preset threshold value.If so, being obtained in the storage medium of operation system storage service data
Take a plurality of business datum;If it is not, the storage of operation system storage service data is rejudged after for a period of time in subsequent interval
Whether the quantity of the business datum stored in medium is more than preset threshold value, until the storage of operation system storage service data is situated between
The quantity of the business datum stored in matter is more than preset threshold value, just in the storage medium of operation system storage service data,
Obtain a plurality of business datum.
For example, preset threshold value is 10000, it is meant that 10000 business datums, this Shen must be stored in storage medium
Please just available a plurality of business datum judge the business stored in storage medium therefore before obtaining a plurality of business datum
Data are more than or equal to preset threshold value 10000, then can obtain a plurality of in the storage medium of operation system storage service data
Business datum.
S102 integrates out multiple and different fields from acquired a plurality of business datum, and it is corresponding to record each field
Field value and frequency of occurrence;
For a plurality of business datum acquired in S101, multiple and different fields is integrated out, and record each field pair
The multiple field values and frequency of occurrence answered.Here the step of integration executes can be, and for a plurality of business datum of acquisition, mention
Field possessed by every business datum is taken out, after carrying out field extraction operation to all business datums, rejects and repeats
Field, be left different fields.
As shown in table 2 below, currently obtain 4 business datums, respectively business datum 1, business datum 2, business datum 3,
Business datum 4.
Table 2
For 4 business datums of acquisition, two different fields, respectively field are integrated out according to above-mentioned integration method
Time, field Swift Number, and record the corresponding multiple field values of each field, the corresponding field value difference of field Time
Are as follows: the corresponding multiple field value difference of 20180827,20180827,20180827,20180827, field Swift Number
Are as follows: 201808272200146,201808272200147,201808272200148,201808272200149 and each word
The corresponding frequency of occurrence of section, i.e. field Time occur 4 times, and field Swift Number occurs 4 times.
S103 calculates the codomain of each field according to the field value and frequency of occurrence that are recorded;
For the corresponding multiple field values of each field recorded in S102 and frequency of occurrence, each field pair is calculated
The codomain answered, wherein determining each field pair according to the corresponding multiple field values of each field recorded and frequency of occurrence
The maximum value and minimum value answered are calculated the value of each field by the corresponding maximum value of identified each field and minimum value
Domain.There are many kinds of the modes for determining the corresponding maximum value of each field and minimum value, carries out below to one of which exemplary
Illustrate:
Determine the mode of the corresponding maximum value of each field and minimum value are as follows: multiple field values corresponding to each field
It is ranked up, it is ensured that collating sequence is consistent with the frequency of occurrence of record, it is meant that participate in the number and field of the field value of sequence
Corresponding frequency of occurrence is consistent, wherein can from small to large or from big to small, and then determine the corresponding maximum value of each field with
And minimum value.
Such as corresponding 4 field values of above-mentioned field Swift Number: 201808272200146,
201808272200147,201808272200148,201808272200149, this 4 field values are ranked up, to this 4
After field value sequence, determine that maximum value is 201808272200149, minimum value 201808272200146.
After determining the corresponding maximum value of each field and minimum value, it can according to the corresponding maximum of each field
Value and minimum value calculate the corresponding codomain of each field, such as field Swift Number, determine that maximum value is
201808272200149, minimum value 201808272200146, then the codomain that can calculate field Swift Number is
201808272200146-201808272200149。
S104 extracts the field that field codomain meets preset requirement, determines extracted word in the field integrated out
Section is the feature field of domain model.
In the field integrated in S102, the field that field value meets preset requirement is extracted, that is, extracts field codomain
It is less than field corresponding to preset codomain threshold value, determines that extracted field is the feature field of domain model.Also
It is to say, from the field integrated, extracts the smaller field of field codomain, because the feature field as domain model is come
It says, the corresponding codomain of the feature field of domain model is unlikely to be very big, can be excluded by codomain this feature bright
Aobvious is not the field of feature field, i.e. exclusion generic field.
For example, in the field integrated, extract field codomain be less than 30000000 corresponding to field, for above-mentioned
Field Time, the field corresponding codomain of Swift Number, field Time are 20180827, and field Swift Number is corresponding
Codomain is 201808272200146-201808272200149, it is clear that the corresponding codomain of field Time is less than 30000000,
The corresponding codomain of field Swift Number is more than 30000000, then obviously includes field Time in the field extracted, no
Including field Swift Number.
Under normal circumstances, the feature field that extracted field is domain model can be directly determined.However certain
In special circumstances, for example, it is above-mentioned shown in business datum 1, business datum 2, business datum 3, business datum 4, acquisition is same
The business datum of time is generic field, can not exclude under normal circumstances by above-mentioned extraction step for field Time
Field Time, it is meant that although field Time has passed through above-mentioned extracting rule, but itself just belongs to generic field, is mentioned
It include field Time in the field of taking-up, it can be seen that there may be generic fields in the field extracted according to above-mentioned steps.And
In order to exclude above-mentioned similar situation, this specification embodiment is pre-configured with a field blacklist, includes in field blacklist
The apparently not field of feature field can be extracted again according to the field blacklist from the field extracted, i.e., to mentioning
The field that the field codomain of taking-up meets preset requirement is extracted again, can exclude field Time, the word that subsequent extracted goes out
Do not include field Time in section, and then can determine that the field extracted again is the feature field of domain model.
By the description of the above-mentioned technical solution provided this specification, a plurality of business datum is obtained, from acquired industry
In data of being engaged in, multiple and different fields is integrated out, records the corresponding multiple field values of each field and frequency of occurrence, according to every
The corresponding multiple field values of a field and frequency of occurrence can calculate the corresponding codomain of each field, mention from the field of integration
Field codomain is taken to meet the field of preset requirement, it further can be according to preset field blacklist, from the field extracted
It is extracted again, determines that the field extracted again is the feature field of domain model, automatically extracted out it is possible thereby to realize
The feature field of domain model, and the feature field of the domain model extracted is that business datum mentions when being run based on operation system
It takes.Relative to the mode manually combed, certain feature fields will not be omitted, it is possible to reduce a large amount of carding duration improves
Carding efficiency, it is not easy to make mistakes.
Relative to above method embodiment, this specification embodiment also provides a kind of extraction of the feature field of domain model
Device, as shown in Fig. 2, may include: data acquisition module 210, logging modle 220, codomain computing module 230, field extraction
Module 240, determining module 250.
Data acquisition module 210, for obtaining a plurality of business datum, wherein business datum has different fields, each
Field has corresponding field value:
Logging modle 220, for integrating out multiple and different fields, and record from acquired a plurality of business datum
The corresponding field value of each field and frequency of occurrence;
Codomain computing module 230, for calculating the codomain of each field according to the field value and frequency of occurrence that are recorded;
Field extraction module 240, in the field integrated out, extracting the word that field codomain meets preset requirement
Section;
Determining module 250, for determining that extracted field is the feature field of domain model.
According to a kind of specific embodiment that this specification provides, the data acquisition module 210 is specifically used for:
Whether the quantity for judging the business datum stored in the storage medium of operation system storage service data is more than default
Threshold value;
If so, obtaining a plurality of business datum in the storage medium of operation system storage service data.
According to a kind of specific embodiment that this specification provides, the codomain computing module 230 is specifically used for:
According to the field value and frequency of occurrence recorded, the corresponding maximum value of each field and minimum value are determined;
The codomain of each field is calculated by the corresponding maximum value of identified each field and minimum value.
According to a kind of specific embodiment that this specification provides, the field extraction module 240 is specifically used for:
It extracts field codomain and is less than field corresponding to preset codomain threshold value.
According to a kind of specific embodiment that this specification provides, the determining module 250 is specifically used for:
According to preconfigured field blacklist, the field for meeting preset requirement to the field codomain extracted is carried out again
It extracts;
Determine that the field extracted again is the feature field of domain model.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
By the description of the above-mentioned technical solution provided this specification, a plurality of business datum is obtained, from acquired industry
In data of being engaged in, multiple and different fields is integrated out, records the corresponding multiple field values of each field and frequency of occurrence, according to every
The corresponding multiple field values of a field and frequency of occurrence can calculate the corresponding codomain of each field, mention from the field of integration
Field codomain is taken to meet the field of preset requirement, it further can be according to preset field blacklist, from the field extracted
It is extracted again, determines that the field extracted again is the feature field of domain model, automatically extracted out it is possible thereby to realize
The feature field of domain model, and the feature field of the domain model extracted is that business datum mentions when being run based on operation system
It takes.Relative to the mode manually combed, certain feature fields will not be omitted, it is possible to reduce a large amount of carding duration improves
Carding efficiency, it is not easy to make mistakes.
This specification embodiment also provides a kind of computer equipment, as shown in figure 3, the equipment may include: processor
310, memory 320, input/output interface 330, communication interface 340 and bus 350.Wherein processor 310, memory 320,
Input/output interface 330 and communication interface 340 pass through the communication connection between the realization of bus 350 inside equipment.
Processor 310 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 320 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 320 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 320, and execution is called by processor 310.
Input/output interface 330 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 340 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 350 includes an access, in various components (such as the processor 310, memory 320, input/output of equipment
Interface 330 and communication interface 340) between transmit information.
It should be noted that although above equipment illustrates only processor 310, memory 320, input/output interface
330, communication interface 340 and bus 350, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
The extracting method of the feature field of domain model above-mentioned is realized when sequence is executed by processor.This method includes at least:
A kind of extracting method of the feature field of domain model, this method comprises:
A plurality of business datum is obtained, wherein business datum has different fields, and each field has corresponding field value:
From acquired a plurality of business datum, multiple and different fields is integrated out, and records the corresponding word of each field
Segment value and frequency of occurrence;
The codomain of each field is calculated according to the field value and frequency of occurrence that are recorded;
In the field integrated out, the field that field codomain meets preset requirement is extracted, determines that extracted field is
The feature field of domain model.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.