CN106484892A - Data manipulation method and device - Google Patents

Data manipulation method and device Download PDF

Info

Publication number
CN106484892A
CN106484892A CN201610909326.5A CN201610909326A CN106484892A CN 106484892 A CN106484892 A CN 106484892A CN 201610909326 A CN201610909326 A CN 201610909326A CN 106484892 A CN106484892 A CN 106484892A
Authority
CN
China
Prior art keywords
data
operated
target matrix
destination object
attribute information
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.)
Pending
Application number
CN201610909326.5A
Other languages
Chinese (zh)
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.)
Lingyun Tianbo Photoelectric Technology Co Ltd
Original Assignee
Lingyun Tianbo Photoelectric Technology 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 Lingyun Tianbo Photoelectric Technology Co Ltd filed Critical Lingyun Tianbo Photoelectric Technology Co Ltd
Priority to CN201610909326.5A priority Critical patent/CN106484892A/en
Publication of CN106484892A publication Critical patent/CN106484892A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention includes with regard to a kind of data manipulation method, methods described:When receiving the operational order of user input, according to the corresponding data genaration destination object to be operated of described operational order, wherein, described destination object is obtained based on predefined target class;Read the corresponding class name of described destination object;The target matrix matching with described class name is searched from data base;When finding described target matrix, operation is executed according to described operational order to described data to be operated based on described target matrix.The embodiment of the present invention additionally provides a kind of data operation device.The technical scheme of the embodiment of the present invention, operation server is after receiving operational order, automatically target matrix can be searched from data base, and treat peration data and automatically execute corresponding operating, so as to realize the automatization of data manipulation, ease for use can not only be improved, and can either generally be suitable for, the operating experience of user can be improved again.

Description

Data manipulation method and device
Technical field
The present embodiments relate to technical field of data processing, in particular, it is related to a kind of data manipulation method and dress Put.
Background technology
Data base is " warehouse " according to certain logical structure tissue, storage and entity object related data.Number Multiple tables of data can be included according to storehouse, wherein, each tables of data is correspondingly arranged on table name and row name.For example, refer to table 1, Table 1 is the exemplary plot of tables of data provided in an embodiment of the present invention, and in the present embodiment, the table name of tables of data is " a high achievement ", bag Include student number, name and fraction three column data, this tables of data correspondence is stored in data base's " senior middle school's achievement ".
Table 1
A high achievement
Student number Name Fraction
001 A 590.7
002 B 600.5
003 C 640
Wherein, data base as storage " warehouse ", data therein freely can be operated by user, for example, carries out data The routine operations such as interpolation, data deletion, the lookup of data modification data.In correlation technique, when user operates to data, first First need to know the table name of tables of data to be operated and row name, then, the table name based on tables of data and row star's item to be operated handss Dynamic be written as SQL ((Structured Query Language, SQL) sentence, and then, by SQL statement pair Tables of data executes corresponding operating.
As can be seen here, table name and the row name of tables of data during data base being operated using correlation technique, are checked, And editor's SQL statement is required to user's manual operation, lead to the waste of human resourcess, additionally, SQL statement is as professional degree Higher program language, needing user to possess certain professional standards can use, and therefore, cause the operation side of correlation technique Not only ease for use is poor for method, nor is easy to promote.
Content of the invention
Embodiments provide a kind of data manipulation method and device, can solve the problem that correlation technique ease for use is poor, wave Expense human resourcess and the problem being not easy to promote.
In a first aspect, embodiments providing a kind of data manipulation method, the method includes:
When receiving the operational order of user input, according to the corresponding data genaration target to be operated of described operational order Object, wherein, described destination object is obtained based on predefined target class;
Read the corresponding class name of described destination object;
The target matrix matching with described class name is searched from data base;
When finding described target matrix, wait to grasp to described according to described operational order based on described target matrix Make data and execute operation.
Optionally, when not finding described target matrix, methods described also includes:
Read the attribute information of described destination object;
Determine the corresponding project name of each described attribute information;
Respectively using described project name as target matrix described in row name creation;
Respective column by target matrix described in corresponding for each described attribute information data Cun Chudao to be operated.
Optionally, described operation is executed according to described operational order to described data to be operated based on described target matrix Including:
Travel through the attribute information of the column data of described target matrix;
Detect whether the attribute information of described column data is identical with the respective attributes information of described destination object;
When the attribute information of described column data is differed with the respective attributes information of described destination object, to user's output Announcement information;
When receiving the modification operational order of user input, the attribute information of described column data is revised as described target The respective attributes information of object.
Optionally, when the respective attributes information of attribute information and the described destination object of described column data is all identical, Methods described also includes:
Add blank line after last column of described target matrix;
Read the data to be operated in described destination object;
Respectively described data to be operated is write corresponding with described attribute information position in described blank line.
Optionally, when the respective attributes information of attribute information and the described destination object of described column data is all identical, Methods described also includes:
Read the data to be operated in described destination object;
Described data to be operated is searched in described target matrix;
Corresponding for described data to be operated row data is deleted from described target matrix.
Optionally, when the respective attributes information of attribute information and the described destination object of described column data is all identical, Methods described also includes:
Read the data to be operated in described destination object;
Determine former to be operated data corresponding with described data to be operated in described target matrix;
Replace described former data to be operated using described data to be operated.
Optionally, when the respective attributes information of attribute information and the described destination object of described column data is all identical, Methods described also includes:
Read the data to be operated in described destination object;
Described data to be operated is searched in described target matrix;
The corresponding row data of described data to be operated is read from described target matrix;
Export described row data to user.
Second aspect, embodiments provides a kind of data operation device, and described device includes:
Generation module, for when receiving the operational order of user input, waits to grasp according to described operational order is corresponding Make data genaration destination object, wherein, described destination object is obtained based on predefined target class;
Read module, for reading the corresponding class name of described destination object;
Searching modul, for searching the target matrix matching with described class name from data base;
Performing module, for when finding described target matrix, based on described target matrix according to described operation Instruction executes operation to described data to be operated.
Optionally, described device also includes:Determining module, creation module and memory module, wherein,
Described read module, is additionally operable to read the attribute information of described destination object;
Described determining module, for determining the corresponding project name of each described attribute information;
Described creation module, for respectively using described project name as target matrix described in row name creation;
Described memory module, for by target data described in corresponding for each described attribute information data Cun Chudao to be operated The respective column of table.
Optionally, described performing module includes Traversal Unit, detector unit, output unit and modification operating unit, wherein,
Described Traversal Unit, for traveling through the attribute information of the column data of described target matrix;
Described detector unit, for detecting the attribute information of described column data and the respective attributes information of described destination object Whether identical;
Described output unit, for attribute information and described destination object when described column data respective attributes information not When identical, to user's output notice information;
Described modification operating unit, for when receiving the modification operational order of user input, by described column data Attribute information is revised as the respective attributes information of described destination object.
Optionally, described performing module also includes adding device, reading unit and r/w cell, wherein,
Described adding device, for adding blank line after last column of described target matrix;
Described reading unit, for reading the data to be operated in described destination object;
Described r/w cell is relative with described attribute information in described blank line for writing described data to be operated respectively The position answered.
Optionally, described performing module also includes searching unit and deletes unit, wherein,
Described searching unit, for searching described data to be operated in described target matrix;
Described deletion unit, for deleting corresponding for described data to be operated row data from described target matrix.
Optionally, described performing module also includes determining unit and replacement unit, wherein,
Described determining unit, for determining former to be operated number corresponding with described data to be operated in described target matrix According to;
Described replacement unit, for replacing described former data to be operated using described data to be operated.
Optionally, described performing module also includes output unit, wherein,
Described reading unit, is additionally operable to read the corresponding row data of described data to be operated from described target matrix;
Described output unit, for exporting described row data to user.
Compared with prior art, the technical scheme that the present embodiment provides has advantages below and feature:
In scheme provided in an embodiment of the present invention, in order to solve the problems, such as that correlation technique ease for use is poor, be difficult to promote, this Scheme is provided with operation server, when described operation server receives the operational order of user input, according to described operation Instruct corresponding data genaration destination object to be operated.Wherein, destination object is obtained based on predefined target class.Then, Read the corresponding class name of destination object, and search, from data base, the target matrix matching with class name, thus finding After target matrix, peration data is treated according to operational order based on target matrix and executes operation.As can be seen here, the present invention is real Apply the technical scheme of example, operation server, after receiving operational order, can search target matrix from data base automatically, And treat peration data and automatically execute corresponding operating such that it is able to realize the automatization of data manipulation, can not only improve easy-to-use Property, and can either generally be suitable for, the operating experience of user can be improved again.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to institute in embodiment Need use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only the present invention some enforcement Example, for those of ordinary skill in the art, on the premise of not paying creative work, can also obtain according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 is the method flow diagram of data manipulation method provided in an embodiment of the present invention.
Fig. 2 is the schematic diagram of user interface provided in an embodiment of the present invention.
Fig. 3 is the exemplary plot of class provided in an embodiment of the present invention.
Fig. 4 is the exemplary plot of destination object provided in an embodiment of the present invention.
Fig. 5 is the schematic diagram of data operation device provided in an embodiment of the present invention.
Specific embodiment
In correlation technique, generally adopt SQL statement and ORM (Object/Relation Mapping, Object Relation Mapping) Mode operating database.Wherein, need human-edited's SQL statement by the way of SQL statement, and by the way of ORM, use Family needs to set up corresponding mapped file for each tables of data in advance, and when data structure in a program changes, repaiies simultaneously Change mapped file.As can be seen here, the data manipulation method of correlation technique is required to take a large amount of human resourcess, and ease for use Difference, therefore, it is proposed to the technical scheme of the embodiment of the present invention.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Whole description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
Fig. 1 is the method flow diagram of data manipulation method provided in an embodiment of the present invention.Data manipulation method shown in Fig. 1 It is capable of the automatization of data manipulation such that it is able to improve ease for use.The method comprises the following steps.
Step S101, according to the corresponding data genaration destination object to be operated of described operational order.
Wherein, it is previously provided with operation server in this programme, described operation server is provided with operation interface, and encapsulates There is the program of data manipulation.User can input data to be operated by the operation interface operating server to provide, and selects to grasp Make type, operation server can execute data manipulation routine according to the content of user input.
For example, refer to Fig. 2, Fig. 2 is the schematic diagram of user interface provided in an embodiment of the present invention, wherein, operation It is provided with three text controls, four click push buttons in interface.User can input title " student number " in control txt1 Corresponding data;The corresponding data of input title " name " in control txt2;In control txt3, input title " fraction " is right The data answered, and after the data input, click on corresponding operation button, the operational order of input data and action type will be included It is sent to operation server, so that operation server execution corresponding operating.
It should be noted that operating server when executing data manipulation it should know that data to be operated is corresponding in advance Tables of data, and the attribute information of tables of data to be operated, therefore, in the present embodiment, operation server can be previously according to current number According to one class of each data table definitions in storehouse, such class name can be the table name of corresponding data table, and the attribute information of class can To be the attribute information of every column data in tables of data.As can be seen here, each tables of data uniquely corresponds to a class.Additionally, working as user Need in data base during interpolation data table it is also possible to the corresponding class of tables of data self-defined with to be added.
For example, refer to Fig. 3, Fig. 3 is the exemplary plot of class provided in an embodiment of the present invention.Wherein, the class shown in Fig. 3 according to Data table definitions shown in table 1.Specifically, the table name of tables of data shown in table 1 is " a high achievement ", including, student number, name and point Three data row of number, wherein, the data column data type of entitled student number is integer type;The data column data class of entitled name Type is character string type;The data column data type of entitled fraction is floating type.Thus the class name obtaining the class shown in Fig. 3 is permissible It is " a high achievement ", the attribute information of class includes " int student number ", " string name " and " float fraction ".
Because this programme includes multiple classes, therefore, in order to determine the corresponding target class of operational order, operation server can To set up the corresponding relation of the attribute of target class and input control in operation interface, as user in input control input data When, operation server can using the data of input control as target class specific object, thus based on this target class create mesh Mark object, and the data of user input and the corresponding type of this data, collectively form the corresponding attribute information of this target.
For example, illustrate in conjunction with Fig. 2, Fig. 3 and Biao 1, wherein, Fig. 3 is based on target class defined in table 1, and Fig. 2 is right Answer the operation interface of table one and Fig. 3.Wherein, in operation server, the class name of target class can be defined as seniorone, and arranges There is program
Senior one.stuID=txt1;
Senior one.stuNAME=txt2;
Senior one.stuSCORE=txt3;
When user inputs " 004 " in control txt1, in control txt2, input " D ", input in control txt3 " 580 ", and after clicking on " interpolation " button, operation server read control txt1, the mark of control txt2 and control txt3 respectively And data, and respectively the data being read being assigned to the respective name of target class, the program after assignment is as follows:
Senior one.stuID=int 004;
Senior one.stuNAME=string D;
Senior one.stuSCORE=float 580;
Thus obtaining destination object, described destination object is as shown in Figure 4.
From the description of this step, this programme can safeguard the structure of tables of data by defining the form of class, so as to Enough when receiving data, creating the object corresponding with the detailed construction of tables of data, and then, can not only be determined by object Target class is additionally it is possible to provide operation foundation for the automation mechanized operation of data.
Step S102, the reading corresponding class name of described destination object.
It should be noted that multiple tables of data that are stored with usual data base, therefore, operated treating peration data Before, operation server needs to predefine the target matrix corresponding to data to be operated.
Seen from the above description, target class can be according to data table definitions, and the table of the class name of target class and tables of data Name meets follows certain corresponding relation.Therefore, in the present embodiment, after generating destination object, operation server can read mesh The class name of the mark corresponding target class of object, and then target matrix can be determined according to class name.
For example, in conjunction with Fig. 3 and Fig. 4, after generating the destination object shown in Fig. 4, operation server can determine target pair As corresponding program:
Senior one.stuID=int 004;
Senior one.stuNAME=string D;
Senior one.stuSCORE=float 580;
Because destination object and target class are inheritances, therefore, operation server can be obtained by the structure of program The corresponding class name of this destination object:senior one.Specifically, the technology being well known to those skilled in the art, the present invention is real Here is omitted to apply example.
As can be seen here, the content of this step, the method that operation server provides the class name obtaining destination object, thus be Determine that destination server provides technical support.
Step S103, searches the target matrix matching with described class name from data base.
Wherein, seen from the above description, class name can be corresponding with the table name of tables of data, therefore, in the present embodiment, can be pre- In data base, first store the corresponding relation of class name and table name.After operating server to read class name, can be right from pre-stored Middle lookup class name should be related to, and read its corresponding table name after finding class name, and then, can be by this table name pair in data base The tables of data answered is defined as target matrix.
For example, understand, wherein, the destination object shown in Fig. 4 is inherited the target class shown in Fig. 3 and obtained in conjunction with Fig. 3, Fig. 4 and Biao 1 Arrive, therefore, the class name " senior one " of target class shown in Fig. 3 is the corresponding class name of destination object shown in Fig. 4.By Fig. 3 institute The target class shown data table transmition as shown in Table 1 obtains, and therefore, class name " senior one " is formed with table name " high achievement " Corresponding relation, after operation server reads class name " senior one ", can determine table according to class name " senior one " Name " a high achievement ", and then can determine the tables of data shown in table 1.
As can be seen here, the content of this step discloses a kind of method automatically determining tables of data, due to need not manually operate, Therefore, ease for use can not only be improved, and the operating experience of user can be improved.
Step S104, when finding described target matrix, based on described target matrix according to described operational order Operation is executed to described data to be operated.
Wherein, in order to ensure the safety of data in data base, after finding target matrix, operation server is permissible The legitimacy of data in checking destination object.Specifically, operation server can travel through the attribute of target matrix midrange evidence Information, and judge respectively target matrix midrange evidence attribute information whether identical with the respective attributes information of destination object, If the attribute information of target matrix midrange evidence is all identical with the respective attributes information of destination object, then peration data Next step operation can be carried out.If the respective attributes letter of the attribute information of certain column data in target matrix and destination object Breath is different, then, it is understood that there may be the illegal phenomenon of data, or, operation content is to change the attribute information of this column data.Cause This, operation server to user's output notice information, in order to when data is illegal, notify user, and can be worked as in operation When holding the attribute information for changing column data, can be when receiving the modification operational order of user input, by the genus of column data Property information is revised as the respective attributes information of destination object.
It should be noted that the respective attributes information of the attribute information of column data in target matrix and destination object is not Can include together:The data type of the two is different different with the corresponding number of entry of the two attribute information, if the two data class Type is different, then after receiving the modification operational order of user, can be by the data class of this row total data in target matrix Type is revised as corresponding data type in destination object;If the number of entry of the two attribute information is different, with destination object Corresponding attribute information is defined, the column data in increase or delete target tables of data.
For example, in conjunction with the tables of data shown in table 1, operation server can row after finding table 1, in traversal list 1 Name and its corresponding data type, and compare with the attribute information of the destination object shown in Fig. 4 one by one.Assume " fraction " institute Corresponding data type is floating number, and in Fig. 4, corresponding attribute information is changed to integer, then receiving user input After modification operational order, the data type of " fraction " corresponding data row in table 1 is all revised as integer by floating number;As On the basis of Fig. 4, destination object also includes the attribute information of " string ranking " to fruit, then, interpolation data in Table 1 Row, arrange entitled " ranking ", the data type of this row is character string;If on the basis of Fig. 4, destination object does not include " string name ", then, " name " corresponding row in table 1 all can be deleted.
Furthermore, it is necessary to explanation, if the corresponding genus of the attribute information of target matrix midrange evidence and destination object Property information all identical, operation server can according to operational order execute corresponding operating.If certain row in target matrix The attribute information of data is different from the respective attributes information of destination object, and after execution corresponding modification operation, may also have it His operation needs to execute, and therefore, operation server can also execute data manipulation as desired.Specifically, number can also be included According to increase, the deletion of data, the modification data of data lookup.
As can be seen here, the technical scheme of the embodiment of the present invention, operation server, can be from number after receiving operational order Automatically search target matrix according in storehouse, and treat peration data and automatically execute corresponding operating such that it is able to realize data manipulation Automatization, ease for use can not only be improved, and can either generally be suitable for, the operating experience of user can be improved again.
Additionally, according to foregoing description, because target class is probably user-defined class, and user-defined class There is no corresponding tables of data, therefore, not table name corresponding with such famous prime minister, then, in the corresponding relation of pre-stored, such The corresponding table name of name is also sky.So, on the basis of above-described embodiment, in the present embodiment, when operation server is prestoring Reading the corresponding content of class name in the corresponding relation of storage is space-time then it is assumed that there is not target matrix in data base.
When there is not target matrix in data base, operation server can read the attribute information of destination object, and Using corresponding for each attribute information project name as row name, create target matrix it is possible to arrive corresponding for attribute information Peration data stores the respective column of target matrix.Wherein, the table name of the target matrix being created can be in class name Literary composition translation.
Additionally, create target matrix after, operation server can also by the table name of the target matrix of establishment with The corresponding storage of the class name of target class, in order to, during execution data manipulation next time, can directly determine this target matrix.
As can be seen here, the content of the present embodiment can not only automatically create tables of data in data base, and can be automatic Revise the corresponding relation of class name and table name, thus without manual maintenance.
Based on the description of above-described embodiment, operate server after verification data legitimacy, may be to user input Data to be operated carry out next step operation, and generally concrete data is carried out with operation and typically requires by SQL statement, therefore, In an alternate embodiment of the present invention where, operation server can include encapsulated SQL performing module, when operation service After device receives operational order, corresponding data can be write SQL performing module, in order to grasp to the data in tables of data Make.Specifically, the present embodiment is retouched respectively in connection with the lookup of the increase of data, the deletion of data, the modification data of data State.
Wherein, the corresponding SQL statement of the increase of data is:INSERT INTO table name VALUES (data 1, data 2, data 3);The corresponding SQL statement of deletion of data is:DELETE FROM table name WHERE stuID=...;The modification of data is corresponding SQL statement is:UPDATE table name SET stuNAME=...WHERE stuID=...;The corresponding SQL statement of lookup of data For:SELECT stuID, stuNAME, stuSCORE FROM table name.In the present embodiment, operation server receives operation and refers to It may be determined that the corresponding action type of operational order is such that it is able to determine SQL performing module it is possible to be treated accordingly after order Peration data inputs the relevant position of SQL performing module.Then, after finding target matrix, table name is write SQL mould The relevant position of block is such that it is able to execute corresponding operating by calling this SQL performing module further.
For example, add data line in Table 1, the data added is student number " 004 ", name " D ", fraction " 580 ", that , after operation server receives operational order, while generating destination object, the operation class of operational order can also be identified Type, and interpolation SQL module is determined according to action type, then, data " 004 ", " D ", " 580 " are added according to corresponding relation write Plus module, obtain sentence INSERT INTO table name VALUES (004, D, 580).When table 1 is determined according to class name senior one After table name " a high achievement ", " high achievement " can be write SQL module, obtain exercisable SQL statement:INSERT INTO High achievement VALUES (004, D, 580) such that it is able to by executing this SQL statement, create blank line in Table 1, and by number Write corresponding with its attribute information position in blank line according to " 004 ", " D ", " 580 ", thus completing the interpolation of data.
For another example, from table 1 delete student number be 003 row data when, operation server equally can determine action type Afterwards, determine and delete SQL module, and read data " 003 " write SQL module from destination object, obtain DELETE FROM table name " high achievement ", then, after getting table name " a high achievement ", can be write SQL module, obtain by WHERE stuID=003 To the high achievement WHERE stuID=003 of DELETE FROM.Thus upon execution, data can be found from table 1 " 003 ", then, the corresponding row data deletion of data " 003 ".
Accordingly, in the step of execution modification data, operation server equally can determine after determining action type Modification SQL module, and read the data to be operated in destination object, for example, corresponding for student number 003 fraction is revised as by 640 650, then obtain the high achievement SET stuSCORE=650WHERE stuID=003 of SQL statement UPDATE, thus in execution When, the corresponding raw score of student number " 003 " " 640 " in table 1 can be determined first, then, " 640 " are replaced with " 650 ".
Likewise, in searching data, operation server can predefine lookup SQL performing module, and user is defeated The lookup index information write SQL module entering.Taking search fraction and be 600.5 points of student information as a example, SQL language can be obtained Sentence:The high achievement WHERE stuSCORE=600.5 of SELECT stuID, stuNAME FROM.Thus upon execution, Ke Yi Searching data " 600.5 " in table 1, it is then possible to obtain data " 600.5 " corresponding row data " 002 " and " B ", and by data " 002 " data " B " exports to user shows.
To sum up, data manipulation method provided in an embodiment of the present invention, in order to solve, correlation technique ease for use is poor, be difficult popularization Problem, this programme is provided with operation server, when described operation server receives the operational order of user input, according to The corresponding data genaration destination object to be operated of described operational order.Wherein, destination object is obtained based on predefined target class Arrive.Then, read the corresponding class name of destination object, and search, from data base, the target matrix matching with class name, thus After finding target matrix, peration data is treated according to operational order based on target matrix and executes operation.As can be seen here, The technical scheme of the embodiment of the present invention, operation server, after receiving operational order, can search mesh from data base automatically Mark tables of data, and treat peration data and automatically execute corresponding operating such that it is able to realize the automatization of data manipulation, can not only Improve ease for use, and can either generally be suitable for, the operating experience of user can be improved again.
Corresponding with above-mentioned implementation method, the embodiment of the present invention additionally provides a kind of data operation device.Refer to figure 5, Fig. 5 is the schematic diagram of data operation device provided in an embodiment of the present invention.This device includes generation module 11, read module 12nd, searching modul 13 and performing module 14, wherein:Generation module 11, for when receiving the operational order of user input, root According to the corresponding data genaration destination object to be operated of described operational order, wherein, described destination object is based on predefined mesh Mark class obtains;Read module 12, for reading the corresponding class name of described destination object;Searching modul 13, for from data base Search the target matrix matching with described class name;Performing module 14, for when finding described target matrix, being based on Described target matrix executes operation according to described operational order to described data to be operated.
Additionally, in another embodiment, described device also includes:Determining module, creation module and memory module, its In,
In the present embodiment, described read module 12, is additionally operable to read the attribute information of described destination object;
Described determining module, for determining the corresponding project name of each described attribute information;
Described creation module, for respectively using described project name as target matrix described in row name creation;
Described memory module, for by target data described in corresponding for each described attribute information data Cun Chudao to be operated The respective column of table.
Specifically, described performing module 14 includes Traversal Unit, detector unit, output unit and modification operating unit, its In,
Described Traversal Unit, for traveling through the attribute information of the column data of described target matrix;
Described detector unit, for detecting the attribute information of described column data and the respective attributes information of described destination object Whether identical;
Described output unit, for attribute information and described destination object when described column data respective attributes information not When identical, to user's output notice information;
Described modification operating unit, for when receiving the modification operational order of user input, by described column data Attribute information is revised as the respective attributes information of described destination object.
Additionally, in one embodiment, described performing module also includes adding device, reading unit and r/w cell, wherein,
Described adding device, for adding blank line after last column of described target matrix;
Described reading unit, for reading the data to be operated in described destination object;
Described r/w cell is relative with described attribute information in described blank line for writing described data to be operated respectively The position answered.
On the basis of above-described embodiment, described performing module also includes searching unit and deletes unit, wherein,
Described searching unit, for searching described data to be operated in described target matrix;
Described deletion unit, for deleting corresponding for described data to be operated row data from described target matrix.
In another embodiment, described performing module also includes determining unit and replacement unit, wherein,
Described determining unit, for determining former to be operated number corresponding with described data to be operated in described target matrix According to;
Described replacement unit, for replacing described former data to be operated using described data to be operated.
Additionally, on the basis of above-described embodiment, in another embodiment, it is single that described performing module also includes output Unit, wherein,
In the present embodiment, described reading unit, is additionally operable to read described data to be operated from described target matrix Corresponding row data;
Described output unit, for exporting described row data to user.
Execute the concrete mode of operation with regard to the device in above-described embodiment, wherein modules and unit relevant It has been described in detail in the embodiment of the method, explanation will be not set forth in detail herein.
Summary understands, in scheme provided in an embodiment of the present invention, in order to solve that correlation technique ease for use is poor, be difficult The problem promoted, this programme is provided with operation server, when described operation server receives the operational order of user input, According to the corresponding data genaration destination object to be operated of described operational order.Wherein, destination object is based on predefined target Class obtains.Then, read the corresponding class name of destination object, and search, from data base, the target matrix matching with class name, Thus after finding target matrix, peration data being treated according to operational order based on target matrix and executes operation.Thus It can be seen that, the technical scheme of the embodiment of the present invention, operation server, after receiving operational order, can be looked into from data base automatically Look for target matrix, and treat peration data and automatically execute corresponding operating such that it is able to realize the automatization of data manipulation, not only Ease for use can be improved, and can either generally be suitable for, the operating experience of user can be improved again.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should described be defined by scope of the claims.

