Embodiment
The present inventor finds, in large-scale software systems, can utilize multiplexing code means to realize by setting up functional module and the multiplexing of each functional module that to carry out characteristic functions separately, set up software systems with respect to the mode of utilizing generating code, significantly reduce workload, and reduced error rate.But it is inevitably, still can occur for example unmodified or revise wrong parameter, data type wherein, or unmodified or revise the problems such as external interface, dependence, mapping relations of wrong functional module.Therefore, still necessary the concrete setting of described functional module and the relevance between each functional module are checked, to revise the mistake that wherein produces.
The inventor just is being based on the taking all factors into consideration of the problems referred to above, and has proposed the present invention.
Embodiment of the present invention provides a kind of error check method, mainly is by reading the data message of core logic piece and display logic piece; Judge that according to detailed programs whether the mapping relations between the dependence between the core logical block in the described detailed programs and core logic piece, display logic piece and the video data set up, can fast and accurately check to make mistake, described mistake be revised for follow-up.
Promptly in conjunction with the accompanying drawings and embodiments the specific embodiment of the present invention is described in detail below.
Fig. 1 has shown the schematic flow sheet of error check method of the present invention in a specific embodiment.As shown in Figure 1, described error check method comprises the steps:
S10 searches for and reads the data message of core logical block and display logic piece in the graphics data disposal system;
S11 according to detailed programs, obtains dependence between the core logic piece and the mapping relations between core logic piece, display logic piece and the video data;
S12, according to the data message of core logic piece and display logic piece, whether dependence in the inspection detailed programs between the core logical block or the mapping relations between core logic piece, display logic piece and the video data are set up;
S13, the outgoing inspection result.
Execution in step S10 at first searches for and reads the data message of core logical block and display logic piece in the graphics data disposal system.
Before step S10 is described, in advance mentioned graphics data disposal system is once introduced.As shown in Figure 2, the composition frame chart that has shown the graphics data disposal system.As shown in the figure, in described graphics data disposal system, comprise at least: core logic storehouse 20, display logic storehouse 21, shape library 22, instrument 23 and project 24.Wherein, core logic storehouse 20 includes a plurality of core logic pieces, and the core logic piece is formed with dependence each other; Display logic storehouse 21 includes a plurality of display logic pieces, and described display logic piece and core logic piece are formed with mapping relations.
The application layer of each project 24 is made up of a plurality of windows 241 and window attribute table 242, each window 241 is made up of control code 241a and linked code 241b, control code 241a is used to describe control property (being video data), and linked code 241b is used for core logic piece and display logic piece chain are gone into system.
In other words, each project 24 include can be multiplexing core logic piece and display logic piece, and establish certain linking relationship between the core logic piece and between core logic piece and the display logic piece.Particularly, the link of being made up of according to dependence each other a plurality of core logic pieces is exactly the core logic chain, is used for the descriptive system state.The link of being made up of the mapping relations between core logic piece, display logic piece and the video data is exactly the display logic chain, is used to describe the source of video data.
Therefore, described graphics data disposal system, set up standardization and modular core logic piece and display logic piece, and setting up linking relationship between the core logic piece and between core logic piece and the display logic piece, for different projects, can go into different core logic pieces, display logic piece and video data by chain and realize like this.
Therefore, in step S10, just search out core logic pieces all in the graphics data disposal system and display logic piece, and the data message of core logic piece and display logic piece is read out.Specifically, for the core logic piece, described data message comprises: can export which data, what the type of each data is; Need which external data, what the type of each data is.For the display logic piece, described data message comprises: import which data, what the type of each data is; Export which data, what the type of each data is.
Then execution in step S11 according to detailed programs, obtains dependence between the core logic piece and the mapping relations between core logic piece, display logic piece and the video data.
In the present embodiment, be exactly according to a certain detailed programs, obtain dependence between the core logic piece related in described detailed programs and the mapping relations between core logic piece, display logic piece and the video data.
Specifically, for the dependence between the core logic piece, what refer to is exactly the core logic chain of being responsible for the core logic block chaining, by the core logic chain, just establishes dependence between each core logic piece.In actual applications, the dependence between the core logic piece can be one to one, the relation that relies on of one-to-many, cross-dependence or grade.Specifically, described man-to-man relation refers to and includes a main core logic piece and one from the core logic piece, and for example, as shown in Figure 3A, core logic piece B (as from the core logic piece) depends on core logic piece A (as main core logic piece); The relation of described one-to-many refers to and includes a main core logic piece and directly depend on a plurality of from the core logic piece of described main core logic piece, for example, shown in Fig. 3 B, core logic piece B, C (as from the core logic piece) depend on core logic piece A (as main core logic piece) respectively; The relation of described cross-dependence refers between a plurality of core logic pieces and interdepends, for example, shown in Fig. 3 C, core logic piece B, C (as from the core logic piece) depend on core logic piece A (as main core logic piece), and core logic piece D (as from the core logic piece) depends on core logic piece A, B (as main core logic piece); The dependence that the relation that described grade relies on refers between a plurality of core logic pieces is grade, for example, shown in Fig. 3 D, core logic piece B, C (as from the core logic piece) depend on core logic piece A (as main core logic piece), and core logic piece D, E (as from the core logic piece) depend on core logic piece B, C (as main core logic piece) respectively.Here, so-called main core logic piece be relative from the core logic piece, for a dependence, the dependent is from the core logic piece, is main core logic piece by the dependent.
Mapping relations between described core logic, display logic piece and the video data, what refer to is exactly to be responsible for setting up between core logic piece, display logic piece and video data link, by the display logic chain, set up mapping relations between core logic display logic piece and the video data.In the present embodiment, the mapping relations between core logic, display logic piece and video data can be one to one or the relation of one-to-many.Specifically, described man-to-man relation refers to a core logic piece and links with a display logic piece foundation, and for example, shown in Fig. 4 A, core logic piece A, display logic piece K and video data X set up mapping relations; The relation of described one-to-many refers to a core logic piece and links with a plurality of display logic pieces foundation, for example, shown in Fig. 4 B, core logic piece A, display logic piece K and video data X set up mapping relations, core logic piece A, display logic piece L and video data Y set up mapping relations, and core logic piece A, display logic piece M and video data Z set up mapping relations, so just can show a plurality of video datas under a system state.
By step S11, related core logic piece, display logic piece and video data can be classified, be convenient to follow-up inspection.Particularly, classify according to dependence exactly, classify the core logic piece that establishes dependence each other as an inspection group.And be to classify according to mapping relations, classify the core logic piece, display logic piece and the video data that establish mapping relations each other as an inspection group.
Follow execution in step S12, according to the data message of core logic piece and display logic piece, whether dependence in the inspection detailed programs between the core logical block or the mapping relations between core logic piece, display logic piece and the video data are set up.
Whether, mainly be check: A), whether the data type of the output data of main core logic piece be consistent with data type from the input data of core logic piece for the dependence between the core logic piece if in the present embodiment, setting up; B), whether there is the phenomenon that relies on winding between the core logic piece.Whether, mainly be check: a), whether the data type of the output data of core logic piece consistent with the data type of the input data of display logic piece for the mapping relations between core logic piece, display logic piece and the video data if setting up; B), whether the data type of the data type of the output data of display logic piece and video data is consistent.
For A), be that example describes with Fig. 3 B, set up dependence between core logic piece A and the core logic piece B, set up dependence between core logic piece A and the core logic C.At step S12, to check exactly whether the data type of the output data that core logic piece A can provide and the data type of the needed input data of core logic piece B are consistent like this.In like manner, comprise also whether the data type of the output data of checking that core logic piece A can provide and the data type of the needed input data of core logic C are consistent.If check that discovery is inconsistent, can judge that then the dependence between the core logic piece is false.
For B), be that example describes still with 3B, check between core logic piece A and the core logic piece B or between core logic piece A and the core logic C whether have the phenomenon that relies on winding exactly.If check and find to have the phenomenon that relies on winding, can judge that then the dependence between the core logic piece is false.
So-called dependence winding refers to the phenomenon that the dependence of setting up between the core logic piece forms annular, the endless loop that winding can cause system's operation occurs relying on.As shown in Figure 5, core logic piece B depends on core logic piece A, and core logic piece C depends on core logic piece B, and core logic piece A relies on core logic piece C, and described dependence promptly can cause the dependence winding.
In actual applications, suppose that described graphics data disposal system is applied in the field of video processing, for example, core logic piece A manages current channel (for example CCTV-1), core logic piece B manages current program (for example news hookup), and core logic piece B needs core logic piece A to provide channel data to work.At this moment to check exactly whether the data type that core logic piece A provides consistent with the data type that core logic piece B needs, if when core logic piece A provides channel, core logic piece B needs also should be channel.In addition, to check also whether core logic piece A and core logic piece B exist dependence winding phenomenon.
For a) and b), be that example describes with Fig. 4 B, core logic piece A, display logic piece L and video data Y establish mapping relations.At step S12, to check exactly whether the data type of the output data that core logic piece A can provide and the data type of the needed input data of display logic piece L are consistent like this; And check whether the data type of the output data that display logic piece L can provide and the data type of video data are consistent.If check that discovery is inconsistent, can judge that then the mapping relations between core logic piece, display logic piece and the video data are false.
In actual applications, suppose that described graphics data disposal system is applied in the field of video processing, for example, core logic piece A manages current volume, and display logic piece L can be converted to character string with a numeral, and video data X is the attribute of certain text box.At this moment will check exactly whether the data type that core logic piece A is provided is the needed data type of display logic piece L, if core logic piece A provides numeral, what display logic piece L needed also should a numeral; In addition, will check also whether the data type that display logic piece L transforms out is the needed data type of video data X, if display logic piece L output string, what video data X needed also should be character string.
Follow execution in step S14, the outgoing inspection result.In the present embodiment, described outgoing inspection result can export by graphic interface, and described graphic interface can be the mode of tabulation or chart, on concrete the demonstration, can take will comparison all results all show, and the part that will make mistakes is with highlighted or show with different colors.The part that also can take only will make mistakes shows.The staff just can find the part of makeing mistakes according to described check result, and can correspondingly revise it, fast and accurately.
Pass through above steps, the mistake that can may exist the mapping relations between the dependence between the core logic piece related in the graphics data disposal system and core logic piece, display logic piece and the video data can fast and accurately be checked out, greatly reduce the error rate of system's operation, both reduced the construction cycle and reduced cost of development.
Fig. 6 has shown the schematic flow sheet of error check method of the present invention in another specific embodiment.As shown in Figure 6, described error check method comprises the steps:
S20 according to detailed programs, obtains dependence between the core logic piece and the mapping relations between core logic piece, display logic piece and the video data;
S21 searches for and reads the data message of related core logic piece of described detailed programs and display logic piece;
S22, according to the data message of core logic piece and display logic piece, whether dependence in the inspection detailed programs between the core logical block or the mapping relations between core logic piece, display logic piece and the video data are set up;
S23, the outgoing inspection result.
Like this, just can be according to detailed programs, can carry out bug check for the mapping relations between the dependence between the core logic piece related in the described detailed programs and core logic piece, display logic piece and the video data, the particular content in described each step can be with reference to the description in the previous embodiment.In described another specific embodiment, improve the specific aim of bug check relatively.
Though the present invention by the preferred embodiment explanation as above, these preferred embodiments are not in order to limit the present invention.Those skilled in the art without departing from the spirit and scope of the present invention, should have the ability various corrections and additional are made in this preferred embodiment, and therefore, protection scope of the present invention is as the criterion with the scope of claims.