CN103198071A - Data report generation method and device adopting same - Google Patents

Data report generation method and device adopting same Download PDF

Info

Publication number
CN103198071A
CN103198071A CN2012100037666A CN201210003766A CN103198071A CN 103198071 A CN103198071 A CN 103198071A CN 2012100037666 A CN2012100037666 A CN 2012100037666A CN 201210003766 A CN201210003766 A CN 201210003766A CN 103198071 A CN103198071 A CN 103198071A
Authority
CN
China
Prior art keywords
data
extract
attribute information
tables
represent
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
CN2012100037666A
Other languages
Chinese (zh)
Other versions
CN103198071B (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.)
China Mobile Group Shandong Co Ltd
Original Assignee
China Mobile Group Shandong Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Group Shandong Co Ltd filed Critical China Mobile Group Shandong Co Ltd
Priority to CN201210003766.6A priority Critical patent/CN103198071B/en
Publication of CN103198071A publication Critical patent/CN103198071A/en
Application granted granted Critical
Publication of CN103198071B publication Critical patent/CN103198071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data report generation method and a device adopting same. The method comprises the following steps: acquiring inquire statements used for generating a data report required by a user; determining associated elements, data sheet identification elements and display elements in the inquire statements; generating data extraction attribute information respectively corresponding to the associated statements, the data sheet identification elements and display elements, wherein the data extraction attribute information contains weighting scores; and if data corresponding to at least one display element can not be extracted in the data report generation processes of all generated data extraction attribute information, according to weighting scores in all data extraction attribute information, when the situation that the fault tolerance is larger than the set threshold when the data report defaults the display element which can not extract the corresponding data is determined, generating a data report of the default display element. According to the scheme, the data report not containing default display elements can be generated, and causes which lead to failures in generating the required data report are immediately and accurately located.

Description

