CN109359152A - Code Mapping method, device, electronic equipment, storage medium based on slice - Google Patents

Code Mapping method, device, electronic equipment, storage medium based on slice Download PDF

Info

Publication number
CN109359152A
CN109359152A CN201811500089.2A CN201811500089A CN109359152A CN 109359152 A CN109359152 A CN 109359152A CN 201811500089 A CN201811500089 A CN 201811500089A CN 109359152 A CN109359152 A CN 109359152A
Authority
CN
China
Prior art keywords
coding
class
fragment
mapped
slice
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
CN201811500089.2A
Other languages
Chinese (zh)
Other versions
CN109359152B (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.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group 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 Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201811500089.2A priority Critical patent/CN109359152B/en
Publication of CN109359152A publication Critical patent/CN109359152A/en
Application granted granted Critical
Publication of CN109359152B publication Critical patent/CN109359152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present invention provides a kind of Code Mapping method based on slice, device, electronic equipment, storage medium, Code Mapping method based on slice includes: the Code Mapping method based on slice, it is characterised by comprising: batch reads first kind coding, every first kind coding includes multiple fields;Batch reads the second class coding, and every the second class coding includes multiple fields;By at least partly priority of field in multiple fields, first kind coding and second class coding are ranked up respectively;Fragment is carried out according to the first kind coding after sequence and obtains n first kind fragment, and n is the integer more than or equal to 1;Fragment is carried out to second class coding after sequence according to the fragment endpoint of first kind coding, obtain corresponding first kind fragment is less than or equal to n the second class fragments;And multiple threads are generated, with the coding mapping of parallel processing corresponding first kind fragment and the second class fragment.The present invention realizes efficient coding mapping.

Description

Code Mapping method, device, electronic equipment, storage medium based on slice
Technical field
The present invention relates to computer application technology more particularly to a kind of Code Mapping method based on slice, device, Electronic equipment, storage medium.
Background technique
Currently, each field, especially medical field, different systems can have different coding schemes.However in order to right The data of each system are handled, and the coding scheme to each system is needed to be matched and mapped.
In the prior art, it is generally mapped using h coding.I.e. using the not respective table of homologous ray, pass through manual type Analysis is searched, the mapping relations of different system codings are generated.For professional domain (such as medical field), by the business of profession Personnel are manually matched, and accuracy is high, but matching efficiency is low, and coding mapping needs one week or a few weeks could complete;
In order to increase coding mapping efficiency, the prior art also passes through the multilist association of database and fuzzy query SQL mode To realize.But such mode, for different business scenarios, SQL script needs frequently change, can maintenance type it is poor, it is matched Execution efficiency is not high when core field is more.
It can be seen that the prior art cannot achieve efficient coding mapping.
Summary of the invention
The present invention in order to overcome defect existing for above-mentioned the relevant technologies, provide a kind of Code Mapping method based on slice, Device, electronic equipment, storage medium, and then overcome the limitation and defect due to the relevant technologies at least to a certain extent and cause One or more problem.
According to an aspect of the present invention, a kind of Code Mapping method based on slice is provided, comprising:
Batch reads first kind coding, and every first kind coding includes multiple fields;
Batch reads the second class coding, and every the second class coding includes multiple fields;
By at least partly priority of field in multiple fields, first kind coding and second class are encoded respectively It is ranked up;
Fragment is carried out according to the first kind coding after sequence and obtains n first kind fragment, and n is the integer more than or equal to 1;
Fragment is carried out to second class coding after sequence according to the fragment endpoint of first kind coding, is corresponded to The the second class fragment for being less than or equal to n of first kind fragment;And
Multiple threads are generated, with the coding mapping of parallel processing corresponding first kind fragment and the second class fragment.
Optionally, at least partly field described in being ranked up to first kind coding and second class coding For the subset of the intersection of multiple fields of multiple fields and second class coding of first kind coding.
Optionally, the item number C of the first kind coding in each first kind fragment is calculated according to the following formula:
Wherein, N is the total number of first kind coding,To be rounded downwards to coding total number and the quotient of fragment quantity, Offset is offset, and offset is integer, and offset is adjusted according to coding total number divided by the remainder of fragment quantity.
Optionally, it is worth identical first kind coding and is divided to same first kind fragment.
Optionally, the fragment endpoint according to first kind coding divides second class coding after sequence Piece includes:
Determine the fragment endpoint of the first kind coding, wherein i-th of first kind fragment of the n first kind fragments In, upper extreme point Min [i] is the minimum value of the first kind fragment, and lower extreme point Max [i] is the maximum value of the first kind fragment, and i is It is less than or equal to the integer of n more than or equal to 1;
For i from 1 to n, t from 1 to M successively value, as Max [i]>=std [t] and Max [i]<std [t+1], by std The lower extreme point of [t] as i-th of second class fragments, the upper extreme point by std [t+1] as the second class fragment of i+1, wherein Std [t] is the t articles second class coding after sequence, and t is the integer for being less than or equal to M more than or equal to 1, and M is the total of the second class coding Item number.
Optionally, the minimum value of the second class coding or the minimum of first kind coding are greater than when the maximum value of first kind coding When value is greater than the maximum value of the second class coding, mapping failed message is generated.
Optionally, in the second class coding,
The one or more the second class codings of the maximum value of first kind coding be will be greater than as invalid data;
The one or more the second class codings that the minimum value of first kind coding will be less than are used as invalid data.
Optionally, the coding mapping of corresponding first kind fragment and the second class fragment includes:
First kind coding to be mapped is successively determined from the upper extreme point of first kind fragment;
The first kind to be mapped is encoded, is obtained and to be mapped first from the second class fragment scanning of the corresponding first kind fragment Class encodes identical second class coding, to complete the mapping of first kind coding to be mapped.
Optionally, described that the first kind to be mapped is encoded, it scans and obtains from the second class fragment of the corresponding first kind fragment Identical second class is encoded with the first kind to be mapped to encode, and includes to complete the mapping of first kind coding to be mapped
The first kind to be mapped is encoded, since the second class coding of the index initial position of the second class fragment, is swept one by one The second class coding is retouched, when the first kind to be mapped is encoded to the upper extreme point of first kind fragment, the index initial position is The upper extreme point of the second class fragment;
When the second class coding is identical as first kind coding to be mapped, determine the second class of this coding in the second class fragment Index, complete the mapping of first kind to be mapped coding, will the second class of this coding next the second class coding be used as under The index initial position of one first kind coding to be mapped.
Optionally, described that the first kind to be mapped is encoded, from the index initial position of the second class fragment the second class coding Start, scan one by one the second class coding after further include:
When the value for scanning the second class coding, which is greater than the first kind to be mapped, to be encoded, reflecting for the first kind coding to be mapped is terminated It penetrates, and the next first kind coding that the first kind to be mapped encodes is encoded as the first kind to be mapped, by the second class of this Index initial position of upper second class coding of coding as next first kind coding to be mapped.
Optionally, described to generate multiple threads, with the coding of parallel processing corresponding first kind fragment and the second class fragment After mapping further include:
The coding mapping query result of first kind coding and the second class coding is provided.
Optionally, the quantity of the thread is n.
Optionally, n is the core cpu quantity for handling the coding mapping.
According to another aspect of the invention, a kind of coding mapping device based on slice is also provided, comprising:
First read module, for reading first kind coding in batches, every first kind coding includes multiple fields;
Second read module, for reading the second class coding in batches, every the second class coding includes multiple fields;
Sorting module, for by at least partly priority of field in multiple fields, respectively to first kind coding and The second class coding is ranked up;
First fragment module obtains n first kind fragment for carrying out fragment according to the first kind coding after sequence, and n is Integer more than or equal to 1;
Second fragment module, the fragment endpoint for encoding according to the first kind encode second class after sequence Fragment is carried out, the second class fragment for being less than or equal to n of corresponding first kind fragment is obtained;And
Coding mapping module, for generating multiple threads, with the corresponding first kind fragment of parallel processing and the second class fragment Coding mapping.
According to another aspect of the invention, a kind of electronic equipment is also provided, the electronic equipment includes: processor;Storage Medium, is stored thereon with computer program, and the computer program executes method as described above when being run by the processor.
According to another aspect of the invention, a kind of storage medium is also provided, computer journey is stored on the storage medium Sequence, the computer program execute method as described above when being run by processor.
Compared with prior art, present invention has an advantage that
1) by the first kind coding and the second class coding field priority, to the first kind coding and the second class encode into Row sequence so that first kind coding and the second class coding are ranked up by identical sortord, in order to postorder fragment and Coding mapping;
2) by the fragment encoded to the first kind, and the second class is encoded according to the endpoint of first kind coding and carries out fragment, Since first kind coding and the second class coding are all via sequence, after fragment, only in corresponding fragment, there are first kind volumes The mapping of code and the second class coding accelerates coding mapping efficiency without carrying out coding mapping between not corresponding fragment;
3) due to multiple fragments, by way of multi-threaded parallel, further speed up the effect of coding mapping Rate.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other feature of the invention and advantage will become It is more obvious.
Fig. 1 shows the flow chart of the Code Mapping method according to an embodiment of the present invention based on slice.
Fig. 2 shows the schematic diagrames before the first kind coding and sorting order of specific embodiment according to the present invention.
Fig. 3 shows the schematic diagram after the first kind coding and sorting order of specific embodiment according to the present invention.
Fig. 4 shows the schematic diagram of the fragment of the first kind coding of specific embodiment according to the present invention.
Fig. 5 shows the schematic diagram of the fragment of the first kind coding of another specific embodiment according to the present invention.
Fig. 6 and Fig. 7 shows the first kind coding of specific embodiment according to the present invention and second class coding is unable to map Schematic diagram.
The second class coding that Fig. 8 to Figure 10 shows specific embodiment according to the present invention has the schematic diagram of invalid data.
The fragment that Figure 11 shows second class coding basis first kind coding carries out the schematic diagram of fragment.
Figure 12 shows the schematic diagram of corresponding fragment interior coding mapping.
Figure 13 shows the module map of the coding mapping device according to an embodiment of the present invention based on slice.
Figure 14 schematically shows a kind of computer readable storage medium schematic diagram in exemplary embodiment of the present.
Figure 15 schematically shows a kind of electronic equipment schematic diagram in exemplary embodiment of the present.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.
In addition, attached drawing is only schematic illustrations of the invention, it is not necessarily drawn to scale.Identical attached drawing mark in figure Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place These functional entitys are realized in reason device device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all steps.For example, the step of having It can also decompose, and the step of having can merge or part merges, therefore, the sequence actually executed is possible to according to the actual situation Change.
Fig. 1 shows the flow chart of the Code Mapping method according to an embodiment of the present invention based on slice.With reference to Fig. 1, institute The Code Mapping method based on slice is stated to include the following steps:
Step S110: batch reads first kind coding, and every first kind coding includes multiple fields;
Step S120: batch reads the second class coding, and every the second class coding includes multiple fields;
Step S130: by at least partly priority of field in multiple fields, respectively to first kind coding and described Second class coding is ranked up;
Step S140: fragment is carried out according to the first kind coding after sequence and obtains n first kind fragment, n is more than or equal to 1 Integer;
Step S150: second class coding after sequence is divided according to the fragment endpoint of first kind coding Piece obtains the second class fragment for being less than or equal to n of corresponding first kind fragment;And
Step S160: generating multiple threads, is reflected with the coding of the corresponding first kind fragment of parallel processing and the second class fragment It penetrates.
In the Code Mapping method based on slice of exemplary embodiments of the present invention, it is advantageous that:
1) by the first kind coding and the second class coding field priority, to the first kind coding and the second class encode into Row sequence so that first kind coding and the second class coding are ranked up by identical sortord, in order to postorder fragment and Coding mapping;
2) by the fragment encoded to the first kind, and the second class is encoded according to the endpoint of first kind coding and carries out fragment, Since first kind coding and the second class coding are all via sequence, after fragment, only in corresponding fragment, there are first kind volumes The mapping of code and the second class coding accelerates coding mapping efficiency without carrying out coding mapping between not corresponding fragment;
3) due to multiple fragments, by way of multi-threaded parallel, further speed up the effect of coding mapping Rate.
In the Code Mapping method of the invention based on slice, the sequence of above-mentioned steps S110 to step S140 not with This is limited, for example, step S120 can be executed parallel with step S110, step S120 can also be executed before step S110; In another example can execute in the following order: the step S110, sequence of first kind coding, step S120, step in step S130 The sequence that the second class encodes in S130;For another example can execute in the following order: step S110, the first kind is compiled in step S130 The sequence of code, step S140, step S120, in step S130 the second class coding sequence.Above is only schematically to illustrate The sequence of step of the invention not as shown in Figure 1 is limited.Under the premise of without prejudice to present inventive concept, the difference of each step is held Row sequence (including asynchronously or synchronously) all within protection scope of the present invention, it will not be described here.
Specifically, describing the Code Mapping method provided by the invention based on slice below in conjunction with specific embodiment.
In some embodiments, above-mentioned steps S110 and step S120 further includes encoding to first kind coding and the second class Pretreatment.Pretreatment for example may include processing null field value, init attributes mapping and parameter list etc..
In some embodiments, for being carried out to first kind coding and second class coding in above-mentioned steps S130 At least partly field of sequence is multiple fields of first kind coding and multiple fields of second class coding The subset of intersection.For example, the field of first kind coding includes medical catalog code, medical directory name, trade name, approval text Number, drug one's own department or unit code, Business Name, the place of production, unit, specification, dosage form;And the field of the second class coding includes that medical catalogue is compiled Code, medical directory name, trade name, authentication code, drug one's own department or unit code, classification, dosage form, then for first kind coding and At least partly field that the second class coding is ranked up may is that medical catalog code, medical directory name, commodity It is name, authentication code, drug one's own department or unit code, one or more in dosage form.For being compiled to first kind coding and second class At least partly field that code is ranked up can be selected to set by user, these fields are for example properly termed as core field (field contents that do not choose are without participating in postorder sequence, fragment and coding mapping).
After core field has been determined, the first kind can be encoded according to the priority of setting or scheduled core field It is ranked up with the second class coding.As shown in Figures 2 and 3, Fig. 2 shows the first kind of specific embodiment according to the present invention codings Schematic diagram before sequence;Fig. 3 shows the schematic diagram after the first kind coding and sorting order of specific embodiment according to the present invention.
In the embodiment shown in Fig. 2 and Fig. 3, by taking the first kind encodes as an example, identified core field is drug one's own department or unit Code, authentication code and dosage form, and the priority of drug one's own department or unit code is higher than the priority of authentication code;The priority of authentication code is high In the priority of dosage form.For the sake of schematically, (letter, text, symbol can be according to pre- true by taking number as an example for the field contents of each field A minimum, z are maximum to execute, such as in letter for fixed assignment or sort by;Text is carried out by first letter of pinyin, secondary letter etc. Assignment and sequence, the present invention are not limited thereto).
The a plurality of first kind is encoded as a result, according to priority highest drug one's own department or unit code is ranked up from small to large first;When When drug one's own department or unit code value is identical, according to priority secondary high authentication code is ranked up from small to large;When the value of authentication code is identical When, according to priority minimum dosage form is ranked up from small to large.It can be obtained collating sequence as shown in Figure 3 as a result,.
Similarly, the second class coding can be ranked up in the same fashion, it will not be described here.The row of the value of each field Sequence can also be ranked up from large to small, and correspondingly, postorder slice can also correspond to collating sequence and change, these changes also exist Within protection scope of the present invention.It is only described below with sequence embodiment from small to large.
After to first kind coding and the second class coding and sorting order, obtained firstly, carrying out fragment to the first kind coding after sequence N first kind fragment is obtained, n is the integer more than or equal to 1.In certain embodiments, n is for handling the coding mapping Core cpu quantity, thus fragment obtain the n first kind fragment coding mapping can be carried out by n core cpu parallel respectively.n Value be also not limited thereto.
In certain embodiments, it is preferable that the first kind is encoded into substantially uniform fragment, in each first kind fragment The first kind coding item number C calculate according to the following formula:
Wherein, N is the total number of first kind coding,To be rounded downwards to coding total number and the quotient of fragment quantity, Offset is offset, and offset is integer, and offset is adjusted according to coding total number divided by the remainder of fragment quantity.
Decibel reference Fig. 4 and Fig. 5 below, Fig. 4 show the fragment of the first kind coding of specific embodiment according to the present invention Schematic diagram.Fig. 5 shows the schematic diagram of the fragment of the first kind coding of another specific embodiment according to the present invention.
In the fig. 4 embodiment, the total number N of first kind coding is 8, and core cpu quantity n is 4, then offset value is 0, the item number C of the first kind coding in each first kind fragment is 2.
In the embodiment shown in fig. 5, the total number N of first kind coding is 9, and core cpu quantity n is 4, then can choose The offset of one first kind fragment makes its value 1 (offset of remaining first kind fragment is 0), and there are three in first kind fragment The item number C of first kind coding be 2, the item number C of the first kind coding in another first kind fragment is 3.
Specifically, in the present embodiment, being worth identical first kind coding and being divided to same first kind fragment.As a result, Due to being encoded at the lower extreme point of second first kind fragment by the identical first kind of two values, it may be determined that second first kind point The item number C of the first kind coding of piece is 3.
It is possible to further realize the fragment that the first kind encodes in conjunction with above-mentioned formula by way of array and vernier.With On be only the fragment for schematically showing first kind coding, the present invention is not limited thereto.
Referring to Fig. 6 and Fig. 7, Fig. 6 and Fig. 7 show the first kind coding and second of specific embodiment according to the present invention Class encodes the schematic diagram being unable to map.
Embodiment shown in Fig. 6, when the maximum value of first kind coding 210 is greater than the minimum value of the second class coding 220, Generate mapping failed message.
Embodiment shown in Fig. 7, when the minimum value of first kind coding 210 is greater than the maximum value of the second class coding 220, Generate mapping failed message.
Fig. 6 and Fig. 7 is only the reality for schematically showing the numerical value of first kind coding and the second class coding only one field Apply example.The present invention is not limited thereto, can will be every when the first kind after sequence coding and the second class coding have multiple fields First kind coding as a whole, makes it have a numerical value, as a whole by every the second class coding, makes its tool There is a numerical value, to carry out numeric ratio pair.
Referring to Fig. 8 to Figure 10, the second class coding that Fig. 8 to Figure 10 shows specific embodiment according to the present invention has The schematic diagram of invalid data.In other words, Fig. 8 to Figure 10 can be used for rejecting the invalid data in the second class coding.
In the embodiment of Fig. 8 to Figure 10, in the second class coding 220, the first kind coding 210 will be greater than most The one or more the second class codings 220 being worth greatly are used as invalid data (as illustrated with the dotted box);And the first kind will be less than and compiled One or more the second class codings 220 of the minimum value of code 210 are used as invalid data (as illustrated with the dotted box).In Fig. 8 and Figure 10 Embodiment in, can by the second class encode 220 as invalid datas reject.
Fig. 8 to Figure 10 is only the reality for schematically showing the numerical value of first kind coding and the second class coding only one field Apply example.The present invention is not limited thereto, can will be every when the first kind after sequence coding and the second class coding have multiple fields First kind coding as a whole, makes it have a numerical value, as a whole by every the second class coding, makes its tool There is a numerical value, to carry out numeric ratio pair.
The signal of fragment is carried out referring to Figure 11, Figure 11 fragment for showing second class coding basis first kind coding Figure.
Specifically, the fragment endpoint that the step S150 is encoded according to the first kind is to second class after sequence Coding carries out fragment and includes the following steps:
Firstly, determining the fragment endpoint of the first kind coding, wherein i-th of first kind of the n first kind fragments In fragment, upper extreme point Min [i] is the minimum value of the first kind fragment, and lower extreme point Max [i] is the maximum value of the first kind fragment, I is the integer for being less than or equal to n more than or equal to 1.
Then, for i from 1 to n, t from 1 to M successively value, as max [i]>=std [t] and max [i]<std [t+1], Lower extreme point by std [t] as i-th of second class fragments, the upper extreme point by std [t+1] as the second class fragment of i+1, Wherein, std [t] is the t articles second class coding after sequence, and t is the integer for being less than or equal to M more than or equal to 1, and M is the second class volume The total number of code.
In the embodiment shown in fig. 11, the upper extreme point of first first kind fragment 211 of the first kind coding 210 Min [1] is 1, and lower extreme point Max [1] is 3;The upper extreme point Min [2] of second first kind fragment 212 is 5, and lower breakpoint Max [2] is 6;The upper extreme point Min [3] of third first kind fragment 213 is 8, and lower breakpoint Max [3] is 9.
For first first kind fragment 211, Max [1] is successively compared with the second class coding 220, Max [1] >= Std [4] (value of the second class of Article 4 coding) and Max [1] < std [5] (value of the second class of Article 5 coding), std [4] are made Upper extreme point for the lower extreme point of first the second class fragment 221, by std [5] as second the second class fragment 222.For Max [2] successively 220 is compared with the second class coding two first kind fragments 212, Max [2] >=std [6] (Article 6 the The value of two classes coding) and Max [2] < std [7] (value of the second class of Article 7 coding), by std [6] as second the second class point The lower extreme point of piece 221, the upper extreme point by std [7] as the 3rd the second class fragment 223, and so on.
Figure 11 is only the embodiment for schematically showing the numerical value of first kind coding and the second class coding only one field. The present invention is not limited thereto, can be by every the when the first kind after sequence coding and the second class coding have multiple fields One kind coding as a whole, makes it have a numerical value, as a whole by every the second class coding, makes it have one A numerical value, to carry out numeric ratio pair.
The schematic diagram of corresponding fragment interior coding mapping is shown referring to Figure 12, Figure 12.Specifically, the step The coding mapping of corresponding first kind fragment and the second class fragment includes the following steps: the upper extreme point from first kind fragment in S160 Successively determine first kind coding to be mapped;The first kind to be mapped is encoded, is swept from the second class fragment of the corresponding first kind fragment It retouches acquisition and encodes identical second class coding with the first kind to be mapped, to complete the mapping of first kind coding to be mapped.
Further, described that the first kind to be mapped is encoded, it is obtained from the second class fragment scanning of the corresponding first kind fragment It obtains and encodes identical second class coding with the first kind to be mapped, may include as follows to complete the mapping of first kind coding to be mapped Step: encoding the first kind to be mapped, since the second class coding of the index initial position of the second class fragment, scans the one by one Two classes coding, when the first kind to be mapped is encoded to the upper extreme point of first kind fragment, the index initial position is described The upper extreme point of second class fragment;When one second class coding is identical as first kind coding to be mapped, determine that the second class of this encodes Index in the second class fragment completes the mapping of the first kind coding to be mapped, and will be under the first kind coding to be mapped One first kind encodes the mapping encoded as the first kind to be mapped, and next the second class of the second class of this coding is encoded and is made For the index initial position of next first kind coding to be mapped.
It is described that the first kind to be mapped is encoded, since the second class coding of the index initial position of the second class fragment, by Item can also include the following steps: after scanning the second class coding
When the value for scanning the second class coding, which is greater than the first kind to be mapped, to be encoded, reflecting for the first kind coding to be mapped is terminated It penetrates, and the next first kind that the first kind to be mapped encodes is encoded into the mapping encoded as the first kind to be mapped, by this Index initial position of upper second class coding of second class coding as next first kind coding to be mapped.
Such as Figure 12, e.g. the 9th first kind fragment 219 and the corresponding coding that carries out of the 9th the second class fragment 229 are reflected It penetrates.
First first kind coding of the 9th first kind fragment 219 is encoded as the first kind to be mapped first, it should be to The value for mapping first kind coding is 99, is encoded to the first kind coding to be mapped from first the second class of the second class fragment 229 (upper extreme point) beginning scans the second class coding one by one.The value phase that the value of the second class of Article 4 coding is encoded with the first kind to be mapped Together, it determines that the second class of this encodes the index (such as Article 4) in the second class fragment, completes the first kind coding to be mapped Mapping, and (i.e. the Article 2 first kind encodes the next first kind coding that the first kind to be mapped is encoded, and is worth 101) to make For the mapping of the first kind to be mapped coding, by next the second class coding of the second class of this coding, (i.e. the Article 5 first kind is compiled Code is worth for the index initial position 100) as next first kind coding to be mapped.
Article 2 first kind coding (be worth is 101) is encoded as the first kind to be mapped, certainly to the first kind coding to be mapped (Article 5 first kind coding is worth 100) to start to scan the second class coding one by one for the index initial position of second class fragment 229. The value of the second class of Article 6 coding is identical as the value that the first kind to be mapped encodes, and determines the second class of this coding in the second class fragment In index (such as Article 6), complete the mapping of first kind to be mapped coding, and will be under first kind coding to be mapped (i.e. the Article 3 first kind encodes one first kind coding, is worth the mapping 103) to encode as the first kind to be mapped, by this article the (i.e. the Article 7 first kind encodes next the second class coding of two classes coding, is worth 103) to compile as next first kind to be mapped The index initial position of code.
Article 3 first kind coding (value is 103) encodes, the index with the second class fragment 229 as the first kind to be mapped Initial position (the Article 7 first kind coding, be worth for 103) value it is identical.Repeat above-mentioned next first kind coding to be mapped and next Index the determination of initial position.
Article 4 first kind coding (be worth is 106) is encoded as the first kind to be mapped, certainly to the first kind coding to be mapped (Article 8 first kind coding is worth 104) to start to scan the second class coding one by one for the index initial position of second class fragment 229. When scanning the value that the second class encodes, (the second class of Article 11 coding is worth 108) to be greater than the value 106 of the first kind to be mapped coding When, the mapping of the first kind coding to be mapped is terminated, and the next first kind that the first kind to be mapped encodes is encoded into conduct First kind coding to be mapped, by the second class of this coding, (the second class of Article 11 is encoded, and is worth and compiles for upper second class 108) (the second class of Article 10 coding is worth for the index initial position 105) as next first kind coding to be mapped code.And so on, It will not be described here.
In the present embodiment, determining coding mapping relationship is shown by solid arrow, indexes initial position by dotted arrow It shows.
Figure 12 is only the embodiment for schematically showing the numerical value of first kind coding and the second class coding only one field. The present invention is not limited thereto, can be according to field when the first kind coding and the second class coding after sequence have multiple fields Priority successively carries out the mapping of first kind coding and the second class coding.
In one particular embodiment of the present invention, in above-mentioned steps S160, per thread only executes the volume of a pair of of fragment The quantity of code mapping, the thread is n, further increases the efficiency of coding mapping as a result,.
In one particular embodiment of the present invention, the above-mentioned steps S160 generates multiple threads, with parallel processing pair First kind coding and the can also be included the following steps: to provide after the coding mapping of the first kind fragment and the second class fragment answered The coding mapping query result of two classes coding.Query result can be provided according to different preset rules, for example, when user determines 6 core fields, first kind coding and the second class coding are when 6 core fields all match, provided query result For exact matching;If first kind coding and the second class coding matched field quantity in 6 core fields are more than or equal to 4, Query result is then provided to match for part;If first kind coding and the second class coding matched field in 6 core fields When quantity is less than 4, then query result is provided to mismatch.The preset rules of query result are not limited thereto, different cores Field quantity can have the preset rules of different query results.Provided rule searching can be that hook is (complete with graphical representation Full matching);Question mark (part matches);It pitches (mismatch).
Above is only schematically to describe multiple implementations of the invention, and each embodiment can be come alone or in combination It realizes, the present invention is not limited thereto.
The coding mapping device provided by the invention based on slice is described below with reference to Figure 13.Figure 13 is shown according to this hair The module map of the coding mapping device based on slice of bright embodiment.Coding mapping device 300 based on slice includes the first reading Modulus block 310, the second read module 320, sorting module 330, the first fragment module 340, the second fragment module 350 and coding reflect Penetrate module 360.
For first read module 310 for reading first kind coding in batches, every first kind coding includes multiple fields;
For second read module 320 for reading the second class coding in batches, every the second class coding includes multiple fields;
Sorting module 330 is used to press in multiple fields at least partly priority of field, encodes respectively to the first kind And the second class coding is ranked up;
First fragment module 340 is used to carry out fragment according to the first kind coding after sequence to obtain n first kind fragment, n For the integer more than or equal to 1;
The fragment endpoint that second fragment module 350 is used to encode according to the first kind compiles second class after sequence Code carries out fragment, obtains the second class fragment for being less than or equal to n of corresponding first kind fragment;And
Coding mapping module 360 is for generating multiple threads, with the corresponding first kind fragment of parallel processing and the second class point The coding mapping of piece.
In the coding mapping device based on slice of exemplary embodiments of the present invention, it is advantageous that:
1) by the first kind coding and the second class coding field priority, to the first kind coding and the second class encode into Row sequence so that first kind coding and the second class coding are ranked up by identical sortord, in order to postorder fragment and Coding mapping;
2) by the fragment encoded to the first kind, and the second class is encoded according to the endpoint of first kind coding and carries out fragment, Since first kind coding and the second class coding are all via sequence, after fragment, only in corresponding fragment, there are first kind volumes The mapping of code and the second class coding accelerates coding mapping efficiency without carrying out coding mapping between not corresponding fragment;
3) due to multiple fragments, by way of multi-threaded parallel, further speed up the effect of coding mapping Rate.
It is above only the module map for schematically showing each embodiment of the present invention, without prejudice to before present inventive concept It puts, the merging of module and the fractionation of module are all within protection scope of the present invention.
In an exemplary embodiment of the present invention, a kind of computer readable storage medium is additionally provided, meter is stored thereon with The volume based on slice described in any one above-mentioned embodiment may be implemented when being executed by such as processor in calculation machine program, the program The step of code mapping.In some possible embodiments, various aspects of the invention are also implemented as a kind of program product Form comprising program code, when described program product is run on the terminal device, said program code is described for making Terminal device executes described in the above-mentioned coding mapping part based on slice of this specification various exemplary realities according to the present invention The step of applying mode.
With reference to shown in Figure 14, the program product for realizing the above method of embodiment according to the present invention is described 700, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device, Such as it is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be with To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in tenant It calculates and executes in equipment, partly executed in tenant's equipment, being executed as an independent software package, partially in tenant's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to tenant and calculates equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
In an exemplary embodiment of the present invention, a kind of electronic equipment is also provided, which may include processor, And the memory of the executable instruction for storing the processor.Wherein, the processor is configured to via described in execution Executable instruction is come the step of executing the coding mapping described in any one above-mentioned embodiment based on slice.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as circuit, " module " or " system ".
The electronic equipment 800 of this embodiment according to the present invention is described referring to Figure 15.The electricity that Figure 15 is shown Sub- equipment 800 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 15, electronic equipment 800 is showed in the form of universal computing device.The component of electronic equipment 800 can be with Including but not limited to: at least one processing unit 810, at least one storage unit 820, the different system components of connection (including are deposited Storage unit 820 and processing unit 810) bus 830, display unit 840 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 810 Row, so that the processing unit 810 executes described in the above-mentioned coding mapping part based on slice of this specification according to this hair The step of bright various illustrative embodiments.For example, the processing unit 810 can execute step as shown in Figure 1.
The storage unit 820 may include the readable medium of volatile memory cell form, such as random access memory Unit (RAM) 8201 and/or cache memory unit 8202 can further include read-only memory unit (ROM) 8203.
The storage unit 820 can also include program/practical work with one group of (at least one) program module 8205 Tool 8204, such program module 8205 includes but is not limited to: operating system, one or more application program, other programs It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 830 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 800 can also be with one or more external equipments 900 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, the equipment that also tenant can be enabled interact with the electronic equipment 800 with one or more communicates, and/or with make Any equipment (such as the router, modulation /demodulation that the electronic equipment 800 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/O) interface 850.Also, electronic equipment 800 can be with By network adapter 860 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 860 can be communicated by bus 830 with other modules of electronic equipment 800.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 800, including but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server or network equipment etc.) executes the above-mentioned of embodiment according to the present invention and is based on The coding mapping of slice.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by appended Claim is pointed out.

Claims (12)

1. a kind of Code Mapping method based on slice characterized by comprising
Batch reads first kind coding, and every first kind coding includes multiple fields;
Batch reads the second class coding, and every the second class coding includes multiple fields;
By at least partly priority of field in multiple fields, first kind coding and second class coding are carried out respectively Sequence;
Fragment is carried out according to the first kind coding after sequence and obtains n first kind fragment, and n is the integer more than or equal to 1;
Fragment is carried out to second class coding after sequence according to the fragment endpoint of first kind coding, obtains corresponding first The the second class fragment for being less than or equal to n of class fragment;And
Multiple threads are generated, with the coding mapping of parallel processing corresponding first kind fragment and the second class fragment.
2. as described in claim 1 based on the Code Mapping method of slice, which is characterized in that for being encoded to the first kind And at least partly field that is ranked up of second class coding is multiple fields and described the of first kind coding The subset of the intersection of multiple fields of two classes coding.
3. as described in claim 1 based on the Code Mapping method of slice, which is characterized in that in each first kind fragment The item number C of one kind coding is calculated according to the following formula:
Wherein, N is the total number of first kind coding,To be rounded downwards to coding total number and the quotient of fragment quantity, Offset is offset and is integer, and offset is adjusted according to coding total number divided by the remainder of fragment quantity.
4. as claimed in claim 3 based on the Code Mapping method of slice, which is characterized in that be worth identical first kind coding quilt It is divided to same first kind fragment.
5. as described in claim 1 based on the Code Mapping method of slice, which is characterized in that described to be compiled according to the first kind The fragment endpoint of code carries out fragment to second class coding after sequence
Determine the fragment endpoint of the first kind coding, wherein in i-th of first kind fragment of the n first kind fragments, on Endpoint Min [i] be the first kind fragment minimum value, lower extreme point Max [i] be the first kind fragment maximum value, i be greater than etc. In the integer that 1 is less than or equal to n;
For i from 1 to n, t from 1 to M successively value, as Max [i]>=std [t] and Max [i]<std [t+1], by std [t] Upper extreme point as the lower extreme point of i-th of second class fragments, by std [t+1] as the second class fragment of i+1, wherein std [t] is the t articles second class coding after sequence, and t is the integer for being less than or equal to M more than or equal to 1, and M is total item of the second class coding Number.
6. as claimed in claim 5 based on the Code Mapping method of slice, which is characterized in that when the maximum value of first kind coding When being greater than the maximum value of the second class coding greater than the minimum value of the second class coding or the minimum value of first kind coding, mapping is generated Failed message.
7. as claimed in claim 6 based on the Code Mapping method of slice, which is characterized in that in the second class coding,
The one or more the second class codings of the maximum value of first kind coding be will be greater than as invalid data;
The one or more the second class codings that the minimum value of first kind coding will be less than are used as invalid data.
8. as described in claim 1 based on the Code Mapping method of slice, which is characterized in that corresponding first kind fragment and The coding mapping of two class fragments includes:
First kind coding to be mapped is successively determined from the upper extreme point of first kind fragment;
The first kind to be mapped is encoded, obtains from the second class fragment scanning of the corresponding first kind fragment and is compiled with the first kind to be mapped The identical second class coding of code, to complete the mapping of first kind coding to be mapped.
9. as claimed in claim 8 based on the Code Mapping method of slice, which is characterized in that described to be compiled to the first kind to be mapped Code encodes identical second class from the second class fragment scanning acquisition and the first kind to be mapped of the corresponding first kind fragment and encodes, Include to complete the mapping of first kind coding to be mapped
The first kind to be mapped is encoded, since the second class coding of the index initial position of the second class fragment, scans the one by one Two classes coding, when the first kind to be mapped is encoded to the upper extreme point of first kind fragment, the index initial position is described The upper extreme point of second class fragment;
When the second class coding is identical as first kind coding to be mapped, determine that the second class of this encodes the rope in the second class fragment Draw, complete the mapping of first kind to be mapped coding, by next the second class coding of the second class of this coding as it is next to Map the index initial position of first kind coding.
10. as claimed in claim 9 based on the Code Mapping method of slice, which is characterized in that described to the first kind to be mapped Coding, since the second class fragment index initial position the second class coding, scan one by one the second class coding after further include:
When the value for scanning the second class coding, which is greater than the first kind to be mapped, to be encoded, the mapping of the first kind coding to be mapped is terminated, And encode the next first kind coding that the first kind to be mapped encodes as the first kind to be mapped, the second class of this is encoded The index initial position that is encoded as next first kind to be mapped of upper second class coding.
11. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Processor;
Memory is stored thereon with computer program, is executed when the computer program is run by the processor as right is wanted Seek 1 to 10 described in any item methods.
12. a kind of storage medium, which is characterized in that be stored with computer program, the computer program on the storage medium Method as described in any one of claim 1 to 10 is executed when being run by processor.
CN201811500089.2A 2018-12-07 2018-12-07 Slice-based encoding mapping method and device, electronic equipment and storage medium Active CN109359152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811500089.2A CN109359152B (en) 2018-12-07 2018-12-07 Slice-based encoding mapping method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811500089.2A CN109359152B (en) 2018-12-07 2018-12-07 Slice-based encoding mapping method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109359152A true CN109359152A (en) 2019-02-19
CN109359152B CN109359152B (en) 2021-01-29

Family

ID=65331787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811500089.2A Active CN109359152B (en) 2018-12-07 2018-12-07 Slice-based encoding mapping method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109359152B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204920A (en) * 2014-06-18 2015-12-30 阿里巴巴集团控股有限公司 Distributed calculation operation realizing method and device based on mapping and polymerizing
CN105574103A (en) * 2015-12-11 2016-05-11 浙江大学 Method and system for automatically establishing medical term mapping relationship based on word segmentation and coding
US9628109B1 (en) * 2016-06-28 2017-04-18 International Business Machines Corporation Operation of a multi-slice processor implementing priority encoding of data pattern matches
CN106980538A (en) * 2017-02-16 2017-07-25 平安科技(深圳)有限公司 The method and device of data processing
CN108228606A (en) * 2016-12-14 2018-06-29 北京国双科技有限公司 The wiring method and device of data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105204920A (en) * 2014-06-18 2015-12-30 阿里巴巴集团控股有限公司 Distributed calculation operation realizing method and device based on mapping and polymerizing
CN105574103A (en) * 2015-12-11 2016-05-11 浙江大学 Method and system for automatically establishing medical term mapping relationship based on word segmentation and coding
US9628109B1 (en) * 2016-06-28 2017-04-18 International Business Machines Corporation Operation of a multi-slice processor implementing priority encoding of data pattern matches
CN108228606A (en) * 2016-12-14 2018-06-29 北京国双科技有限公司 The wiring method and device of data
CN106980538A (en) * 2017-02-16 2017-07-25 平安科技(深圳)有限公司 The method and device of data processing

Also Published As

Publication number Publication date
CN109359152B (en) 2021-01-29

Similar Documents

Publication Publication Date Title
CN108280365B (en) Data access authority management method, device, terminal device and storage medium
CN111382174B (en) Multi-party data joint query method, device, server and storage medium
US10237295B2 (en) Automated event ID field analysis on heterogeneous logs
CN108255602B (en) Task combination method and terminal equipment
US20170169093A9 (en) Syntactic tagging in a domain-specific context
CN107122222B (en) A kind of search system and method for character string
CN106462633B (en) Efficiently storing related sparse data in a search index
CN110135590B (en) Information processing method, information processing apparatus, information processing medium, and electronic device
CN109901987A (en) A kind of method and apparatus generating test data
JP2022088602A (en) Table generation method, device, electronic apparatus, storage medium and program
CN114610747A (en) Data query method, device, equipment and storage medium
CN105302730A (en) Calculation model detection method, testing server and service platform
Bui et al. CDKAM: a taxonomic classification tool using discriminative k-mers and approximate matching strategies
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN109814957A (en) A kind of label addition method and device for IOS system
CN114492354A (en) Streaming document generation method, computing device and computer readable medium
CN109670972A (en) Core protects method, apparatus, electronic equipment, storage medium
CN107622040A (en) A kind of control method and system of laser carving data
CN109359152A (en) Code Mapping method, device, electronic equipment, storage medium based on slice
CN110390011A (en) The method and apparatus of data classification
CN112668314A (en) Data standard conformance detection method, device, system and storage medium
US9208178B2 (en) Gesture-based image shape filtering
CN114661904B (en) Method, apparatus, device, storage medium, and program for training document processing model
CN113722324B (en) Report generation method and device based on artificial intelligence, electronic equipment and medium
CN110224921A (en) Send method, apparatus, the medium, electronic equipment of the mail comprising recruitment information

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