Claims (14)

1. a kind of data manipulation method is it is characterised in that methods described includes:
When receiving the operational order of user input, according to the corresponding data genaration target pair to be operated of described operational order As wherein, described destination object is obtained based on predefined target class;
Read the corresponding class name of described destination object;
The target matrix matching with described class name is searched from data base;
When finding described target matrix, based on described target matrix according to described operational order to described number to be operated According to executing operation.
2. data manipulation method according to claim 1 is not it is characterised in that when finding described target matrix, Methods described also includes:
Read the attribute information of described destination object;
Determine the corresponding project name of each described attribute information;
Respectively using described project name as target matrix described in row name creation;
Respective column by target matrix described in corresponding for each described attribute information data Cun Chudao to be operated.
3. data manipulation method according to claim 1 it is characterised in that described based on described target matrix according to institute State operational order and operation inclusion is executed to described data to be operated:
Travel through the attribute information of the column data of described target matrix;
Detect whether the attribute information of described column data is identical with the respective attributes information of described destination object;
When the attribute information of described column data is differed with the respective attributes information of described destination object, to user's output notice Information;
When receiving the modification operational order of user input, the attribute information of described column data is revised as described destination object Respective attributes information.
4. data manipulation method according to claim 3 it is characterised in that when described column data attribute information with described When the respective attributes information of destination object is all identical, methods described also includes:
Add blank line after last column of described target matrix;
Read the data to be operated in described destination object;
Respectively described data to be operated is write corresponding with described attribute information position in described blank line.
5. data manipulation method according to claim 3 it is characterised in that when described column data attribute information with described When the respective attributes information of destination object is all identical, methods described also includes:
Read the data to be operated in described destination object;
Described data to be operated is searched in described target matrix;
Corresponding for described data to be operated row data is deleted from described target matrix.
6. data manipulation method according to claim 3 it is characterised in that when described column data attribute information with described When the respective attributes information of destination object is all identical, methods described also includes:
Read the data to be operated in described destination object;
Determine former to be operated data corresponding with described data to be operated in described target matrix;
Replace described former data to be operated using described data to be operated.
7. data manipulation method according to claim 3 it is characterised in that when described column data attribute information with described When the respective attributes information of destination object is all identical, methods described also includes:
Read the data to be operated in described destination object;
Described data to be operated is searched in described target matrix;
The corresponding row data of described data to be operated is read from described target matrix;
Export described row data to user.
8. a kind of data operation device is it is characterised in that described device includes:
Generation module, for when receiving the operational order of user input, according to the corresponding number to be operated of described operational order According to generating destination object, wherein, described destination object is obtained based on predefined target class;
Read module, for reading the corresponding class name of described destination object;
Searching modul, for searching the target matrix matching with described class name from data base;
Performing module, for when finding described target matrix, based on described target matrix according to described operational order Operation is executed to described data to be operated.
9. data operation device according to claim 8 is it is characterised in that described device also includes:Determining module, establishment Module and memory module, wherein,
Described read module, is additionally operable to read the attribute information of described destination object;
Described determining module, for determining the corresponding project name of each described attribute information;
Described creation module, for respectively using described project name as target matrix described in row name creation;
Described memory module, for by target matrix described in corresponding for each described attribute information data Cun Chudao to be operated Respective column.
10. data operation device according to claim 8 is it is characterised in that described performing module includes Traversal Unit, inspection Survey unit, output unit and modification operating unit, wherein,
Described Traversal Unit, for traveling through the attribute information of the column data of described target matrix;
Described detector unit, for detect the attribute information of described column data and described destination object respective attributes information whether Identical;
Described output unit, for differing with the respective attributes information of described destination object when the attribute information of described column data When, to user's output notice information;
Described modification operating unit, for when receiving the modification operational order of user input, by the attribute of described column data Information is revised as the respective attributes information of described destination object.
11. data operation device according to claim 10 are it is characterised in that described performing module also includes adding list Unit, reading unit and r/w cell, wherein,
Described adding device, for adding blank line after last column of described target matrix;
Described reading unit, for reading the data to be operated in described destination object;
Described r/w cell, corresponding with described attribute information in described blank line for writing described data to be operated respectively Position.
12. data operation device according to claim 10 are it is characterised in that described performing module also includes searching unit With delete unit, wherein,
Described searching unit, for searching described data to be operated in described target matrix;
Described deletion unit, for deleting corresponding for described data to be operated row data from described target matrix.
13. data operation device according to claim 10 are it is characterised in that described performing module also includes determining unit And replacement unit, wherein,
Described determining unit, for determining former to be operated data corresponding with described data to be operated in described target matrix;
Described replacement unit, for replacing described former data to be operated using described data to be operated.
14. data operation device according to claim 10 are it is characterised in that described performing module also includes output list Unit, wherein,
Described reading unit, is additionally operable to read the corresponding row data of described data to be operated from described target matrix;
Described output unit, for exporting described row data to user.
CN201610909326.5A 2016-10-19 2016-10-19 Data manipulation method and device Pending CN106484892A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610909326.5A CN106484892A (en) 2016-10-19 2016-10-19 Data manipulation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610909326.5A CN106484892A (en) 2016-10-19 2016-10-19 Data manipulation method and device

Publications (1)

Publication Number Publication Date
CN106484892A true CN106484892A (en) 2017-03-08

Family

ID=58270967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610909326.5A Pending CN106484892A (en) 2016-10-19 2016-10-19 Data manipulation method and device

Country Status (1)

Country Link
CN (1) CN106484892A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101473A (en) * 2018-08-09 2018-12-28 北京百度网讯科技有限公司 Method and apparatus for handling two-dimensional data table
CN109783488A (en) * 2018-12-12 2019-05-21 平安科技(深圳)有限公司 Project Management Information processing method, device, server and storage medium
CN111159275A (en) * 2020-01-02 2020-05-15 广州虎牙科技有限公司 Data import method and device, electronic equipment and storage medium
CN112068894A (en) * 2019-05-23 2020-12-11 华为技术有限公司 Configuration object processing method and device
CN112182011A (en) * 2020-09-28 2021-01-05 中国平安财产保险股份有限公司 Data operation method and device, electronic equipment and storage medium
CN110019479B (en) * 2017-12-28 2021-07-30 北京京东尚科信息技术有限公司 Data operation detection method and device
CN113448995A (en) * 2020-03-25 2021-09-28 北京沃东天骏信息技术有限公司 Database operation method, device and system, electronic equipment and storage medium
CN113971058A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Control positioning method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1190477A (en) * 1995-07-07 1998-08-12 瓦尔数据公司 Method and apparatus for modifying existing relational database schemas to reflect changes made in corresponding object model
CN101021877A (en) * 2007-03-16 2007-08-22 华为技术有限公司 Method and apparatus for updating object local attribute to related data bank
CN101799891A (en) * 2009-12-17 2010-08-11 中国电力科学研究院 Business data storage method and device
CN104169914A (en) * 2013-12-11 2014-11-26 华为技术有限公司 Data storage method, data processing method, device and mobile terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1190477A (en) * 1995-07-07 1998-08-12 瓦尔数据公司 Method and apparatus for modifying existing relational database schemas to reflect changes made in corresponding object model
CN101021877A (en) * 2007-03-16 2007-08-22 华为技术有限公司 Method and apparatus for updating object local attribute to related data bank
CN101799891A (en) * 2009-12-17 2010-08-11 中国电力科学研究院 Business data storage method and device
CN104169914A (en) * 2013-12-11 2014-11-26 华为技术有限公司 Data storage method, data processing method, device and mobile terminal

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019479B (en) * 2017-12-28 2021-07-30 北京京东尚科信息技术有限公司 Data operation detection method and device
CN109101473A (en) * 2018-08-09 2018-12-28 北京百度网讯科技有限公司 Method and apparatus for handling two-dimensional data table
CN109101473B (en) * 2018-08-09 2022-07-19 北京百度网讯科技有限公司 Method and apparatus for processing two-dimensional data table
CN109783488A (en) * 2018-12-12 2019-05-21 平安科技(深圳)有限公司 Project Management Information processing method, device, server and storage medium
CN109783488B (en) * 2018-12-12 2024-03-12 平安科技(深圳)有限公司 Project management information processing method, device, server and storage medium
CN112068894A (en) * 2019-05-23 2020-12-11 华为技术有限公司 Configuration object processing method and device
CN111159275A (en) * 2020-01-02 2020-05-15 广州虎牙科技有限公司 Data import method and device, electronic equipment and storage medium
CN113448995A (en) * 2020-03-25 2021-09-28 北京沃东天骏信息技术有限公司 Database operation method, device and system, electronic equipment and storage medium
CN113971058A (en) * 2020-07-22 2022-01-25 北京奇虎科技有限公司 Control positioning method, device, equipment and storage medium
CN112182011A (en) * 2020-09-28 2021-01-05 中国平安财产保险股份有限公司 Data operation method and device, electronic equipment and storage medium
CN112182011B (en) * 2020-09-28 2023-08-15 中国平安财产保险股份有限公司 Data operation method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106484892A (en) Data manipulation method and device
CN103226606B (en) Inquiry choosing method and system
CN108345485A (en) identification method and device for interface view
CN104123227A (en) Method for automatically generating testing cases
CN103077022B (en) A kind of work flow visual operation collocation method and device
CN106126528B (en) A kind of moonlet test basic information generation method based on platform model
CN103903086A (en) Method and system for developing management information system based on service model driving
CN103780448B (en) A kind of generation method and device of control layer identification code
CN109308258A (en) Building method, device, computer equipment and the storage medium of test data
JP6103314B2 (en) Information management apparatus and file management method
CN114328452A (en) Data auditing method, device, platform, electronic equipment and storage medium
CN102622224A (en) Method for achieving tree-like control piece with search function in Windchill system
JP6043899B2 (en) Information management apparatus and information retrieval method
JP2015007955A (en) Hierarchical structure construction device, hierarchical structure construction method, and program
CN104636471A (en) Procedure code finding method and device
Paramonov et al. Tacle: Learning constraints in tabular data
CN115329753B (en) Intelligent data analysis method and system based on natural language processing
CN116433838A (en) Three-dimensional tree symbol dynamic generation method, device, terminal and medium
JP6839360B2 (en) Display program, display method and display device
CN115828804A (en) Method for modifying RTL source code file and electronic equipment
CN114090611A (en) Method and device for generating cable inventory by terminal wiring table and electronic equipment
CN116956838A (en) Project determining method and device for engineering quantity list
CN104408316B (en) Sino-U.S.'s Geotechnical Engineering classification of soils standard handovers device and method
CN109145098B (en) Chinese culture element information searching method based on knowledge graph
CN105930162B (en) A kind of characteristic positioning method based on subgraph search

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170308