Datagram table generating method and device thereof
Technical field
The present invention relates to field of computer technology, refer to a kind of datagram table generating method and device thereof especially.
Background technology
Self-service data sheet is generally based on the data in the database, represent after extracting according to one's analysis by the demand different pairs, the data sheet form that is generally that represents in user's side, the backstage then is database manipulation language, the relation of the two as shown in Figure 1, the form on the left side is the data sheet form that represents among the figure, and the form on the right is the consistency operation language.Self-service data sheet has very high independence and dirigibility, and data exhibiting is effective high, simple and clear, and the user does not need to be grasped complex language just can obtain data intuitively, is subjected to the favor of each analysis department deeply.
Self-service data sheet generally is divided into two parts: part setting represents formwork structure, and another part carries out the extraction of data in the database, and the data of extracting are represented according to the formwork structure that represents that arranges.The generative process of data sheet is described with an instantiation below:
Suppose that the user need comprise A1, A2, B3, the autonomous data sheet of B4 and C4 data, the required data of this self-service data sheet are stored in the database, comprise Table A, B, C, wherein, Table A comprises A1, A2, A3, A4, table B comprises B1, B2, B3, B4, table C comprises C1, C2, C3, C4 need represent A1 in data sheet, A2, B3, the information of B4 and C4, its Structured Query Language (SQL) (Structured Query Language, SQL) statement can be written as: Select A1, A2, B3, B4, C4 From A, B is after C Where A1=B1 And A1=C1, self-service data report system take out data according to this SQL statement, represent as shown in Figure 2 data sheet structure to the user, and this SQL statement can be stored in the database; When the user reuses this data sheet, the backstage is directly called and can be generated form this SQL statement is taken out data in database after, but must guarantee that Table A, B, C all exist in the database, and A1, B1, C1, A2, B3, B4, C4 are present in respectively among Table A, B, the C, when a certain data in any table or the table did not exist, then whole data sheet just can't normally use.
Therefore; increasing along with data in the existing self-service data sheet generation scheme; relevance between the Data Source strengthens; after usually can changing owing to the data structure of some Data Sources; cause one or more forms to represent; and because storage organization is complicated, make the difficulty that maintenance and the fault of self-service data report system are got rid of increase.
Summary of the invention
The embodiment of the invention provides a kind of datagram table generating method and device thereof, in order to solve exist in the prior art when the data structure of some Data Sources change cause can't the demonstrating data form and maintenance and the fault of data reporting system got rid of the bigger problem of difficulty.
The concrete scheme of the embodiment of the invention comprises:
A kind of datagram table generating method comprises the query statement that obtains for the data sheet that generates user's request; The associated element that comprises in the described query statement of determining to obtain, tables of data marker element and represent element, there is incidence relation in element in the corresponding tables of data of the tables of data marker element that comprises in described associated element and the described query statement, described representing needs the element that represents in the data sheet of element for user request, describedly represent the data of element correspondence and the data of associated element correspondence are to extract from the tables of data of described tables of data marker element correspondence; Generate corresponding each associated element, the tables of data marker element of determining respectively and represent the data extract attribute information of element, comprise the weight score value in the described data extract attribute information, be used for characterizing corresponding element in the significance level of data sheet; According to each the data extract attribute information that generates in the process that generates data sheet, when if the data that at least one represents the element correspondence occurring to extract, according to the weight score value that comprises respectively in each data extract attribute information, determine described data sheet default can not extract corresponding data represent element the time tolerance value that has; During greater than setting threshold, generate the default data sheet that represents element that can not extract corresponding data in the tolerance value of determining.
A kind of data sheet generating apparatus comprises the query statement acquiring unit, is used for obtaining the query statement for the data sheet that generates user's request; The element determining unit, be used for determining associated element, the tables of data marker element that the described query statement that obtains comprises and represent element, there is incidence relation in element in the corresponding tables of data of the tables of data marker element that comprises in described associated element and the described query statement, described representing needs the element that represents in the data sheet of element for user request, describedly represent the data of element correspondence and the data of associated element correspondence are to extract from the tables of data of described tables of data marker element correspondence; Extract the attribute information generation unit, be used for to generate corresponding each associated element, the tables of data marker element of determining respectively and represent the data extract attribute information of element, comprise the weight score value in the described data extract attribute information, be used for characterizing corresponding element in the significance level of data sheet; Tolerance value determining unit, be used for according to each the data extract attribute information that generates in the process that generates data sheet, when if the data that at least one represents the element correspondence occurring to extract, according to the weight score value that comprises respectively in each data extract attribute information, determine described data sheet default can not extract corresponding data represent element the time tolerance value that has; The report generation unit is used for during greater than setting threshold, generating the default data sheet that represents element that can not extract corresponding data in the tolerance value of determining.
Datagram table generating method and device thereof that the embodiment of the invention provides, the associated element that comprises in the query statement that obtains by generation, tables of data marker element and the data extract attribute information that represents element, in the process that generates data sheet, to represent element default if data sheet is required, just can calculate the tolerance of this data sheet, when this tolerance during greater than setting threshold, generate and do not comprise the default data sheet that represents element, owing in data sheet, do not represent the default element that represents, variation has taken place in the data structure that just can determine the Data Source at the data place that represents the element correspondence that this is default, thereby can safeguard with fault the Data Source at this default data place that represents the element correspondence and get rid of; Even variation has taken place in the data structure of the Data Source at the required data place that represents the element correspondence in this scheme, still can generate and not comprise this default data sheet that represents element, and can be in time, the location can not generate required data sheet exactly failure cause, thereby can be in time, fix a breakdown accurately and efficiently.
Description of drawings
Contrast relationship synoptic diagram between the data sheet that Fig. 1 represents for user's side in the prior art and the SQL statement on backstage;
Fig. 2 is the structural representation of the data sheet after representing in the prior art;
Fig. 3 is the process flow diagram of the datagram table generating method in the embodiment of the invention;
Fig. 4 can not extract the method flow diagram that at least one represents the data of element correspondence for determining appearance in the embodiment of the invention;
Fig. 5 for the data sheet in the embodiment of the invention default can not extract corresponding data represent element the time structural representation;
Fig. 6 is the structural representation of the data sheet generating apparatus in the embodiment of the invention.
Embodiment
At exist in the prior art when the data structure of some Data Sources change cause can't the demonstrating data form and maintenance and the fault of data reporting system got rid of the bigger problem of difficulty, the embodiment of the invention provides a kind of datagram table generating method, the flow process of this method as shown in Figure 3, concrete execution in step is as follows:
S30: obtain the query statement for the data sheet that generates user's request.
In the prior art, when the user asks a certain data sheet first, can at first generate a query statement, in background data base, search required data according to this query statement, generating data sheet then represents to the user, when the user reuses this data sheet, directly call this query statement and in database, search data, generate the data sheet rear line and represent.
In the present embodiment, this query statement can be after the user asks a certain data sheet first, forms before generating data sheet; Also can be to generate when having used this query statement to search required data after a certain data sheet has generated, when the user reuses this data sheet, not re-use this query statement and search required data, but at first carry out the following step.Query statement can be various database manipulation languages, and for example SQL statement etc. can certainly be other query statements, here repeats no more.
S31: the associated element that comprises in the query statement of determining to obtain, tables of data marker element and represent element.
Wherein there is incidence relation in the element in the tables of data that the tables of data marker element that comprises in associated element and the query statement is corresponding, represent and need the element that represents in the data sheet of element for user request, representing the data of element correspondence and the data of associated element correspondence is to extract from the tables of data of tables of data marker element correspondence.
Suppose that the query statement that obtains is Select A1, A2, B3, B4, C4From A, B, C WhereA1=B1 And A1=C1, the operation that this query statement will be realized is when A1=B1 and A1=C1, from Table A, choose A1 and A2, from table B, choose B3 and B4, from table C, choose C4, A1, A2, B3, B4, C4 are generated report form showing give the user.The element that occurs in this query statement is respectively A1, A2, B3, B4, C4, A, B, C, B1, C1, and wherein A1, B1, C1 are relevant relations, because A1=B1 and A1=C1, so these three elements are associated element; A, B, C are three tables of data signs, and they are exactly the tables of data marker element in the query statement; And A1, A2, B3, B4, C4 are the elements that will represent to the user, for representing element.Wherein associated element, tables of data marker element, show element quantity according to the difference of query statement and difference, the quantity that is not limited to mention here.
S32: generate corresponding each associated element, the tables of data marker element of determining respectively and represent the data extract attribute information of element, comprise the weight score value in the data extract attribute information, be used for characterizing corresponding element in the significance level of data sheet.
The data extract attribute information of each associated element, tables of data marker element, displaying element uses for extracting corresponding data at database.
S33: according to each the data extract attribute information that generates in the process that generates data sheet, when if the data that at least one represents the element correspondence occurring to extract, according to the weight score value that comprises respectively in each data extract attribute information, the specified data form default can not extract corresponding data represent element the time tolerance value that has.
The weight score value that comprises this element in the data extract attribute be used for to characterize corresponding element in the significance level of data sheet, when representing element and all exist in the data sheet of user's request, generates this data sheet, and the structure of data sheet as shown in Figure 2.When extract less than the data sheet of user's request represent that at least one represents the data of element correspondence in the element time, when the data sheet of user request just can't normally represent, the weight score value specified data form that comprises in can the data extract attribute information with each the element correspondence in the query statement default can not extract corresponding data represent element the time tolerance value that has.
S34: whether judge the tolerance of determining greater than setting threshold, if carry out S35; Otherwise, carry out S36.
S35: generate the default data sheet that represents element that can not extract corresponding data.
S36: generation can not be extracted the information that represents element of corresponding data and the information that data sheet can not represent.
Can set the threshold value of tolerance, when the tolerance value of data sheet during greater than setting threshold, generate and defaultly can not extract the data sheet that represents element of corresponding data and represent to the user; When the tolerance value of data sheet during smaller or equal to setting threshold, generation can not be extracted the information that represents element of corresponding data and the information that data sheet can not represent.
Generated the associated element that comprises in the query statement that obtains in this scheme, tables of data marker element and the data extract attribute information that represents element, in the process that generates data sheet, to represent element default if data sheet is required, just can calculate the tolerance of this data sheet, when this tolerance during greater than setting threshold, generate and do not comprise the default data sheet that represents element, owing in data sheet, do not represent the default element that represents, variation has taken place in the data structure that just can determine the Data Source at the data place that represents the element correspondence that this is default, thereby can safeguard with fault the Data Source at this default data place that represents the element correspondence and get rid of; Even variation has taken place in the data structure of the Data Source at the required data place that represents the element correspondence in this scheme, still can generate and not comprise this default data sheet that represents element, and can be in time, the location can not generate required data sheet exactly failure cause, thereby can be in time, fix a breakdown accurately and efficiently.
Concrete, generation among the above-mentioned S32 is corresponding each associated element, the tables of data marker element of determining and represent the data extract attribute information of element respectively, comprise: at each element that comprises in the query statement, carry out respectively: first identification information of determining the data sheet that the user asks; And determine respectively this element element type information, place tables of data second identification information, whether be the sign of associated element and be used for characterizing this element at the weight score value of the significance level of data sheet if being used for characterizing this element; The five-tuple information that first identification information, element type information, second identification information, sign and the weight score value of determining constituted is as the data extract attribute information of this element.
Continue to continue to use example, suppose that first identification information of the data sheet of user's request is 0001, because A1 is the element among the tables of data A, the parent table that is to say A1 is A, and be associated element, the five-tuple information of the A1 that obtains so can be expressed as (0001, element, A, association, weight score value); The five-tuple information that making uses the same method can determine B1 is (0001, element, B, association, weight score value), and the five-tuple information of C1 is (0001, element, C, association, weight score value).
Because tables of data A is an independent tables of data, there is not parent table, be the dereferenced element so second identification information of the tables of data at place can be made as 0, A, so the five-tuple information of A be (0001, show 0, dereferenced, weight score value); The five-tuple information that making uses the same method can determine B is (0001, table, 0, dereferenced, weight score value), and the five-tuple information of C is (0001, table, 0, dereferenced, weight score value).
A1 is associated element in this embodiment, and again for showing element, so the five-tuple information of A1 adopts A1 to get final product as the five-tuple information of associated element, for A2, its parent table is A, be to show element, so the five-tuple information of A2 be (0001, element, A, dereferenced, weight score value); The five-tuple information that making uses the same method can determine B3 is (0001, element, B, dereferenced, weight score value), the five-tuple information of B4 is (0001, element, B, dereferenced, weight score value), the five-tuple information of C4 is (0001, element, C, dereferenced, weight score value).
So also just determine the five-tuple information of all elements that occurs in the above-mentioned query statement, also just determined the data extract attribute information of all elements.
Concrete, determining among the above-mentioned S32 is used for characterizing this element at the weight score value of the significance level of data sheet, and according to the kind difference of element, definite method is also different, specifically comprises following three kinds of situations:
First kind of situation: if this element is associated element, then number of times that this associated element is related with other associated element in the query statement is as the weight score value of this element.
Continue to continue to use example, in above-mentioned query statement, because A1=B1 and A1=C1, the A1 number of times related with other associated element is 2, so the weight score value of A1 is 2, and then the five-tuple information of final definite A1 is (0001, element, A, association, 2); Make the five-tuple information of the final B1 that determines that uses the same method be (0001, element, B, association, 1), the five-tuple information of C1 is (0001, element, C, association, 1).
Second kind of situation: if this element is the tables of data marker element, then the weight score value of the associated element that comprises in the tables of data with this element correspondence and value, as the weight score value of this element.
Continue to continue to use example, in above-mentioned query statement, the associated element that comprises among the tables of data A is A1, because the weight score value of A1 is 2, so the weight score value of A is exactly 2, the five-tuple information of the so final A that determines is (0001, table, 0, dereferenced, 2); The five-tuple information that making uses the same method can determine B is (0001, table, 0, dereferenced, 1), and the five-tuple information of C is (0001, table, 0, dereferenced, 1).
The third situation: if this element is when representing element and being not associated element, then with the weight score value of the tables of data marker element of the tables of data correspondence at this element place with the ratio that in the tables of data at this element place is not the number that represents element of associated element, as the weight score value of this element.
Continue to continue to use example, in above-mentioned query statement, the displaying element that is not associated element is A2, B3, B4, C4.The weight score value of the tables of data marker element A of the tables of data A correspondence at A2 place is 2, and is not that the number of the displaying element of associated element is 1 among the A, so the weight score value of A2 is 2/1=2, the five-tuple information of the A2 that then finally obtains for (0001, element, A, dereferenced, 2); The five-tuple information that making uses the same method can determine B3 is (0001, element, B, dereferenced, 0.5), the five-tuple information of B4 be (0001, element, B, dereferenced, the five-tuple information of 0.5, C4 is (0001, element, C, dereferenced, 1).
Concrete, among the above-mentioned S33 according to each the data extract attribute information that generates in the process that generates data sheet, determine that appearance can not extract the data that at least one represents the element correspondence, its flow process such as Fig. 4 comprise:
S40: first identification information of the data sheet that acquisition will generate.
First identification information according to this data sheet obtains the data that represent the element correspondence that generate this data sheet.
S41: at each associated element, tables of data marker element with represent in the data extract attribute information of element, the location comprises each data extract attribute information of first identification information of acquisition.
At each associated element, the tables of data marker element of storage with represent in the data extract attribute information of element and search each the data extract attribute information that comprises this first identification information.Continue to continue to use example, can search and comprise each data extract attribute information of 0001.
S42: judge whether the corresponding tables of data of each second identification information difference that comprises all exists in each the data extract attribute information that navigates to; When judged result when not all existing, carry out S47; When judged result when all existing, carry out S43.
Continue to continue to use example, at first whether judgment data Table A, B, C exist, and have only when tables of data A, B, C exist and just can carry out the required data of subsequent extracted data sheet, otherwise can't generate data sheet.
S43: determining to comprise for characterizing element in each the data extract attribute information that navigates to is the data extract attribute information of the sign of associated element.
S44: judge that established data extracts the data whether each second identification information of comprising in the attribute information comprises whole associated element correspondences respectively in the corresponding tables of data, when judged result when not comprising the data of whole associated element correspondences, carry out S47; When judged result is when comprising the data of whole associated element correspondences, carry out S45.
When specified data Table A, B, when C exists, whether the data of location associated element correspondence exist, and when having only the data of associated element correspondence to exist, just can carry out the required data of subsequent extracted data sheet, otherwise can't generate data sheet.
S45: judge each second identification information in each the data extract attribute information that navigates to, comprise respectively corresponding tables of data whether have the data that all represent the element correspondence, when judged result when all existing, execution S46; When judged result when not all existing, carry out S47.
S46: determine to extract all data that represent the element correspondence.
S47: determine that appearance can not extract the data that at least one represents the element correspondence.
Through after the above-mentioned deterministic process, just can know because lack the corresponding data of tables of data sign, the data that lack the associated element correspondence still lack the data that represent the element correspondence, the appearance that causes can not be extracted at least one data that represent the element correspondence, so just can be in time, reason that accurately the default element of data can not be extracted in the location.
Concrete, among the above-mentioned S33 according to the weight score value that comprises respectively in each data extract attribute information, the specified data form default can not extract corresponding data represent element the time tolerance value that has, comprising: first and value of the weight score value that specified data table marker element comprises respectively in the corresponding data extract attribute information respectively; Determine to extract second and the value that represent the weight score value that element comprises respectively in the corresponding data extract attribute information respectively of corresponding data; With first and the value determined and second with the difference of the value quotient divided by the individual numerical value gained that represents element that can extract corresponding data, as data sheet default can not extract corresponding data represent element the time tolerance value that has.
Continue to continue to use example, suppose that the B4 element in the data sheet that the user asks does not exist, need so the specified data form default can not extract corresponding data represent element the time tolerance value that has.At first first and value of the weight score value that comprises respectively in the corresponding data extract attribute information respectively of specified data table marker element, weight score value in the data extract attribute information of tables of data marker element A, B, C is respectively 2,1,1, thus first and value be 4; The element that represents that can not extract corresponding data has only one, is B4, and the weight score value in its data extract attribute information is 0.5, thus second and value be 0.5; First and value and second with the difference of value be 4-0.5=3.5, it is 0.875 with the quotient that can extract the individual numerical value 4 that represents element of corresponding data, thus obtain data sheet 0001 default can not extract corresponding data represent element B 4 time tolerance value that has be 0.875.Suppose that setting threshold is 0.8, according to the deterministic process of S34-S36, can show data sheet as shown in Figure 5; Suppose that setting threshold is 0.9,, can show then that " the B4 element does not exist, and form please be examined for representing according to the deterministic process of S34-S36! " information.
Owing to can determine the default element that represents that can not extract corresponding data, directly variation has taken place just can to locate the default data that represent the element correspondence, thereby can directly in time safeguard at these data that represent the element correspondence.
Based on same inventive concept, the embodiment of the invention provides a kind of data sheet generating apparatus, and this device uses above-mentioned datagram table generating method to generate data sheet, and the structure of this device comprises as shown in Figure 6:
Query statement acquiring unit 60 is used for obtaining the query statement for the data sheet that generates user's request;
Element determining unit 61, be used for determining associated element, the tables of data marker element that the query statement that obtains comprises and represent element, there is incidence relation in element in the corresponding tables of data of the tables of data marker element that comprises in associated element and the query statement, represent and need the element that represents in the data sheet of element for user request, representing the data of element correspondence and the data of associated element correspondence is to extract from the tables of data of tables of data marker element correspondence;
Extract attribute information generation unit 62, be used for to generate corresponding each associated element, the tables of data marker element of determining respectively and represent the data extract attribute information of element, comprise the weight score value in the data extract attribute information, be used for characterizing corresponding element in the significance level of data sheet;
Tolerance value determining unit 63, be used for according to each the data extract attribute information that generates in the process that generates data sheet, when if the data that at least one represents the element correspondence occurring to extract, according to the weight score value that comprises respectively in each data extract attribute information, the specified data form default can not extract corresponding data represent element the time tolerance value that has;
Report generation unit 64 is used for during greater than setting threshold, generating the default data sheet that represents element that can not extract corresponding data in the tolerance value of determining.
Concrete, said extracted attribute information generation unit 62, concrete for each element that comprises at query statement, carry out respectively: first identification information of determining the data sheet that the user asks; And determine respectively this element element type information, place tables of data second identification information, whether be the sign of associated element and be used for characterizing this element at the weight score value of the significance level of data sheet if being used for characterizing this element; The five-tuple information that first identification information, element type information, second identification information, sign and the weight score value of determining constituted is as the data extract attribute information of this element.
Concrete, above-mentioned tolerance value determining unit 63, concrete first identification information for the data sheet that obtains to generate; At each associated element, tables of data marker element with represent in the data extract attribute information of element, the location comprises each data extract attribute information of first identification information of acquisition; Whether each second identification information that judgement comprises in each the data extract attribute information that navigates to tables of data of correspondence respectively all exists; When judged result when not all existing, determine that appearance can not extract the data that at least one represents the element correspondence; When judged result when all existing, determining to comprise for characterizing element in each the data extract attribute information that navigates to is the data extract attribute information of the sign of associated element; Judge that established data extracts the data whether each second identification information of comprising in the attribute information comprises whole associated element correspondences respectively in the corresponding tables of data; When judged result when not comprising the data of whole associated element correspondences, determine that appearance can not extract the data that at least one represents the element correspondence; When judged result is when comprising the data of whole associated element correspondences, judge each second identification information of in each the data extract attribute information that navigates to, comprising respectively corresponding tables of data whether have the data that all represent the element correspondence; When judged result when not all existing, determine that appearance can not extract the data that at least one represents the element correspondence.
Concrete, above-mentioned tolerance value determining unit 63 specifically is used for specified data table marker element first and value of the weight score value that comprises respectively of corresponding data extract attribute information respectively; And determine to extract second and the value that represent the weight score value that element comprises respectively in the corresponding data extract attribute information respectively of corresponding data; With first and the value determined and second with the difference of the value quotient divided by the individual numerical value gained that represents element that can extract corresponding data, as data sheet default can not extract corresponding data represent element the time tolerance value that has.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (10)

1. a datagram table generating method is characterized in that, comprising:
Obtain the query statement for the data sheet that generates user's request;
The associated element that comprises in the described query statement of determining to obtain, tables of data marker element and represent element, there is incidence relation in element in the corresponding tables of data of the tables of data marker element that comprises in described associated element and the described query statement, described representing needs the element that represents in the data sheet of element for user request, describedly represent the data of element correspondence and the data of associated element correspondence are to extract from the tables of data of described tables of data marker element correspondence;
Generate corresponding each associated element, the tables of data marker element of determining respectively and represent the data extract attribute information of element, comprise the weight score value in the described data extract attribute information, be used for characterizing corresponding element in the significance level of data sheet;
According to each the data extract attribute information that generates in the process that generates data sheet, when if the data that at least one represents the element correspondence occurring to extract, according to the weight score value that comprises respectively in each data extract attribute information, determine described data sheet default can not extract corresponding data represent element the time tolerance value that has;
During greater than setting threshold, generate the default data sheet that represents element that can not extract corresponding data in the tolerance value of determining.
2. the method for claim 1 is characterized in that, generates corresponding each associated element, the tables of data marker element of determining respectively and represents the data extract attribute information of element, comprising:
At each element that comprises in the described query statement, carry out respectively:
Determine first identification information of the data sheet that the user asks; And
Determine respectively this element element type information, place tables of data second identification information, whether be the sign of associated element and be used for characterizing this element at the weight score value of the significance level of data sheet if being used for characterizing this element;
The five-tuple information that first identification information, element type information, second identification information, described sign and the weight score value of determining constituted is as the data extract attribute information of this element.
3. method as claimed in claim 2 is characterized in that, is identified for characterizing the weight score value of the significance level of this element in data sheet, specifically comprises:
If this element is associated element, then number of times that this associated element is related with other associated element in the described query statement is as the weight score value of this element;
If this element is the tables of data marker element, then the weight score value of the associated element that comprises in the tables of data with this element correspondence and value, as the weight score value of this element;
If this element is when representing element and being not associated element, then with the weight score value of the tables of data marker element of the tables of data correspondence at this element place with the ratio that in the tables of data at this element place is not the number that represents element of associated element, as the weight score value of this element.
4. as claim 2 or 3 described methods, it is characterized in that, in the process that generates data sheet, determine that appearance can not extract the data that at least one represents the element correspondence according to each the data extract attribute information that generates, comprising:
First identification information of the data sheet that acquisition will generate;
At each associated element, tables of data marker element with represent in the data extract attribute information of element, the location comprises each data extract attribute information of first identification information of acquisition;
Whether each second identification information that judgement comprises in each the data extract attribute information that navigates to tables of data of correspondence respectively all exists;
When judged result when not all existing, determine that appearance can not extract the data that at least one represents the element correspondence;
When judged result when all existing, determining to comprise for characterizing element in each the data extract attribute information that navigates to is the data extract attribute information of the sign of associated element;
Judge that established data extracts the data whether each second identification information of comprising in the attribute information comprises whole associated element correspondences respectively in the corresponding tables of data;
When judged result when not comprising the data of whole associated element correspondences, determine that appearance can not extract the data that at least one represents the element correspondence;
When judged result is when comprising the data of whole associated element correspondences, judge each second identification information of in each the data extract attribute information that navigates to, comprising respectively corresponding tables of data whether have the data that all represent the element correspondence;
When judged result when not all existing, determine that appearance can not extract the data that at least one represents the element correspondence.
5. the method for claim 1 is characterized in that, according to the weight score value that comprises respectively in each data extract attribute information, determine described data sheet default can not extract corresponding data represent element the time tolerance value that has, comprising:
First and value of the weight score value that specified data table marker element comprises respectively in the corresponding data extract attribute information respectively;
Determine to extract second and the value that represent the weight score value that element comprises respectively in the corresponding data extract attribute information respectively of corresponding data;
With first and the value determined and second with the difference of the value quotient divided by the individual numerical value gained that represents element that can extract corresponding data, as described data sheet default can not extract corresponding data represent element the time tolerance value that has.
6. the method for claim 1 is characterized in that, also comprises:
During smaller or equal to setting threshold, generation can not be extracted the information that represents element of corresponding data and the information that data sheet can not represent in the tolerance value of determining.
7. a data sheet generating apparatus is characterized in that, comprising:
The query statement acquiring unit is used for obtaining the query statement for the data sheet that generates user's request;
The element determining unit, be used for determining associated element, the tables of data marker element that the described query statement that obtains comprises and represent element, there is incidence relation in element in the corresponding tables of data of the tables of data marker element that comprises in described associated element and the described query statement, described representing needs the element that represents in the data sheet of element for user request, describedly represent the data of element correspondence and the data of associated element correspondence are to extract from the tables of data of described tables of data marker element correspondence;
Extract the attribute information generation unit, be used for to generate corresponding each associated element, the tables of data marker element of determining respectively and represent the data extract attribute information of element, comprise the weight score value in the described data extract attribute information, be used for characterizing corresponding element in the significance level of data sheet;
Tolerance value determining unit, be used for according to each the data extract attribute information that generates in the process that generates data sheet, when if the data that at least one represents the element correspondence occurring to extract, according to the weight score value that comprises respectively in each data extract attribute information, determine described data sheet default can not extract corresponding data represent element the time tolerance value that has;
The report generation unit is used for during greater than setting threshold, generating the default data sheet that represents element that can not extract corresponding data in the tolerance value of determining.
8. device as claimed in claim 7 is characterized in that, described extraction attribute information generation unit is concrete for each element that comprises at described query statement, carries out respectively: first identification information of determining the data sheet that the user asks; And determine respectively this element element type information, place tables of data second identification information, whether be the sign of associated element and be used for characterizing this element at the weight score value of the significance level of data sheet if being used for characterizing this element; The five-tuple information that first identification information, element type information, second identification information, described sign and the weight score value of determining constituted is as the data extract attribute information of this element.
9. device as claimed in claim 8 is characterized in that, described tolerance value determining unit, concrete first identification information for the data sheet that obtains to generate; At each associated element, tables of data marker element with represent in the data extract attribute information of element, the location comprises each data extract attribute information of first identification information of acquisition; Whether each second identification information that judgement comprises in each the data extract attribute information that navigates to tables of data of correspondence respectively all exists; When judged result when not all existing, determine that appearance can not extract the data that at least one represents the element correspondence; When judged result when all existing, determining to comprise for characterizing element in each the data extract attribute information that navigates to is the data extract attribute information of the sign of associated element; Judge that established data extracts the data whether each second identification information of comprising in the attribute information comprises whole associated element correspondences respectively in the corresponding tables of data; When judged result when not comprising the data of whole associated element correspondences, determine that appearance can not extract the data that at least one represents the element correspondence; When judged result is when comprising the data of whole associated element correspondences, judge each second identification information of in each the data extract attribute information that navigates to, comprising respectively corresponding tables of data whether have the data that all represent the element correspondence; When judged result when not all existing, determine that appearance can not extract the data that at least one represents the element correspondence.
10. device as claimed in claim 7 is characterized in that, described tolerance value determining unit specifically is used for specified data table marker element first and value of the weight score value that comprises respectively of corresponding data extract attribute information respectively; And determine to extract second and the value that represent the weight score value that element comprises respectively in the corresponding data extract attribute information respectively of corresponding data; With first and the value determined and second with the difference of the value quotient divided by the individual numerical value gained that represents element that can extract corresponding data, as described data sheet default can not extract corresponding data represent element the time tolerance value that has.
CN201210003766.6A 2012-01-06 2012-01-06 Datagram table generating method and device thereof Active CN103198071B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210003766.6A CN103198071B (en) 2012-01-06 2012-01-06 Datagram table generating method and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210003766.6A CN103198071B (en) 2012-01-06 2012-01-06 Datagram table generating method and device thereof

Publications (2)

Publication Number Publication Date
CN103198071A true CN103198071A (en) 2013-07-10
CN103198071B CN103198071B (en) 2016-05-25

Family

ID=48720640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210003766.6A Active CN103198071B (en) 2012-01-06 2012-01-06 Datagram table generating method and device thereof

Country Status (1)

Country Link
CN (1) CN103198071B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426470A (en) * 2015-11-16 2016-03-23 上海斐讯数据通信技术有限公司 Table dynamic generation system and method
CN105512309A (en) * 2015-12-11 2016-04-20 广州精点计算机科技有限公司 Report search method and report search device
CN105528666A (en) * 2014-10-25 2016-04-27 国家电网公司 Comprehensive report generation method of transformer station
CN105550206A (en) * 2015-12-01 2016-05-04 珠海多玩信息技术有限公司 Version control method and device for structured query language
CN106445949A (en) * 2015-08-07 2017-02-22 北京国双科技有限公司 Method and device for detecting data change in data table
CN106688002A (en) * 2014-09-09 2017-05-17 英特格拉托公司 Simulation system, simulation method, and simulation program
CN108809673A (en) * 2017-04-28 2018-11-13 北京微影时代科技有限公司 A kind of method and device of fault alarm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751436A (en) * 2008-12-19 2010-06-23 中国移动通信集团山东有限公司 Method and system for generating reports
CN102207940A (en) * 2010-03-31 2011-10-05 国际商业机器公司 Method and system for checking data
CN102279848A (en) * 2010-06-09 2011-12-14 中国电信股份有限公司 Method and device for generating report template

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751436A (en) * 2008-12-19 2010-06-23 中国移动通信集团山东有限公司 Method and system for generating reports
CN102207940A (en) * 2010-03-31 2011-10-05 国际商业机器公司 Method and system for checking data
CN102279848A (en) * 2010-06-09 2011-12-14 中国电信股份有限公司 Method and device for generating report template

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106688002A (en) * 2014-09-09 2017-05-17 英特格拉托公司 Simulation system, simulation method, and simulation program
CN105528666A (en) * 2014-10-25 2016-04-27 国家电网公司 Comprehensive report generation method of transformer station
CN106445949A (en) * 2015-08-07 2017-02-22 北京国双科技有限公司 Method and device for detecting data change in data table
CN105426470A (en) * 2015-11-16 2016-03-23 上海斐讯数据通信技术有限公司 Table dynamic generation system and method
CN105426470B (en) * 2015-11-16 2019-06-18 上海斐讯数据通信技术有限公司 A kind of system and method for dynamic generation table
CN105550206A (en) * 2015-12-01 2016-05-04 珠海多玩信息技术有限公司 Version control method and device for structured query language
CN105550206B (en) * 2015-12-01 2019-10-29 珠海多玩信息技术有限公司 The edition control method and device of structured query sentence
CN105512309A (en) * 2015-12-11 2016-04-20 广州精点计算机科技有限公司 Report search method and report search device
CN108809673A (en) * 2017-04-28 2018-11-13 北京微影时代科技有限公司 A kind of method and device of fault alarm

Also Published As

Publication number Publication date
CN103198071B (en) 2016-05-25

Similar Documents

Publication Publication Date Title
CN103198071A (en) Data report generation method and device adopting same
CN110292775B (en) Method and device for acquiring difference data
CN108132957B (en) Database processing method and device
CN104657346A (en) Question matching system and question matching system in intelligent interaction system
US9910870B2 (en) System and method for creating data models from complex raw log files
CN101894058B (en) Method and device for analyzing test coverage automatically aiming at automatic test system
CN104866498A (en) Information processing method and device
CN104820677A (en) Layer display method and system of discipline
CN104063361A (en) Report design method and system
CN113326314B (en) Data visualization method, device, electronic equipment and readable storage medium
JP2012528375A (en) Providing patent maps by viewpoint
CN110795524A (en) Main data mapping processing method and device, computer equipment and storage medium
US20210209160A1 (en) Method and apparatus for identifying map region words
CN109408502A (en) A kind of data standard processing method, device and its storage medium
CN114637811A (en) Data table entity relation graph generation method, device, equipment and storage medium
WO2022048362A1 (en) Data storage method and apparatus, electronic device, and storage medium
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN107729097B (en) Display page configuration method and corresponding equipment
CN103793784A (en) Method for leading in organizational structure for position value evaluation system
CN107203525B (en) Database processing method and device
CN105786990B (en) The method and device of database data storage and quick search
CN109471935B (en) Questionnaire survey object determining method and device, electronic equipment and storage medium
US20170031657A1 (en) Unified modeling language (uml) analysis system and method
CN105488061B (en) A kind of method and device of verify data validity
CN113050933B (en) Brain graph data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant