CN109165209A - The data verification method, device of object type, equipment and medium in database - Google Patents

The data verification method, device of object type, equipment and medium in database Download PDF

Info

Publication number
CN109165209A
CN109165209A CN201810922360.5A CN201810922360A CN109165209A CN 109165209 A CN109165209 A CN 109165209A CN 201810922360 A CN201810922360 A CN 201810922360A CN 109165209 A CN109165209 A CN 109165209A
Authority
CN
China
Prior art keywords
class
verified
description information
information
byte stream
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
CN201810922360.5A
Other languages
Chinese (zh)
Other versions
CN109165209B (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.)
Shanghai Dameng Database Co Ltd
Original Assignee
Shanghai Dameng Database 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 Shanghai Dameng Database Co Ltd filed Critical Shanghai Dameng Database Co Ltd
Priority to CN201810922360.5A priority Critical patent/CN109165209B/en
Publication of CN109165209A publication Critical patent/CN109165209A/en
Application granted granted Critical
Publication of CN109165209B publication Critical patent/CN109165209B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses data verification method, device, equipment and the media of object type in a kind of database.This method comprises: obtaining byte stream to be verified, byte stream to be verified includes class mark to be verified and class description information to be verified;It obtains and is marked with the associated class of byte stream to be verified, corresponding target class description information is obtained according to class label;When class to be verified mark is default class mark, whether class description information more to be verified and target class description information are consistent;When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.Verification efficiency is improved to save the time all in accordance with byte stream calculation to be verified class mark to be verified and class description information to be verified when the embodiment of the present invention is realized without verification every time.

Description

The data verification method, device of object type, equipment and medium in database
Technical field
The present embodiments relate to a kind of data check sides of object type in database technology more particularly to database Method, device, equipment and medium.
Background technique
There are numerous types of data in database, wherein Class Type is a kind of special data type, carries out class to it After instantiation, object type has been reformed into.In the instantiation process of class, the storage of object type instantiation data has been related to it And reading, after instantiation data storage, the definition of object type may change, at this point, in reading object type Data when, it is necessary to the data of object type are verified, i.e., the attribute of the object type stored in validation database Whether data type matches with the data type of the attribute of existing object type definitions or the number of the attribute of object type Whether matched with the number of the attribute of existing object type definitions or the sequence of the attribute of object type with it is existing right As whether the sequence of the attribute of type definition matches.
In the prior art, object data format matching process is generallyd use to verify the data type of object type. It is specific: assay format rule first, if inheriting existing format convention without format convention, being calculated by format convention The check value of the data of object type to be verified, then calculated check value is compared with default check value.If the two Unanimously, then illustrate that the data of object type to be verified are correct.Conversely, then illustrate the error in data of object type to be verified, i.e., pair As the definition of type is changed.
Using above-mentioned method of calibration in each execution verification, requires to calculate check value, consume the plenty of time, cause It verifies inefficient.
Summary of the invention
The embodiment of the present invention provides data verification method, device, equipment and the medium of object type in a kind of database, with Improve verification efficiency.
In a first aspect, being applied to the embodiment of the invention provides a kind of data verification method of object type in database Server, this method comprises:
Byte stream to be verified is obtained, the byte stream to be verified includes class mark to be verified and category information to be verified;
It obtains and is marked with the associated class of byte stream to be verified, corresponding target class is obtained according to class label and is described Information;
When the class mark to be verified is default class mark, the class description information to be verified and the target class Whether description information is consistent;
When the class description information to be verified is consistent with the target class description information, the byte stream to be verified is determined Conversion is correct.
Further, the class description information to be verified includes the first length information and the first attribute information;The target Class description information includes the second length information and the second attribute information;
It is described when the class to be verified mark is default class mark, the class description information to be verified and the mesh Whether consistent mark class description information, comprising:
When the class mark to be verified is default class mark, first length information and second length are believed It whether consistent ceases;
When first length information is consistent with second length information, first attribute information with it is described Whether the second attribute information is consistent;
It is described when the class description information to be verified is consistent with the target class description information, determine the word to be verified Throttling conversion is correct, comprising:
When first attribute information is consistent with second attribute information, the byte stream conversion to be verified is being determined just Really.
Further, described when the class mark to be verified is default class mark, the class description letter to be verified After whether breath and the target class description information are consistent, further includes:
When first length information and second length information are inconsistent, the byte stream conversion to be verified is determined Mistake.
Further, this method further includes:
When the class mark to be verified is not default class mark, the byte stream transcription error to be verified is determined.
Further, the acquisition is marked with the associated class of byte stream to be verified, according to class label acquisition pair The target class description information answered, comprising:
It obtains from pre-stored data dictionary and is marked with the associated class of byte stream to be verified;
Corresponding target class description information is obtained from pre-stored interim table according to class label.
Further, the class description information to be verified is that the class description information in interim table according to the pre-stored data generates 's.
Second aspect, the embodiment of the invention also provides a kind of data verification method of object type in database, applications In client, this method comprises:
Receive the byte stream to be verified and target class description information that server is sent;
The byte stream to be verified is parsed to obtain class mark to be verified and class description information to be verified;
When the class mark to be verified is default class mark, the class description information to be verified and the target class Whether description information is consistent;
When the class description information to be verified is consistent with the target class description information, the byte stream to be verified is determined Conversion is correct.
The third aspect, the embodiment of the invention also provides a kind of data calibration device of object type in database, applications In server, which includes:
Byte stream to be verified obtains module, and for obtaining byte stream to be verified, the byte stream to be verified includes to be verified Class mark and class description information to be verified;
Target class description information obtains module, marks for obtaining with the associated class of byte stream to be verified, according to institute It states class label and obtains corresponding target class description information;
Class description information comparison module, for comparing described to school when the class mark to be verified is default class mark It tests class description information and whether the target class description information is consistent;
Byte stream conversion to be verified is appropriately determined module, for retouching when the class description information to be verified with the target class State information it is consistent when, determine that the byte stream to be verified conversion is correct.
Fourth aspect, the embodiment of the invention also provides a kind of data calibration device of object type in database, applications In client, which includes:
Information receiving module, for receiving the byte stream to be verified and target class description information of server transmission;
Byte stream parsing module to be verified, for the byte stream to be verified parsed to obtain class mark to be verified and Class description information to be verified;
Class description information comparison module, for comparing described to school when the class mark to be verified is default class mark It tests class description information and whether the target class description information is consistent;
Byte stream conversion to be verified is appropriately determined module, for retouching when the class description information to be verified with the target class State information it is consistent when, determine that the byte stream to be verified conversion is correct.
5th aspect, the embodiment of the invention also provides a kind of equipment, which includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes method described in the embodiment of the present invention.
6th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program, the program realize method as described in the embodiments of the present invention when being executed by processor.
For the embodiment of the present invention by obtaining byte stream to be verified, byte stream to be verified includes class mark to be verified and to be verified Class description information is obtained and is marked with the associated class of byte stream to be verified, obtains corresponding target class description information according to class label, When class to be verified mark is default class mark, whether class description information more to be verified and target class description information are consistent, when When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.It realizes without every All in accordance with byte stream calculation to be verified class mark to be verified and class description information to be verified when secondary verification, so that the time is saved, Improve verification efficiency.
Detailed description of the invention
Fig. 1 is the flow chart of the data verification method of object type in one of the embodiment of the present invention one database;
Fig. 2 is the flow chart of the data verification method of object type in one of the embodiment of the present invention two database;
Fig. 3 is the flow chart of the data verification method of object type in one of the embodiment of the present invention three database;
Fig. 4 is the flow chart of the data verification method of object type in one of the embodiment of the present invention four database;
Fig. 5 is the structural representation of the data calibration device of object type in one of the embodiment of the present invention five database Figure;
Fig. 6 is the structural representation of the data calibration device of object type in one of the embodiment of the present invention six database Figure;
Fig. 7 is the structural schematic diagram of one of the embodiment of the present invention seven equipment.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
The flow chart of the data verification method of object type in a kind of database that Fig. 1 provides for the embodiment of the present invention one, The present embodiment was applicable to the case where object type verifies in database, and this method can be by object type in database Data calibration device execute, which can be realized by the way of software and/or hardware, which can be configured at clothes It is engaged in device, such as computer etc..As shown in Figure 1, this method specifically comprises the following steps:
Step 110 obtains byte stream to be verified, and byte stream to be verified includes class mark to be verified and class to be verified description letter Breath.
In an embodiment of the present invention, what byte stream to be verified indicated is the object column data in Object table, and object column exists It is to be stored with BLOB (Binary Large Object, binary large object) type in Object table.Wherein, object column refers to It is database in the data of storage table, single row is defined as object type namely object column refers to that data type is pair As the column of type.Object table refers to the table comprising object column.
Byte stream to be verified can specifically include class mark to be verified and class description information to be verified, wherein class to be verified Mark can be used to flag data type, namely the data that can determine the byte stream to be verified of acquisition are identified by class to be verified Type, it is subsequent the mode being compared to be identified with default class by using by it, as whether verifying byte stream to be verified Correctly one of foundation is more specifically used correspondingly, can also be used to flag data type it is appreciated that presetting class and identifying To mark specific data type.Class description information to be verified can specifically include the first length information and the first attribute information, the One length information can indicate the length of the first attribute information.It is subsequent to be carried out by using by it with target class description information The mode compared, also as one of whether correct foundation of verification byte stream to be verified.Wherein, target class description information specifically may be used To include the second length information and the second attribute information, the second length information can indicate the length of the second attribute information.It needs Illustrate, the second length information in target class description information and the first length information in class description information to be verified may It is identical, it is also possible to different.The first attribute in the second attribute information and class description information to be verified in target class description information Information may be identical, it is also possible to different.
Byte stream to be verified is generated when the instantiation data to class stores, due to by the instantiation data of class The serializing by class is needed when being stored, accordingly it is also possible to be interpreted as, byte stream to be verified is raw after the serializing of class At.When more specifically, to the instantiation data of the object column insertion class of Object table, need to carry out the instantiation data of class It converts and stores, since object column is to be stored with BLOB type, and the instantiation data of class is in memory in Object table Using OBJECT_T representation, therefore, before storage, need the corresponding OBJECT_T structure conversion of the instantiation data of class At BLOB type, the above process can be known as the serializing of class.Meanwhile the data for the data for generating the serialization process through class Type set is OBJ_BLOB type, to distinguish with common BLOB type, i.e., if the data type of certain data is common BLOB type, it can be said that the bright data are that the serializing without class generates.It should be noted that byte stream to be verified is in life At when data type be OBJ_BLOB type.When user, which needs to treat check byte stream, to be inquired, need to be carried out The unserializing of class operates, i.e., OBJ_BLOB categorical data is regenerated OBJECT_T structure.It should also be noted that, usual In the case of, the serializing of the class of the instantiation data of same class and the unserializing of class mutually turn to be allowed to and correctly. But if the definition of class is modified after the serializing of class, at this point, the unserializing of class just can not be carried out again, in order to Guarantee Object table in class instantiation data insertion, inquiry and modification correctness, need the serializing to existing class and The unserializing process of class is adjusted, specific: class mark to be verified and class to be verified are stored in the serialization process of class Description information, i.e., when OBJECT_T structure being converted to OBJ_BLOB data, by class to be verified mark and class to be verified description letter Breath write-in OBJ_BLOB data, make byte stream to be verified carry class mark to be verified and class description information to be verified.In the anti-of class Class mark to be verified and class description information to be verified are verified in serialization process, i.e., OBJ_BLOB data are converted into OBJECT_T When structure, it is respectively compared class mark to be verified and default class mark, whether are class description information and target class description information to be verified Unanimously, class to be verified described here mark is sensible same with previously described category to be verified, is used to flag data type;This In the described default class mark it is sensible same with previously described default category, also more specifically used in flag data type In label specific data type, data type of the previously described byte stream to be verified when generating is OBJ_BLOB type, such as Non-precondition class mark in the byte stream to be verified that fruit obtains, it can be said that the data type of the bright byte stream to be verified is not OBJ_BLOB type, and then the byte stream to be verified not can be carried out the unserializing of class.In order to whether verify byte stream to be verified It is legal, need the specific data type for being used to mark by default class mark to be set as OBJ_BLOB type.In addition, described here Class description information to be verified and previously described class description information to be verified are also identical.If class mark to be verified and default category It is also consistent to know class description information and target class description information consistent and to be verified, it can be said that bright byte stream conversion to be verified is just Really, the unserializing of class can be carried out, on this basis, if user query is some category in class object or class object Property, at this point, user can be returned to for corresponding structure or attribute value.If class mark to be verified and default class mark are different It causes, or, class to be verified mark and default class mark is consistent but class description information to be verified and target class description information are inconsistent, then It can illustrate after the serializing of class, the definition of class is modified, and the unserializing of class can not be carried out, on this basis, will Report an error processing.Illustratively, such as in the serializing of class, the byte stream to be verified of OBJ_BLOB data type is modified, example As class mark has been modified to the mark of common BLOB type;For another example after the serializing of class, class description information is had modified.
It is understood that realize that above-mentioned key point is: how in the instantiation data storing process of class (i.e. class In serialization process), byte stream to be verified is written into class to be verified mark and class description information to be verified, so that when inquiry ( The unserializing of class), the byte stream to be verified got carries class mark to be verified and class description information to be verified, and then respectively Class mark being identified and presets by class to be verified to be compared, class description information and target class description information to be verified are compared, Determine whether byte stream to be verified is correct, finally determines whether the unserializing for carrying out class.It is emphasized that this step It is middle to obtain byte stream to be verified and refer to inquiry phase, therefore, the byte stream to be verified got carry class mark to be verified and Class description information to be verified.
Technical solution for a better understanding of the present invention below carries out the serializing of instantiation and class to class into one Step explanation will illustrate how to identify class to be verified in declarative procedure and byte to be verified is written in class description information to be verified Stream.
The instantiation of class refers to the object instance of creation Class Type.The specific implementation process is as follows: obtain the construction letter of class Number, the constructed fuction of class includes function name and parameter.Corresponding class is searched from pre-stored data dictionary according to function name Name.The internal storage structure of class is obtained according to class name, the internal storage structure of class includes method information, and method information includes method name and side Method parameter, method include constructed fuction method and customizing method.Judge whether the use of parameter is correct according to method information, if It is that the instantiation data of class is then generated according to constructed fuction method.According to it is described previously it is found that the instantiation data of class be with OBJEC_T representation, OBJECT_T structure may include class label, attribute 1, attribute 2 ..., attribute n.Wherein, each category The attribute information of property is data value.Using OBJECT_T representation class instantiation data the reason of be: can be by attribute Information taxonomic revision, under the premise of guaranteeing that information is complete, so as to the serializing of subsequent class.It should be noted that the memory of class Structure can also include class label, class name, cryptographic attributes, inherited attribute and attribute information, wherein attribute information may include belonging to Attribute-name, length, precision and the data type of property number and each attribute.Method parameter may include the title of parameter, length Degree and data type.It should also be noted that, the internal storage structure of class is in the database for the first time using (such as appearance when a class In SQL statement or PLSQL), it generates in the following way: according to class name, the institute of corresponding class is loaded from data dictionary There is information, generates the internal storage structure of class.The internal storage structure of usual class is with NDCT_CLS_T representation.Correspondingly, NDCT_CLS_ T structure also includes content included by internal storage structure described above.The wound of class label, class name and class is stored in data dictionary Sentence is built, above content is that class is saved in data dictionary when being created, specific: the creation sentence of class to be obtained, to class Creation sentence parsed to obtain class name.Set class label corresponding with class name.By class label, the creation sentence of class name and class It saves into data dictionary.
It should be noted that when creating table in the database description information can be created to each column in table.For object Column, building table statement by parsing can judge whether when the type in forefront be database basic data type, if when forefront Type is not database basic data type, then will build the class name of the class stored in the type name in table statement and data dictionary into Row matching, successful match illustrate that this is classified as object column, according to such class name, such category are obtained from data dictionary information Note.
According to aforementioned it is found that including attribute information in NDCT_CLS_T structure, attribute information may include attribute number And attribute-name, length, precision and the data type of each attribute, and class description information to be verified includes the first attribute information, Target class description information includes the second attribute information, and based on above-mentioned, the first attribute information and the second attribute information be can come from Attribute number and the attribute-name of each attribute, length and data type in attribute information in NDCT_CLS_T structure, i.e., One attribute information and the second attribute information can come from the attribute information in NDCT_CLS_T structure.In brief, class to be verified The partial information of description information and target class description information can be obtained from NDCT_CLS_T structure.It should be noted that this In the partial information of the class description information to be verified the serializing referred in class can be obtained from NDCT_CLS_T structure In the process, that is, during generating byte stream to be verified, and class description information to be verified and target class description are believed in this process Breath is consistent, at unserializing process (i.e. query process), byte stream Portable belt to be verified class description information to be verified, this When class description information to be verified and target class description information may be consistent, it is also possible to it is inconsistent.Illustratively, as shown in table 1, it gives The attribute information in NDCT_CLS_T structure is gone out, wherein data type supplemental information part will be according to the actual situation by 2 He of table Content in table 3 replaces.Wherein, table 2 shows that common Class Type, table 3 show collection Class Type, such as concordance list, embedding Cover table or VARRAY.Wherein, the element for collecting Class Type may be common Class Type, and the attribute of common Class Type is also likely to be to receive Collect Class Type.
Table 1
The data type of class Data type supplemental information
2BYTE It is elongated
Table 2
Table 3
Collect class mark Collect class subtype Fixed length Element type description
1BYTE 2BYTE 4BYTE It is elongated
The attribute and element of common Class Type and collection Class Type can be such as Types Below: the record type shown in table 4, table The basic data type shown in the elongated array type and table 7 shown in fixed length array type, table 6 shown in 5, wherein need Bright, the element for collecting Class Type cannot be array type (fixed length set type and elongated set type).
Table 4
Table 5
Subtype name Element number Element type description
2BYTE 4BYTE It is elongated
Table 6
Subtype name Element type description
2BYTE It is elongated
Table 7
Type name Length Precision
2BYTE 2BYTE 2BYTE
Since NDCT_CLS_T structure describes the static information of class, now need to protect the information of NDCT_CLS_T structure It deposits into pre-stored interim table, interim table is the logical description of class, and interim table and NDCT_CLS_T structure are for module What the needs of division were established.Due to by the information preservation of NDCT_CLS_T structure into interim table, will also be deposited in interim table The information for storing up NDCT_CLS_T structure, such as class label and attribute information, in addition, also by store in class description information to be verified the The second length information in one length information and target class description information, and the attribute information in NDCT_CLS_T structure is to school It the source for testing the second attribute information in the first attribute information and target class description information in class description information can be with based on above-mentioned Being interpreted as interim table is the second attribute information in the first attribute information and target class description information in class description information to be verified Source.From the perspective of from another angle, is then the first attribute information being stored in interim table in class description information to be verified and target class The second attribute information in description information.Based on above-mentioned, interim table is stored with class description information and target class description letter to be verified Breath.It should be noted that interim table described here, which is stored with class description information to be verified, refers to that the serialization process of class (is deposited Storage process), that is, byte stream process to be verified is generated, class description information to be verified is with target class description information in this process It is consistent.At unserializing process (i.e. query process), byte stream Portable belt to be verified class description information to be verified, target class Description information is still obtained from interim table, and class description information to be verified and target class description information may be consistent at this time, can also It can be inconsistent.Interim table is created before the instantiation of class, and later, the instantiation for carrying out class every time is required using this temporarily Table.In view of in the buffer, a class once it is determined that, then the attribute information of its class also determines that, due to storing in interim table There is such attribute information, in the case where the attribute information of class determines, the length information of attribute information is also determined that.By It is stored with the length information of such attribute information in interim table, therefore, can be used as in class description information to be verified The source of second length information in the source and target class description information of the first length information, but its not necessarily with class to be verified The first length information in description information is consistent, and always keeps one with the second length information in target class description information It causes.Since interim table can be used as the source of class description information to be verified, therefore, it is not necessary to all be calculated in conversion every time to be verified Class description information, and then improve efficiency.It should be noted that interim table usually uses NCLS_T representation.By NDCT_ When the information preservation of CLS_T structure is into NCLS_T structure, need to add following two fields: ULINT in NCLS_T structure TYPE_DESC_LEN and BYTE*TYPE_DESC.Wherein, the length of field ULINT TYPE_DESC_LEN attribute information storage Information, i.e., the second length information in the first length information and target class description information in class description information to be verified can root It is obtained according to the field.Field BYTE*TYPE_DESC is stored with attribute information in NDCT_CLS_T structure, i.e., class description to be verified The second attribute information in the first attribute information and target class description information in information can be obtained according to the field.It is exemplary , as field BYTE*TYPE_DESC is stored with data type supplemental information as shown in Table 1 part.
Illustrate the serialization process of class below, it should be noted that in the serialization process of class, in order to realize subsequent school It tests, it is also desirable to which byte stream to be verified is written into the class description information to be verified stored in interim table.On this basis, the sequence of class Change the specific implementation process is as follows: in memory distribute ephemeral data storage table.According to preset format, class internal storage structure and in advance The instantiation data of class is converted to corresponding byte stream to be verified by the interim table of storage.Byte stream to be verified is stored in object In table.As shown in table 8, the form schematic diagram of byte stream to be verified is given.Wherein, class mark indicates class mark to be verified, Class formation describes length i.e. and indicates the first length information in class description information to be verified, and class formation description indicates class to be verified The first attribute information in description information.
Table 8
Illustratively, as shown in Table 9 and Table 10, the attribute information in the class description information of class CLS1 and class is set forth Attribute information in the class description information of CLS2.Wherein, class CLS1:CREATE CLASS CLS1 AS A INT;B INT; END;Class CLS2:CREATE CLASS CLS2 AS C1 CLS1;C2 VARCHAR(20);END;
Table 9
Table 10
Since class CLS2 is nested class, the attribute in class CLS2 in all class description informations had both been had recorded in table 10 Information, and have recorded the category in the class description information of the attribute information and common property C2 in the class description information of its attribute CLS1 Property information.
According to the explanation of the serialization process of instantiation process and class to class it will be appreciated that, byte stream to be verified Including class to be verified mark and class description information reason for it to be verified.
It should be noted that is indicated due to byte stream to be verified is object column data in Object table, the column of object column Type is class name, and class name indicates the data type of object column.Therefore, obtaining byte stream to be verified can specifically include: obtain Inquiry request, inquiry request include the column type i.e. class name of table.Byte stream to be verified is obtained according to class name.
Optionally, based on the above technical solution, class description information to be verified is interim table according to the pre-stored data In class description information generate.
In an embodiment of the present invention, according to step 110 it is found that be stored with the attribute information of class in interim table, Class of the class description information to be verified in pre-stored interim table in the serialization process of class, in byte stream to be verified Attribute information.The attribute information of class described here is class description information.Correspondingly, to be verified in byte stream to be verified Class description information of the class description information in pre-stored interim table.
It should be noted that since class description information to be verified is the class description information in interim table according to the pre-stored data It generates, it is therefore not necessary in each verification all according to byte stream calculation to be verified class description information to be verified, correspondingly, Checking time is just saved, verification efficiency is improved.
Step 120, acquisition and the associated class of byte stream to be verified mark, and obtain corresponding target class description according to class label Information.
In embodiments of the present invention, it is found that in order to determine whether byte stream to be verified is correct, also according to step 110 Need to obtain target class description information, in order to which whether determination class description information to be verified is modified.Due to byte stream to be verified It can obtain in the following way: obtain inquiry request, inquiry request includes the column type i.e. class name of table.According to class name obtain to Check word throttling.Therefore, correspondingly, obtaining with the associated class label of byte stream to be verified it is to be understood that being obtained according to class name Class label.The purpose for obtaining class label is: it is found that target class description information can be from interim table according to step 110 It obtains, and is stored with class label in interim table, based on the foregoing, it is desirable to determine that corresponding class marks according to class name, further according to category Note obtains corresponding target class description information from interim table.In addition, it is found that object column in Object table according to step 110 Class name be stored in data dictionary, while class corresponding with class name label be also stored in data dictionary.Therefore, it is deposited from advance Class label corresponding with class name is obtained in the data dictionary of storage, is obtained from pre-stored interim table according to class label corresponding Target class description information.
Optionally, based on the above technical solution, it obtains and is marked with the associated class of byte stream to be tested, according to category Note obtains corresponding target class description information and can specifically include: obtaining and byte to be tested from pre-stored data dictionary Flow associated class label.Corresponding target class description information is obtained from pre-stored interim table according to class label.
In an embodiment of the present invention, since target class description information needs to obtain from interim table, interim table is stored with Class label, byte stream to be verified obtain by searching for class name mode, and class name and class label have one-to-one relationship, and class marks It is stored in data dictionary simultaneously with class name.Therefore, the relationship that can be marked based on class name and class obtains target class description letter Breath.It is specifically as follows: obtains from pre-stored data dictionary and marked with the associated class of byte stream to be verified, i.e., deposited from advance It obtains in the data dictionary of storage and is marked with the associated class of class name.It is obtained from pre-stored interim table according to class label corresponding Target class description information.
Step 130, when class to be verified mark is default class mark, class description information more to be verified and target class describe Whether information is consistent.
In an embodiment of the present invention, the data type in database may include common data type, common BLOB class Type and OBJ_BLOB type.Meanwhile it setting class mark and being used to flag data type.Illustratively, as by common data type Class mark is set as 0, and the class mark that the class mark of common BLOB type is set as 1, OBJ_BLOB type is set as 2.Default class Mark be used as determining one of whether correct standard of byte stream to be verified, and according to step 110 it is found that if After the serializing of class, the class to be verified mark for not treating check word throttling is modified, then class mark to be verified should be OBJ_BLOB type corresponding class mark, based on above-mentioned, default class mark refers to that the corresponding class mark of OBJ_BLOB type is Default class mark.Illustratively, as default class is identified as 2.
Class mark more to be verified identifies whether unanimously with default class, if class to be verified mark and default class mark one It causes, then whether class description information more to be verified and target class description information are consistent.If class mark to be verified and default category Know inconsistent, it can be said that bright after the serializing of class, the class to be verified mark of byte stream to be verified is modified, class to be verified There is transcription error in byte stream, can not carry out the unserializing of class again.
Step 140, when class description information to be verified is consistent with target class description information, determine byte stream to be verified conversion Correctly.
In an embodiment of the present invention, target class description information is used as determining whether byte stream to be verified is correct One of standard, if class description information to be verified is consistent with target class description information, due to have determined that class mark to be verified and Default class mark is consistent, it can be said that bright after the serializing of class, class mark to be verified and class description information to be verified not by Modification determines that byte stream conversion to be verified is correct, and then can carry out the unserializing of class.
It is identified whether unanimously by comparing class to be verified mark with default class, if class to be verified mark is identified with default class Unanimously, then further whether class description information more to be verified and target class description information are consistent, if class to be verified description letter Breath is consistent with target class description information, then can determine that byte stream conversion to be verified is correct.In other words, byte stream to be verified needs Meeting class mark to be verified, class description information consistent and to be verified is two consistent with target class description information with default class mark Condition.
Optionally, based on the above technical solution, class description information to be verified can specifically include the first length letter Breath and the first attribute information;Target class description information can specifically include the second length information and the second attribute information.
When class to be verified mark is default class mark, whether class description information more to be verified and target class description information Unanimously, it can specifically include: when class to be verified mark is default class mark, comparing the first length information and the second length information It is whether consistent.When the first length information is consistent with the second length information, comparing the first attribute information and the second attribute information is It is no consistent.When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct, specifically It may include: to determine that byte stream conversion to be verified is correct when the first attribute information is consistent with the second attribute information.
In an embodiment of the present invention, class description information to be verified can specifically include the first length information and the first attribute Information.Target class description information can specifically include the second length information and the second attribute information, wherein the first length information table What is shown is the length of the first attribute information, and what the second length information indicated is the length of the second attribute.
If class to be verified mark is default class mark, compare the first length information and the second length information whether one It causes, whether when the first length information is consistent with the second length information, it is consistent with the second attribute information to compare the first attribute information, When the first attribute information is consistent with the second attribute information, it can be said that bright byte stream conversion to be verified is correct.
Optionally, based on the above technical solution, more to be verified when class to be verified mark is default class mark It specifically can also include: when the first length information and the second length after whether class description information and target class description information are consistent When degree information is inconsistent, byte stream transcription error to be verified is determined.
In an embodiment of the present invention, if class to be verified mark is consistent with default class mark, compare the first length letter Whether breath is consistent with the second length information, when the first length information and inconsistent the second length information, it can be said that bright in class Serializing after, the definition of class is modified, i.e., target class description information is modified, byte stream transcription error to be verified.
The technical solution of the present embodiment, by obtaining byte stream to be verified, byte stream to be verified includes class mark to be verified It with class description information to be verified, obtains and is marked with the associated class of byte stream to be verified, corresponding target class is obtained according to class label Description information, when class to be verified mark is default class mark, class description information more to be verified is with target class description information It is no consistent, when class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.It realizes Class mark to be verified and class description information to be verified are calculated all in accordance with class to be verified mark when without verification every time, to save Time, improve verification efficiency.
Optionally, based on the above technical solution, this method specifically can also include: when class to be verified mark is not When default class mark, byte stream transcription error to be verified is determined.
In an embodiment of the present invention, if class to be verified mark is not default class mark, it can be said that the bright sequence in class After columnization, class mark to be verified is modified, byte stream transcription error to be verified, it is not possible to carry out the unserializing of class again.
It should be noted that the first attribute information can specifically include the attribute-name of attribute number and each attribute, length Degree and data type, the second attribute information specifically also may include the attribute-name of attribute number and each attribute, length sum number According to type.When the first length information is consistent with the second length information, whether compare the first attribute information and the second attribute information Unanimously, it can specifically include: when the first length information is consistent with the second length information, comparing the first attribute according to preset order Attribute number in information and the attribute number in the second attribute information, in the first attribute information each attribute attribute-name, length Whether degree and data type and attribute-name, length and the data type of each attribute corresponding in the second attribute information are consistent.Such as Fruit one of them content is inconsistent, then can determine byte stream transcription error to be verified.Illustratively, as in the first attribute information Attribute number be 3, the attribute number in the second attribute information is 2, due to the attribute number and second in the first attribute information Attribute number in attribute information is inconsistent, accordingly, it is determined that byte stream transcription error to be verified.
It should also be noted that, using the verification mode of byte stream to be verified provided by the embodiment of the present invention, Ke Yibao Demonstrate,prove fault-tolerance.It is specific: since Object table is in importing, export and reproduction process, using the processing side of logic level Formula, accordingly, it is possible to will appear following situation: the class formation of source table and the class formation of object table are although identical, but in two tables Value it is different.It thus will appear list notation in the OBJ_BLOB data of list notation and object table in the OBJ_BLOB data of source table Inconsistent situation.But in this case, it should be recognized that the correctness of data allows its operation, so not by table mark It is denoted as check value.Wherein, source table and object table can be understood as follows, the data of A table will imported into B table, then A here Table is exactly source table, and B table is exactly object table.
Separately it should be noted that the technical solution of the embodiment of the present invention is applied to server, it specifically can be used for interface and tie up Determine in parametric procedure.
Embodiment two
Fig. 2 is the flow chart of the data verification method of object type in a kind of database provided by Embodiment 2 of the present invention, The present embodiment was applicable to the case where object type verifies in database, and this method can be by object type in database Data calibration device execute, which can be realized by the way of software and/or hardware, which can be configured at clothes It is engaged in device, such as computer etc..As shown in Fig. 2, this method specifically comprises the following steps:
Step 210 obtains byte stream to be verified, and byte stream to be verified includes class mark to be verified and class to be verified description letter Breath, class description information to be verified is that the class description information in interim table according to the pre-stored data generates, class description letter to be verified Breath includes the first length information and the second length information.
Step 220 obtains and the associated class label of byte stream to be verified from pre-stored data dictionary.
Step 230 obtains corresponding target class description information according to class label from pre-stored interim table.
Step 240, to judge that class to be verified identifies whether be default class mark;If so, thening follow the steps 250;If it is not, then holding Row step 260.
Whether step 250, to compare the first length information consistent with the second length information;If so, thening follow the steps 270;If It is no, then follow the steps 260.
Step 260 determines byte stream transcription error to be verified.
Whether step 270, to compare the first attribute information consistent with the second attribute information;If so, thening follow the steps 280;If It is no, then return to step 260.
Step 280 determines that byte stream conversion to be verified is correct.
In an embodiment of the present invention, step 210- step 280 can be used and illustrate as follows:
CREATE OR REPLACE CLASS MYCLS
AS
IDINT;-- member variable
NUMINT;-- member variable, NUM are INT type
FUNCTION MYCLS(ID INT,NUM INT)RETURN MYCLS;-- the customized constructed fuction of user
FUNCTION F1()RETURN INT;
END;
/
CREATE OR REPLACE CLASS BODY MYCLS
AS
FUNCTION MYCLS(ID INT,NUM INT)RETURN MYCLS
AS
BEGIN
THIS.ID=ID;-- THIS. can be used to access the member of itself
THIS.NUM=NUM;
RETURN THIS;-- this object is returned using RETURN THIS
END;
FUNCTION F1()RETURN INT
AS
BEGIN
RETURN THIS.ID+THIS.NUM;
END;
END;
/
DROP TABLE TESTCLS;
CREATE TABLE TESTCLS(C1MYCLS);
INSERT INTO TESTCLS VALUES(MYCLS(1,2));
SELECT C1.NUM FROM TESTCLS;
Line number C1.NUM
---------------------
1 2
UPDATETESTCLS SET C1=MYCLS (1,200);
Influence line number 1
-- the definition of class changes, and verifies unsuccessful
CREATE OR REPLACE CLASS MYCLS
AS
IDINT;-- member variable
NUM VARCHAR;-- member variable, NUM become VARCHAR type
FUNCTION MYCLS(ID INT,NUM INT)RETURN MYCLS;-- the customized constructed fuction of user FUNCTION F1()RETURN INT;
END;
/
UPDATE TESTCLS SET C1=MYCLS (1,200);
Report an error: data type mismatches.
-- the definition of class changes, and verifies successfully
CREATE OR REPLACE CLASS MYCLS
AS
IDINT;-- member variable
AGEINT;-- member variable attribute-name changes, but becomes INT type again again
FUNCTION MYCLS(ID INT,NUM INT)RETURN MYCLS;-- the customized constructed fuction of user
FUNCTION F1()RETURN INT;
END;
/
UPDATE TESTCLS SET C1=MYCLS (1,300);
Influence line number 1
SELECT C1.NUM FROM TESTCLS;
Line number C1.AGE
---------------------
1 300
The technical solution of the present embodiment, by obtaining byte stream to be verified, byte stream to be verified includes class mark to be verified It with class description information to be verified, obtains and is marked with the associated class of byte stream to be verified, corresponding target class is obtained according to class label Description information, when class to be verified mark is default class mark, class description information more to be verified is with target class description information It is no consistent, when class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.It realizes All in accordance with byte stream calculation to be verified class mark to be verified and class description information to be verified when without verification every time, to save Time, improve verification efficiency.
Embodiment three
The flow chart of the data verification method of object type in a kind of database that Fig. 3 provides for the embodiment of the present invention three, The present embodiment was applicable to the case where object type verifies in database, and this method can be by object type in database Data calibration device execute, which can be realized by the way of software and/or hardware, which can be configured at visitor In the end of family, such as computer etc..As shown in figure 3, this method specifically comprises the following steps:
Step 310 receives byte stream to be verified and target class description information that server is sent.
Step 320 treats check byte stream and is parsed to obtain class mark to be verified and class description information to be verified.
Step 330, when class to be verified mark is default class mark, class description information more to be verified and target class describe Whether information is consistent.
Step 340, when class description information to be verified is consistent with target class description information, determine byte stream to be verified conversion Correctly.
In embodiments of the present invention, it should be noted that the present embodiment and the difference of embodiment one and embodiment two be, The technical solution of the present embodiment is applied to client.Client is the interface of server connection application program.Client is being handled When byte stream to be verified, it is also desirable to be verified to the correctness for the byte stream to be verified that server is sent.It is to be understood that with When client is inquired, client needs to send inquiry request to server, and inquiry request includes class name, server root at family Obtain byte stream to be verified according to class name, obtain class label from pre-stored data dictionary according to class name, according to class mark from Corresponding target class description information is obtained in pre-stored interim table, server believes byte stream to be verified and target class description Breath is sent to client, and client parses the byte stream to be verified received to obtain class mark to be verified and class to be verified Description information, then judging that class to be verified identifies whether is that default class mark compares when class to be verified mark is default class mark Whether class description information to be verified is consistent with target class description information, when class description information to be verified and target class description information one When cause, determine that byte stream conversion to be verified is correct.It should be noted that client specifically determines whether byte stream to be verified is correct Operating process part corresponding with embodiment one and embodiment two it is consistent, specific detailed in Example one and embodiment two, herein No longer specifically repeat.It should also be noted that, client does not have pre-stored data dictionary and interim table.
The technical solution of the present embodiment, by receiving the byte stream to be verified and target class description information that server is sent, It treats check byte stream to be parsed to obtain class mark to be verified and class description information to be verified, when class to be verified mark is default When class identifies, whether class description information more to be verified and target class description information are consistent, when class description information to be verified and mesh When mark class description information is consistent, determine that byte stream conversion to be verified is correct.All in accordance with to be verified when realizing without verification every time Byte stream calculation class mark to be verified improves verification efficiency to save the time with class description information to be verified.
Optionally, based on the above technical solution, class description information to be verified includes the first length information and first Attribute information;Target class description information includes the second length information and the second attribute information.
When class to be verified mark is default class mark, whether class description information more to be verified and target class description information Unanimously, it can specifically include: when class to be verified mark is default class mark, comparing the first length information and the second length information It is whether consistent.When the first length information is consistent with the second length information, comparing the first attribute information and the second attribute information is It is no consistent.When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct, specifically It may include: to determine that byte stream conversion to be verified is correct when the first attribute information is consistent with the second attribute information.
Optionally, based on the above technical solution, more to be verified when class to be verified mark is default class mark It specifically can also include: when the first length information and the second length after whether class description information and target class description information are consistent When degree information is inconsistent, byte stream transcription error to be verified is determined.
Optionally, based on the above technical solution, this method specifically can also include: when class to be verified mark is not When default class mark, byte stream transcription error to be verified is determined.
Optionally, based on the above technical solution, target class description information is server from pre-stored data It obtains in dictionary and is marked with the associated class of byte stream to be verified.It is obtained and is generated from pre-stored interim table according to class label 's.
Optionally, based on the above technical solution, class description information to be verified is that server is according to the pre-stored data What the class description information in interim table generated.
Example IV
The flow chart of the data verification method of object type in a kind of database that Fig. 4 provides for the embodiment of the present invention four, The present embodiment was applicable to the case where object type verifies in database, and this method can be by object type in database Data calibration device execute, which can be realized by the way of software and/or hardware, which can be configured at visitor In the end of family, such as computer etc..As shown in figure 4, this method specifically comprises the following steps:
Step 410, the byte stream to be verified for receiving server transmission and target class description information, target class description information are Server is obtained from pre-stored data dictionary to be marked with the associated class of byte stream to be verified, is marked according to class from advance and is deposited Corresponding target class description information is obtained in the interim table of storage, target class description information includes the second length information and the second attribute Information.
Step 420 treats check byte stream and is parsed to obtain class mark to be verified and class description information to be verified, to school Testing class description information is that the class description information in server interim table according to the pre-stored data generates, class description information to be verified Including the first length information and the first attribute information.
Step 430 judges that class mark to be verified identifies whether unanimously with default class;If so, thening follow the steps 440;If it is not, Then follow the steps 450.
Whether step 440, to compare the first length information consistent with the second length information;If so, thening follow the steps 460;If It is no, then follow the steps 450.
Step 450 determines byte stream transcription error to be verified.
Whether step 460, to compare the first attribute information consistent with the second attribute information;If so, thening follow the steps 470;If It is no, then return to step 450.
Step 470 determines that byte stream conversion to be verified is correct.
The technical solution of the present embodiment, by receiving the byte stream to be verified and target class description information that server is sent, It treats check byte stream to be parsed to obtain class mark to be verified and class description information to be verified, when class to be verified mark is default When class identifies, whether class description information more to be verified and target class description information are consistent, when class description information to be verified and mesh When mark class description information is consistent, determine that byte stream conversion to be verified is correct.All in accordance with to be verified when realizing without verification every time Byte stream calculation class mark to be verified improves verification efficiency to save the time with class description information to be verified.
Embodiment five
The structural representation of the data calibration device of object type in a kind of data that Fig. 5 provides for the embodiment of the present invention five Figure, the present embodiment is applicable to the case where object type verifies in database, which can be using software and/or hard The mode of part realizes that the device can be configured in server, such as typically computer etc..As shown in figure 5, the device has Body includes:
Byte stream to be verified obtains module 510, and for obtaining byte stream to be verified, byte stream to be verified includes class to be verified Mark and class description information to be verified;
Target class description information obtains module 520, marks for obtaining with the associated class of byte stream to be verified, according to category Note obtains corresponding target class description information;
Class description information comparison module 530, for when class to be verified mark is default class mark, class more to be verified to be retouched It is whether consistent with target class description information to state information;
Byte stream conversion to be verified is appropriately determined module 540, for believing when class description information to be verified and target class description When ceasing consistent, determine that byte stream conversion to be verified is correct.
The technical solution of the present embodiment, by obtaining byte stream to be verified, byte stream to be verified includes class mark to be verified It with class description information to be verified, obtains and is marked with the associated class of byte stream to be verified, obtain corresponding target further according to class label Class description information, when class to be verified mark is default class mark, class description information more to be verified and target class description information It is whether consistent, when class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.It is real All in accordance with byte stream calculation to be verified class mark to be verified and class description information to be verified when having showed without verification every time, to save The time has been saved, verification efficiency is improved.
Optionally, based on the above technical solution, class description information to be verified can specifically include the first length letter Breath and the first attribute information;Target class description information can specifically include the second length information and the second attribute information;
Class description information comparison module 530, can specifically include:
Length information comparing unit, for when class to be verified mark is default class mark, compare the first length information with Whether the second length information is consistent;
Attribute information comparing unit, for comparing the first attribute when the first length information is consistent with the second length information Whether information is consistent with the second attribute information;
Byte stream conversion to be verified is appropriately determined module 540, can specifically include:
Byte stream conversion to be verified is appropriately determined unit, is used for when the first attribute information is consistent with the second attribute information, Determine that byte stream conversion to be verified is correct.
Optionally, based on the above technical solution, class description information comparison module 530 specifically can also include:
Byte stream transcription error judging unit to be verified, it is inconsistent for working as the first length information and the second length information When, determine byte stream transcription error to be verified.
Optionally, based on the above technical solution, which specifically can also include:
Byte stream transcription error determination module to be verified, for determining when class to be verified mark is not default class mark Byte stream transcription error to be verified.
Optionally, based on the above technical solution, target class description information obtains module 520, can specifically include:
Class marks acquiring unit, for obtaining and the associated category of byte stream to be verified from pre-stored data dictionary Note;
Target class description information acquiring unit, for obtaining corresponding mesh from pre-stored interim table according to class label Mark class description information.
Optionally, based on the above technical solution, class description information to be verified is interim table according to the pre-stored data In class description information generate.
The data calibration device that object type in the database of equipment is configured at provided by the embodiment of the present invention is executable The data verification method of object type, has the side of execution in database provided by any embodiment of the invention applied to equipment The corresponding functional module of method and beneficial effect.
Embodiment six
The structural representation of the data calibration device of object type in a kind of data that Fig. 6 provides for the embodiment of the present invention six Figure, the present embodiment is applicable to the case where object type verifies in database, which can be using software and/or hard The mode of part realizes that the device can be configured in client, such as typically computer etc..As shown in fig. 6, the device has Body includes:
Information receiving module 610, for receiving the byte stream to be verified and target class description information of server transmission;
Byte stream parsing module 620 to be verified, for treat check byte stream parsed to obtain class mark to be verified and Class description information to be verified;
Class description information comparison module 630, for when class to be verified mark is default class mark, class more to be verified to be retouched It is whether consistent with target class description information to state information;
Byte stream conversion to be verified is appropriately determined module 640, for believing when class description information to be verified and target class description When ceasing consistent, determine that byte stream conversion to be verified is correct.
The technical solution of the present embodiment, by receiving the byte stream to be verified and target class description information that server is sent, It treats check byte stream to be parsed to obtain class mark to be verified and class description information to be verified, when class to be verified mark is default When class identifies, whether class description information more to be verified and target class description information are consistent, when class description information to be verified and mesh When mark class description information is consistent, determine that byte stream conversion to be verified is correct.All in accordance with to be verified when realizing without verification every time Byte stream calculation class mark to be verified improves verification efficiency to save the time with class description information to be verified.
It can continue, based on the above technical solution, class description information to be verified can specifically include the first length letter Breath and the first attribute information;Target class description information can specifically include the second length information and the second attribute information;
Class description information comparison module 630, can specifically include:
Length information comparing unit, for when class to be verified mark is default class mark, compare the first length information with Whether the second length information is consistent;
Attribute information comparing unit, for comparing the first attribute when the first length information is consistent with the second length information Whether information is consistent with the second attribute information;
Byte stream conversion to be verified is appropriately determined module 640, can specifically include:
Byte stream conversion to be verified is appropriately determined unit, is used for when the first attribute information is consistent with the second attribute information, Determine that byte stream conversion to be verified is correct.
Optionally, based on the above technical solution, class description information comparison module 630 specifically can also include:
Byte stream transcription error judging unit to be verified, it is inconsistent for working as the first length information and the second length information When, determine byte stream transcription error to be verified.
Optionally, based on the above technical solution, which specifically can also include:
Byte stream transcription error determination module to be verified, for determining when class to be verified mark is not default class mark Byte stream transcription error to be verified.
Optionally, based on the above technical solution, target class description information is server from pre-stored data It obtains in dictionary and is marked with the associated class of byte stream to be verified.It is obtained and is generated from pre-stored interim table according to class label 's.
Optionally, based on the above technical solution, class description information to be verified is that server is according to the pre-stored data What the class description information in interim table generated.
The data calibration device that object type in the database of equipment is configured at provided by the embodiment of the present invention is executable The data verification method of object type, has the side of execution in database provided by any embodiment of the invention applied to equipment The corresponding functional module of method and beneficial effect.
Embodiment seven
Fig. 7 is a kind of structural schematic diagram for equipment that the embodiment of the present invention seven provides.Fig. 7, which is shown, to be suitable for being used to realizing this The block diagram of the example devices 712 of invention embodiment.The equipment 712 that Fig. 7 is shown is only an example, should not be to the present invention The function and use scope of embodiment bring any restrictions.
As shown in fig. 7, equipment 712 is showed in the form of universal computing device.The component of equipment 712 may include but unlimited In one or more processor 716, system storage 728, it is connected to different system components (including system storage 728 He Processor 716) bus 718.
Bus 718 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Equipment 712 typically comprises a variety of computer system readable media.These media can be and any can be moved The usable medium that terminal 712 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 728 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 730 and/or cache memory 732.Equipment 712 may further include other removable/not removable Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 734 can be used for read and write can not Mobile, non-volatile magnetic media (Fig. 7 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 7, Ke Yiti For the disc driver for being read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to moving non-volatile light The CD drive of disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver It can be connected by one or more data media interfaces with bus 718.Memory 728 may include that at least one program produces Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform of the invention each The function of embodiment.
Program/utility 740 with one group of (at least one) program module 742, can store in such as memory In 728, such program module 742 includes but is not limited to operating system, one or more application program, other program modules And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 742 Usually execute the function and/or method in embodiment described in the invention.
Equipment 712 can also be logical with one or more external equipments 714 (such as keyboard, sensing equipment, display 724 etc.) Letter, can also be enabled a user to one or more equipment interact with the equipment 712 communicate, and/or with make the equipment 712 Any equipment (such as network interface card, modem etc.) that can be communicated with one or more of the other calculating equipment communicates.This Kind communication can be carried out by input/output (I/O) interface 722.Also, equipment 712 can also by network adapter 720 with One or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) communication.Such as Shown in figure, network adapter 720 is communicated by bus 718 with other modules of equipment 712.It should be understood that although not showing in Fig. 7 Out, other hardware and/or software module can be used with bonding apparatus 712, including but not limited to: microcode, device driver, superfluous Remaining processing unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processor 716 by the program that is stored in system storage 728 of operation, thereby executing various function application and Data processing, such as realize the data check provided by the embodiment of the present invention applied to object type in the database of server Method, this method comprises:
Byte stream to be verified is obtained, byte stream to be verified includes class mark to be verified and class description information to be verified.
It obtains and is marked with the associated class of byte stream to be verified, corresponding target class description information is obtained according to class label.
When class to be verified mark is default class mark, whether class description information more to be verified and target class description information Unanimously.
When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.
Processor 716 by the program that is stored in system storage 728 of operation, thereby executing various function application and Data processing, such as realize the data check provided by the embodiment of the present invention applied to object type in the database of client Method, this method comprises:
Receive the byte stream to be verified and target class description information that server is sent.
Check byte stream is treated to be parsed to obtain class mark to be verified and class description information to be verified.
When class to be verified mark is default class mark, whether class description information more to be verified and target class description information Unanimously.
When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.
Certainly, it will be understood by those skilled in the art that processor can also realize it is provided by any embodiment of the invention Technical solution applied to the data verification method of object type in server or the database of client.The server or client The content that the hardware configuration and function at end can be found in embodiment seven is explained.
Embodiment eight
The embodiment of the present invention eight additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should It is realized when program is executed by processor as provided by the embodiment of the present invention applied to object type in the database of server Data verification method, this method comprises:
Byte stream to be verified is obtained, byte stream to be verified includes class mark to be verified and class description information to be verified.
It obtains and is marked with the associated class of byte stream to be verified, corresponding target class description information is obtained according to class label.
When class to be verified mark is default class mark, whether class description information more to be verified and target class description information Unanimously.
When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.
The program can also realize the number for being applied to client as provided by the embodiment of the present invention when being executed by processor According to the data verification method of object type in library, this method comprises:
Receive the byte stream to be verified and target class description information that server is sent.
Check byte stream is treated to be parsed to obtain class mark to be verified and class description information to be verified.
When class to be verified mark is default class mark, whether class description information more to be verified and target class description information Unanimously.
When class description information to be verified is consistent with target class description information, determine that byte stream conversion to be verified is correct.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (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.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, also Including conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete Ground executes on the user computer, partly executes on the user computer, executing as an independent software package, partially existing Part executes on the remote computer or executes on a remote computer or server completely on subscriber computer.It is being related to In the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area Net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as using ISP come It is connected by internet).
Certainly, one kind provided by the embodiment of the present invention includes computer readable storage medium, and computer is executable to be referred to The method operation being not limited to the described above is enabled, can also be performed provided by any embodiment of the invention applied to server or visitor Relevant operation in the database at family end in the data verification method of object type.Embodiment can be found in the introduction of storage medium Content in eight is explained.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (11)

1. the data verification method of object type in a kind of database is applied to server characterized by comprising
Byte stream to be verified is obtained, the byte stream to be verified includes class mark to be verified and class description information to be verified;
It obtains and is marked with the associated class of byte stream to be verified, corresponding target class description letter is obtained according to class label Breath;
When the class mark to be verified is default class mark, the class description information to be verified and the target class are described Whether information is consistent;
When the class description information to be verified is consistent with the target class description information, the byte stream conversion to be verified is determined Correctly.
2. the method according to claim 1, wherein the class description information to be verified includes the first length information With the first attribute information;The target class description information includes the second length information and the second attribute information;
It is described when the class to be verified mark is default class mark, the class description information to be verified and the target class Whether description information is consistent, comprising:
When the class mark to be verified is default class mark, first length information is with second length information It is no consistent;
When first length information is consistent with second length information, first attribute information and described second Whether attribute information is consistent;
It is described when the class description information to be verified is consistent with the target class description information, determine the byte stream to be verified Conversion is correct, comprising:
When first attribute information is consistent with second attribute information, determine that the byte stream conversion to be verified is correct.
3. according to the method described in claim 2, it is characterized in that, described when the class mark to be verified is default class mark When, after whether the class description information to be verified and the target class description information are consistent, further includes:
When first length information and second length information are inconsistent, determine that the byte stream conversion to be verified is wrong Accidentally.
4. the method according to claim 1, wherein further include:
When the class mark to be verified is not default class mark, the byte stream transcription error to be verified is determined.
5. the method according to claim 1, wherein the acquisition and the associated category of byte stream to be verified Note obtains corresponding target class description information according to class label, comprising:
It obtains from pre-stored data dictionary and is marked with the associated class of byte stream to be verified;
Corresponding target class description information is obtained from pre-stored interim table according to class label.
6. -5 any method according to claim 1, which is characterized in that the class description information to be verified is according in advance What the class description information in the interim table of storage generated.
7. the data verification method of object type in a kind of database is applied to client characterized by comprising
Receive the byte stream to be verified and target class description information that server is sent;
The byte stream to be verified is parsed to obtain class mark to be verified and class description information to be verified;
When the class mark to be verified is default class mark, the class description information to be verified and the target class are described Whether information is consistent;
When the class description information to be verified is consistent with the target class description information, the byte stream conversion to be verified is determined Correctly.
8. the data calibration device of object type in a kind of database is applied to server characterized by comprising
Byte stream to be verified obtains module, and for obtaining byte stream to be verified, the byte stream to be verified includes category to be verified Know and class description information to be verified;
Target class description information obtains module, marks for obtaining with the associated class of byte stream to be verified, according to the class Label obtains corresponding target class description information;
Class description information comparison module, for when the class to be verified mark is default class mark, the class to be verified Whether description information and the target class description information are consistent;
Byte stream conversion to be verified is appropriately determined module, for believing when the class description information to be verified and target class description When ceasing consistent, determine that the byte stream conversion to be verified is correct.
9. the data calibration device of object type in a kind of database is applied to client characterized by comprising
Information receiving module, for receiving the byte stream to be verified and target class description information of server transmission;
Byte stream parsing module to be verified obtains class mark to be verified and to school for being parsed to the byte stream to be verified Test class description information;
Class description information comparison module, for when the class to be verified mark is default class mark, the class to be verified Whether description information and the target class description information are consistent;
Byte stream conversion to be verified is appropriately determined module, for believing when the class description information to be verified and target class description When ceasing consistent, determine that the byte stream conversion to be verified is correct.
10. a kind of equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Existing method as claimed in claim 1.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Method as claimed in claim 1 is realized when execution.
CN201810922360.5A 2018-08-14 2018-08-14 Data verification method, device, equipment and medium for object types in database Active CN109165209B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810922360.5A CN109165209B (en) 2018-08-14 2018-08-14 Data verification method, device, equipment and medium for object types in database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810922360.5A CN109165209B (en) 2018-08-14 2018-08-14 Data verification method, device, equipment and medium for object types in database

Publications (2)

Publication Number Publication Date
CN109165209A true CN109165209A (en) 2019-01-08
CN109165209B CN109165209B (en) 2021-06-08

Family

ID=64895566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810922360.5A Active CN109165209B (en) 2018-08-14 2018-08-14 Data verification method, device, equipment and medium for object types in database

Country Status (1)

Country Link
CN (1) CN109165209B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306495A (en) * 2020-10-29 2021-02-02 完美世界(北京)软件科技发展有限公司 Picture verification method and device, computer equipment and computer-readable storage medium
CN112783581A (en) * 2021-01-21 2021-05-11 上海哔哩哔哩科技有限公司 Data processing method and device
CN113076326A (en) * 2021-03-25 2021-07-06 上海达梦数据库有限公司 Large-field data processing method, device, equipment and storage medium
CN114510267A (en) * 2022-04-20 2022-05-17 麒麟软件有限公司 Program ABI interface compatibility calculation method based on Linux system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697826B1 (en) * 1996-03-20 2004-02-24 International Business Machines Corporation Information-handling system, method, and article of manufacture including and object search mechanism that provides constraint-based filtering in a distributed object system
CN107341262A (en) * 2017-07-14 2017-11-10 上海达梦数据库有限公司 The serializing of object type row, unserializing method and device in database
CN108256074A (en) * 2018-01-17 2018-07-06 链家网(北京)科技有限公司 Method, apparatus, electronic equipment and the storage medium of checking treatment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6697826B1 (en) * 1996-03-20 2004-02-24 International Business Machines Corporation Information-handling system, method, and article of manufacture including and object search mechanism that provides constraint-based filtering in a distributed object system
CN107341262A (en) * 2017-07-14 2017-11-10 上海达梦数据库有限公司 The serializing of object type row, unserializing method and device in database
CN108256074A (en) * 2018-01-17 2018-07-06 链家网(北京)科技有限公司 Method, apparatus, electronic equipment and the storage medium of checking treatment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306495A (en) * 2020-10-29 2021-02-02 完美世界(北京)软件科技发展有限公司 Picture verification method and device, computer equipment and computer-readable storage medium
CN112783581A (en) * 2021-01-21 2021-05-11 上海哔哩哔哩科技有限公司 Data processing method and device
CN113076326A (en) * 2021-03-25 2021-07-06 上海达梦数据库有限公司 Large-field data processing method, device, equipment and storage medium
CN114510267A (en) * 2022-04-20 2022-05-17 麒麟软件有限公司 Program ABI interface compatibility calculation method based on Linux system
CN114510267B (en) * 2022-04-20 2023-03-21 麒麟软件有限公司 Program ABI interface compatibility calculation method based on Linux system

Also Published As

Publication number Publication date
CN109165209B (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN109165209A (en) The data verification method, device of object type, equipment and medium in database
RU2430409C2 (en) Method of measuring coverage in interconnection structural condition
CN104765745B (en) Loading data in database are carried out with the method and system of logic checking
US20110106776A1 (en) Incremental implementation of undo/redo support in legacy applications
CN110347598B (en) Test script generation method and device, server and storage medium
US8347052B2 (en) Initializing of a memory area
CN110191021A (en) A kind of protocol testing method, device, electronic equipment and storage medium
CN109522228A (en) Interface automatic test data configuration method, apparatus, platform and storage medium
CN109656986A (en) A kind of householder method that business datum summarizes, device and electronic equipment
CN110347709A (en) A kind of construction method and system of regulation engine
CN104965781A (en) Method and apparatus for generating test case
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN114090671A (en) Data import method and device, electronic equipment and storage medium
US20070169020A1 (en) Method to find a violation of a coding rule in program
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
CN111126422B (en) Method, device, equipment and medium for establishing industry model and determining industry
KR100650866B1 (en) Qualifying system and method for logic cell library
CN109903754B (en) Method, device and memory device for speech recognition
CN109726370A (en) A kind of configurable verification rule packaging method and device
US20220391663A1 (en) Defect location method and device based on coverage information
CN115328786A (en) Automatic testing method and device based on block chain and storage medium
CN111026371B (en) Game development method and device, electronic equipment and storage medium
US20220100640A1 (en) Generating test input values for functional components based on test coverage analysis
CN111080209A (en) BOM verification method, system, device and storage medium
AU2019222794A1 (en) Method and system for testing and validation of cryptographic algorithms

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