CN115905267A - Data processing method and device, storage medium and electronic equipment - Google Patents
Data processing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN115905267A CN115905267A CN202211738119.XA CN202211738119A CN115905267A CN 115905267 A CN115905267 A CN 115905267A CN 202211738119 A CN202211738119 A CN 202211738119A CN 115905267 A CN115905267 A CN 115905267A
- Authority
- CN
- China
- Prior art keywords
- data
- operation statement
- database
- processed
- data operation
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The specification discloses a data processing method, a data processing device, a storage medium and electronic equipment, which can be used for protecting private data, inquiring each candidate data from a database based on an acquired data operation statement which does not contain a data constraint condition for inquiring specified data, and determining to-be-processed data selected from each candidate data by a user. And rewriting a data processing instruction for processing the data to be processed according to the physical address in the database corresponding to the data to be processed, and processing the data to be processed according to the modified data processing instruction. The method takes the physical address of the data to be processed in the database as a constraint condition which can uniquely determine the data to be processed, rewrites the data processing instruction, and then uses the rewritten data processing instruction to accurately process the data to be processed when processing the data to be processed, thereby avoiding the problem that other candidate data are processed by mistake.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a data processing method and apparatus, a storage medium, and an electronic device.
Background
With the continuous development of the internet, society has stepped into the big data era, and database systems are generally used for storing and managing data information (such as privacy data) generated by daily activities of people.
In the prior art, in the process of processing data to be processed in a database, when a modification statement in a data processing instruction sent to the database does not include a data constraint field (e.g., a primary key) for the data to be processed, a situation that other data are processed together by mistake usually occurs, so that a problem that data stored in the database is stored incorrectly or even lost occurs.
Disclosure of Invention
The present specification provides a data processing method and apparatus, which partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides a data processing method including:
acquiring a data operation statement input by a user, wherein the data operation statement does not contain a data constraint condition for screening specified data;
screening each candidate data from a database and determining the address of each candidate data in the database according to the data operation statement;
determining data selected by the user from the candidate data as data to be processed;
rewriting the data operation statement according to the address of the data to be processed in the database to obtain a rewritten data operation statement;
and processing the data to be processed according to the rewritten data operation statement.
Optionally, according to the data operation statement, screening each candidate data from a database and determining an address of each candidate data in the database specifically includes:
adding a preset specified field for inquiring an address in the data operation statement;
and inquiring each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement added with the specified field.
Optionally, rewriting the data operation statement according to the address of the to-be-processed data in the database to obtain a rewritten data operation statement, which specifically includes:
and adding the preset specified field for inquiring the address into the data operation statement to rewrite the data operation statement to obtain the rewritten data operation statement.
Optionally, rewriting the data operation statement according to the address of the to-be-processed data in the database, specifically including:
analyzing the data operation statement to judge whether the data operation statement contains a data constraint condition aiming at the data to be processed;
and if not, rewriting the data operation statement according to the address of the data to be processed in the database.
Optionally, the method further comprises:
and when the data operation statement is determined to contain the data constraint condition aiming at the data to be processed, processing the data to be processed according to the data operation statement.
The present specification provides a data processing apparatus including:
the acquisition module is used for acquiring a data operation statement input by a user, wherein the data operation statement does not contain a data constraint condition for screening specified data;
the screening module screens all candidate data from a database and determines the address of each candidate data in the database according to the data operation statement;
the determining module is used for determining data selected by the user from the candidate data as data to be processed;
the rewriting module is used for rewriting the data operation statement according to the address of the data to be processed in the database to obtain a rewritten data operation statement;
and the processing module is used for processing the data to be processed according to the rewritten data operation statement.
Optionally, the screening module is specifically configured to add a preset specified field for querying an address in the data operation statement; and inquiring each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement added with the specified field.
Optionally, the rewriting module is specifically configured to add the preset specified field for querying an address to the data operation statement, so as to rewrite the data operation statement, and obtain a rewritten data operation statement.
Optionally, the rewriting module is specifically configured to analyze the data operation statement to determine whether the data operation statement includes a data constraint condition for the to-be-processed data; and if not, rewriting the data operation statement according to the address of the data to be processed in the database.
Optionally, the processing module is further configured to process the data to be processed according to the rewritten data operation statement.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described data processing method.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above data processing method when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the data processing method provided in this specification, based on an acquired data operation statement that does not include a constraint condition for querying specified data, each candidate data is queried from a database, and data to be processed selected by a user from each candidate data is determined. And rewriting a data processing instruction for processing the data to be processed according to the physical address in the database corresponding to the data to be processed, and processing the data to be processed according to the modified data processing instruction.
The method can be seen in that the physical address of the data to be processed in the database is used as a constraint condition for uniquely determining the data to be processed, the data processing instruction is rewritten, and then the rewritten data processing instruction is used for accurately processing the data to be processed when the data to be processed is processed, so that the problem that other candidate data are processed by mistake is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the principles of the specification and not to limit the specification in a limiting sense. On the attachment
In the figure:
FIG. 1 is a flow chart of a data processing method in the present specification;
FIG. 2 is a schematic diagram of a data processing apparatus provided herein;
fig. 3 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without making any creative effort belong to the protection scope of the present specification.
With the advent of the big data age, the demand for diversification of people in daily activities has led to a rapid increase in the amount of data in information systems, and therefore, database systems are generally employed to store and manage data. In actual operation, users often have processing requirements on data in the database system, wherein the processing requirements on the data generally include modifying the data, deleting the data, adding the data and the like.
The processing operations performed on the data in the database are generally: first, a user may input a data operation statement to a client corresponding to a database, where the data operation statement is a database statement used to query specified data from each data stored in the database. In response to the received data operation statements input by the user, according to the data operation statements input by the user, each candidate data is queried from the database as a result set, and the result set is presented to the user, where the result set is usually presented to the user in a form of a table. And then, the client corresponding to the database can receive a data processing instruction, wherein the data processing instruction comprises a modification statement, and the database can process the data in the result set according to the modification statement.
In the prior art, taking an update statement as an example, the format of the update statement is usually: update table name set column name = X value where column name = Y value, where, in general, to avoid mismodifying data, "where column name = Y value" in the update statement is a column combination that is capable of determining unique data to be processed, i.e., contains a unique constraint, e.g., a primary key column as a column combination of unique constraints. However, when the modification statement included in the data processing instruction does not include the primary key column, or any other combination of uniqueness constraints, the database will process all candidate data under the column name in the result set.
For example, a data table T _ WITH _ PK exists in the database, wherein the data table includes a primary key COL1, and the result set obtained by using the data operation statements select COL1, COL2 from T _ WITH _ PK personal COL1 in (1,2) is as shown in table 1:
COL1 | COL2 |
1 | A1 |
2 | A1 |
TABLE 1
When the A1 under the COL =1 condition is modified to B1, in order to avoid mis-modifying the COL2= A1 corresponding to COL1=2, the database modification statement input by the user needs to include a unique constraint condition for matching to COL1= corresponding COL2= A1. Specifically, to avoid erroneously modifying COL2= A1 corresponding to COL1=2, the database modification statement input by the user may be: update T _ WITH _ PK Set COL2= B1 Where the modification statement matches the primary key COL1 as a Where condition to the modified row, so that the database can uniquely determine the data to be processed based on the primary key, i.e., COL2= A1, and does not modify A1 corresponding to COL1=2 as well as B1.
In practical operation, in order to enable the database to be accurately located to the to-be-processed data that the user needs to process, the data processing instruction sent to the database needs to include a primary key or other fields as data constraint fields for the to-be-processed data, that is, columns of any unique constraint for the to-be-processed data as rows of where condition matching modification. If a result set shown in a table form is compared with an Excel table, if a certain data in the table is to be modified, the number of rows and the number of columns of the data need to be clearly informed, the Excel table can determine the unique data, namely the data to be processed, and similarly, if the data processing instruction only includes a column name and does not include a row which is subjected to the where condition matching modification, the unique data to be processed cannot be determined, so that all data under the column name included in the data processing instruction in the result set is processed, and data is updated mistakenly, and further, the problems of loss of private data in a database and the like occur.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a data processing method in this specification, which specifically includes the following steps:
s100: and acquiring a data operation statement input by a user, wherein the data operation statement does not contain a data constraint condition for screening specified data.
The execution main body of the data processing method provided in this specification may be an electronic device where a server corresponding to the database is located, for example, a notebook computer, a mobile phone, or the like, or may be a client corresponding to the database that communicates with the server where the database is located, and this specification does not limit this.
For convenience of description, the following description will be given only by taking the execution subject as a server where the database is located.
It should be noted in advance that, in the data processing process in the database system, in order to avoid the situation of data mishandling, a modification statement sent to the database needs to include a combination of main keys or other arbitrary unique constraints, as a where condition to match the data to be modified. Based on the above description, the data processing method provided in this specification may use the ROWID in the database system as the row of the where condition matching, so that the database can determine the unique data to be processed, thereby avoiding the situation of misprocessing other data together.
First, briefly describing the ROWID in the database, each row of data in the database table has a unique identifier, i.e., ROWID. In the internal logic of the database, the data is usually accessed using the ROWID, and the ROWID is used to indicate the physical specific location of the row of data corresponding to the ROWID in the database, so in this specification embodiment, the ROWID is referred to as the physical address corresponding to the data, which may point to the address of the data file stored in the block containing the data row in the data table, and may also directly locate the address of the row of the data row itself in the data block, where the ROWID is unique.
The database may represent the ROWID by base64 encoding, i.e. the physical address of each row of data, wherein the encoding characters include A-Z, a-z, 0-9, + and/. The ROWID contains the following: the number of the data file where the object is located, the block number where the object is located, the position of the line where the object is located within the block, and the object number.
Then, if the physical address corresponding to the data to be processed (the ROWID corresponding to the data to be processed) is used as the line of the where condition matching modification in the data processing instruction, the database can determine the unique data to be processed, and thus, other data cannot be processed by mistake.
Based on the above-described steps of performing processing operations on data in the database, in the embodiment of the present specification, data to be processed needs to be queried first, and then the data to be processed needs to be processed, that is, a data querying stage and a data processing stage.
Therefore, the server can acquire the data operation statement input by the user, and the data operation statement does not contain the data constraint condition for screening the specified data. The specified data is data that the user needs to process, and the data constraint condition may be understood as a field corresponding to a column combination of a primary key or any other unique constraint for the specified data included in the data operation statement.
S102: and screening each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement.
Since the data operation statement does not include a data constraint condition for screening the specified data, in order to ensure that the database can have a line which is used as a where condition for determining the unique data to be processed matches and modifies in the data processing stage, in the data query stage, a field of a physical address for querying the data can be expanded into the query data input by the user to rewrite the data operation statement.
Specifically, a preset specified field for querying a physical address may be added to the data operation statement input by the user for rewriting, so as to obtain a rewritten data operation statement.
And then, the database can execute the rewritten data operation statement, and each data corresponding to the rewritten data operation statement is screened out from the database to be used as each candidate data. For each candidate data, an address of the candidate data in the database may be determined, where the address is used to indicate a storage location of the candidate data in the database, and may be specifically indicated by the ROWID of the candidate data.
S104: and determining data selected by the user from the candidate data as data to be processed.
S106: and rewriting the data operation statement according to the address of the data to be processed in the database to obtain a rewritten data operation statement.
S108: and processing the data to be processed according to the rewritten data operation statement.
In the embodiment of the present specification, step S104 to step S108 belong to a data processing stage.
The database can display each candidate data to a user in a form of a table, wherein each candidate data forms a screened result set, and each candidate data corresponds to a column name. And the database responds to the operation of clicking and the like on certain data in the candidate data by the user, and determines that the user performs the selection operation on the data in the candidate data, so that the database can determine that the data is the data selected by the user from the candidate data and takes the data as the data to be processed.
In step S102, the database has determined the addresses of the candidate data in the database, and therefore, the corresponding addresses of the data to be processed in the database are known.
In the data processing stage, when the database processes the data to be processed, in order to accurately locate the data to be processed, the database may rewrite a data processing instruction based on an address of the data to be processed in the database, where the data processing instruction at least includes an update statement, and the update statement at least includes a modification statement and a deletion statement.
Specifically, the database responds to the received data processing instruction to serve as an original data processing instruction, and analyzes a data operation statement corresponding to the original data processing instruction to judge whether the original data processing instruction contains a data constraint field for the data to be processed.
If the original data processing instruction contains a field corresponding to the data constraint condition of the data to be processed, the data to be processed can be uniquely determined on the basis of the field corresponding to the unique constrained column of the data to be processed, and other data except the data to be processed in each candidate data cannot be processed by mistake, so that the original data processing instruction can be directly executed by the database.
If the original data processing instruction does not include a field corresponding to a data constraint condition for the data to be processed, a field corresponding to a primary key or a field corresponding to other unique arbitrary constraint column combinations which are not included in the original data processing is taken as a line for where condition matching modification, then the database may wrongly process other data with the same value as the value corresponding to the data to be processed, so that the original data processing instruction can be rewritten according to the address of the data to be processed corresponding to the database to obtain a rewritten data processing instruction, and then the database executes the rewritten data processing instruction.
And finally, the database can execute a data processing instruction containing a field corresponding to the data constraint condition of the data to be processed so as to uniquely determine the data to be processed from each candidate data, and process the data to be processed according to the rewritten data operation statement and the content of the data processing instruction.
Based on the data processing method shown in fig. 1, each candidate data is queried from the database based on the obtained data operation statement that does not include the field corresponding to the data constraint condition for querying the designated data, and the data to be processed selected from each candidate data by the user is determined. And rewriting a data processing instruction for processing the data to be processed according to the address in the database corresponding to the data to be processed, and processing the data to be processed according to the modified data processing instruction. The method takes the address of the data to be processed in the database as a constraint condition capable of uniquely determining the data to be processed, rewrites the data processing instruction, and then uses the rewritten data processing instruction, so that when the data to be processed is processed, the data to be processed can be accurately processed, and the problem that other candidate data are processed by mistake is avoided.
The user may input the data operation statement to the database, and then input the data processing instruction to the database after obtaining each candidate data, or the user may input the data operation statement and the data processing instruction to the database together, which is not limited in this specification.
It should be noted that, in practice, a user may also directly input a data operation statement including a field for querying an address corresponding to data in a database when inputting the data operation statement, but in many practical application scenarios, a user of the database system, that is, a user corresponding to the database system, is not a professional in the field of database technology, and generally uses a pre-written data operation statement to directly input the data operation statement into the database, and thus, a data processing instruction received by the database is also the same. Therefore, the data processing method provided by the present specification is to modify, at the back end, a received data operation statement or data processing instruction that does not include a field corresponding to a data constraint condition for data to be processed after receiving a data operation statement or data processing instruction input by a user, without the need for the user to modify the data operation statement or data processing instruction by himself, so as to reduce the operation difficulty of the database on the premise of ensuring that the database does not misprocess other data.
To facilitate understanding of the data processing method provided in the present specification, the present application will be described with reference to a simple example.
Following the above example, in the data query phase, the database receives the data operation statement input by the user: the select COL2 from T _ WITH _ PK may be analyzed to determine that the data operation statement input by the user does not include a field corresponding to a data constraint condition for querying the specified data, for example: the field corresponding to the primary key, etc. Therefore, the data operation statement after being rewritten can be obtained by adding the specified field (i.e. ROWID field) of the preset address for querying data to the data operation statement, and the data operation statement after being rewritten can be selected ROWID, COL2 from T _ WITH _ PK. After the database executes the rewritten data operation statement, a result set shown in table 2 can be obtained:
ROWID | COL2 |
*AAEPAQEAwAEAAAA= | A1 |
*AAEPAQEAwAIAAAA= | A1 |
TABLE 2
In this way, the database shows all the data with the column name COL2 in the data table as candidate data, and meanwhile, for each candidate data, the database can determine the corresponding address of the candidate data in the database.
Thereafter, the database determines COL2= A1 of the data to be processed as the first row in table 2 according to the selection operation of the user. Then, according to the ROWID of the first row in Table 2, the database may rewrite the update statement for the data to be processed to:
update"T_WITH_PK"set"COL2"='A2'where ROWID='*AAEPAQEAwAEAAAA='
therefore, the database can only update the data to be processed based on the rewritten update statement, and the second row of data in table 2 is not modified together, so that the problem of misprocessing other data is avoided.
Furthermore, in order to avoid increasing the difficulty of database operation, the above-mentioned rewriting operation is only executed at the back end of the database, and is not displayed at the front end, and the user does not perceive that the data operation statement and the data processing instruction input by the user are rewritten.
Specifically, when the database receives a data operation statement input by a user, a preset specified field for inquiring an address corresponding to data in the database can be added to the data operation statement in an extended built-in manner to rewrite the data operation statement input by the user, wherein because the specified field is added to the data operation statement in the extended built-in manner, the content corresponding to the specified field is not displayed when the database displays a result set, that is, the database does not display the address (ROWID) corresponding to each candidate data in the database to the user at the front end.
Therefore, based on the above description, in the present illustrative embodiment, the data operation statement can be rewritten as: select ROWID As "__ ODC _ INTERNAL _ ROWID __", COL2 from T _ WITH _ PK. When the database executes the rewritten data operation statement, when the ROWID As "__ ODC _ INTERNAL _ ROWID __" is read, the column with the column name __ ODC _ INTERNAL _ ROWID __ is hidden, so that the ROWID at the front end of the database is hidden, and the column actually shown to the user has only COL2, then the result set visible to the user is As shown in Table 3:
COL2 |
A1 |
A1 |
TABLE 3
It should be noted that, after receiving the data processing instruction, the database may analyze a data operation statement in the data processing instruction, if the data operation statement includes a field corresponding to a data constraint condition for the instruction to be processed, that is, it is determined whether the received data processing instruction includes a column of a unique constraint for the data to be processed, if so, the database may use the column of the unique constraint in the data processing instruction to generate a row matching a where condition modification for the instruction to be processed, and if not, it is determined whether the data processing instruction includes an address for the data to be processed, and if so, the database may use the address corresponding to the data to be processed to generate a row matching a where condition modification for the data to be processed.
If the data processing instruction does not contain the column of the uniqueness constraint aiming at the data to be processed, and does not contain the address aiming at the data to be processed, whether the data processing instruction also contains the hidden physical address corresponding to the data to be processed can be judged, and if the data processing instruction contains the hidden physical address of the data to be processed, the database can use the hidden physical address of the data to be processed to generate a where condition modification matched row aiming at the data to be processed.
If the data processing instructions do not meet the conditions, the database can refuse to execute the data processing instructions in order to avoid the situation of carrying out error processing on other data in the database, and a prompt message for prompting a user that the data to be processed is not supported to be edited is displayed at the client side while an error is reported.
For convenience of understanding, the above determination may be analogized to an Excel table, which is a simple example, the table includes a user name, a user identification number, and a user gender, and if the gender of the target user is to be modified, if the target user name is used as a matching condition, when a duplicate name occurs between users, the gender of the user with the duplicate name of the target user included in the table is usually modified by mistake. However, the identity card number of each user is unique corresponding to the user, and if the identity card number of the target user is taken as the matching condition, the problem of error processing does not occur, and the identity card number of the target user is equivalent to a column of uniqueness constraint aiming at the data to be processed and is taken as a line matched with the where condition when the gender of the user is modified.
Then, based on the data processing method provided in this specification, the number corresponding to the row where the target user is located can be used as the matching condition, so that the gender of other users will not be mishandled, and the code corresponding to the row where the target user is located is used as the matching condition, which is equivalent to the physical address corresponding to the data to be processed in this scheme, so as to generate the row with the matching where the where condition is matched.
In addition, the database may analyze the received data processing instruction when the data processing instruction is initially received, so as to determine whether the data processing instruction includes a data operation statement, and if so, the database may perform steps S100 to S108. Specifically, the database may perform word-by-word recognition on a database statement included in the data processing instruction after splitting, determine whether the database statement satisfies a preset condition, and if so, determine that the data processing instruction includes a data operation statement. For example, when it is determined that the received database statement includes a select field and does not include an into field, it is determined that the user has input a data manipulation statement.
Based on the same idea, the data processing method provided above for one or more embodiments of the present specification further provides a corresponding data processing apparatus, as shown in fig. 2.
Fig. 2 is a schematic diagram of a data processing apparatus provided in this specification, which specifically includes:
the obtaining module 200 obtains a data operation statement input by a user, where the data operation statement does not include a data constraint condition for screening specified data;
the screening module 202 is used for screening each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement;
a determining module 204, configured to determine data selected by the user from the candidate data as data to be processed;
the rewriting module 206 rewrites the data operation statement according to the address of the data to be processed in the database to obtain a rewritten data operation statement;
and the processing module 208 is used for processing the data to be processed according to the rewritten data operation statement.
Optionally, the screening module 202 is specifically configured to add a preset specified field for querying an address in the data operation statement; and inquiring each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement added with the specified field.
Optionally, the rewriting module 206 is specifically configured to add the preset specified field for querying an address to the data operation statement, so as to rewrite the data operation statement, and obtain a rewritten data operation statement.
Optionally, the rewriting module 206 is specifically configured to analyze the data operation statement to determine whether the data operation statement includes a data constraint condition for the to-be-processed data; and if not, rewriting the data operation statement according to the address of the data to be processed in the database.
Optionally, the processing module 208 is further configured to, when it is determined that the data operation statement includes a data constraint condition for the to-be-processed data, process the to-be-processed data according to the data operation statement.
The present specification also provides a computer-readable storage medium storing a computer program operable to execute the data processing method provided in fig. 1 above.
This specification also provides a schematic block diagram of the electronic device shown in fig. 3. As shown in fig. 3, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to implement the data processing method described in fig. 1. Of course, besides the software implementation, this specification does not exclude other implementations, such as logic devices or combination of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain a corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as ABEL (Advanced Boolean Expression Language), AHDL (alternate Hardware Description Language), traffic, CUPL (core universal Programming Language), HDCal, jhddl (Java Hardware Description Language), lava, lola, HDL, PALASM, rhyd (Hardware Description Language), and vhigh-Language (Hardware Description Language), which is currently used in most popular applications. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium that stores computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only an example of the present disclosure, and is not intended to limit the present disclosure. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.
Claims (12)
1. A method of data processing, comprising:
acquiring a data operation statement input by a user, wherein the data operation statement does not contain a data constraint condition for screening specified data;
screening each candidate data from a database and determining the address of each candidate data in the database according to the data operation statement;
determining data selected by the user from the candidate data as data to be processed;
rewriting the data operation statement according to the address of the data to be processed in the database to obtain a rewritten data operation statement;
and processing the data to be processed according to the rewritten data operation statement.
2. The method of claim 1, wherein, according to the data manipulation statement, screening candidate data from a database and determining an address of each candidate data in the database, specifically comprises:
adding a preset designated field for inquiring an address in the data operation statement;
and inquiring each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement added with the specified field.
3. The method according to claim 2, wherein rewriting the data operation statement according to the address of the to-be-processed data in the database to obtain a rewritten data operation statement, specifically includes:
and adding the preset specified field for inquiring the address into the data operation statement to rewrite the data operation statement to obtain the rewritten data operation statement.
4. The method according to claim 1, wherein rewriting the data operation statement according to the address of the to-be-processed data in the database specifically includes:
analyzing the data operation statement to judge whether the data operation statement contains a data constraint condition aiming at the data to be processed;
and if not, rewriting the data operation statement according to the address of the data to be processed in the database.
5. The method of claim 1, further comprising:
and when the data operation statement is determined to contain the data constraint condition aiming at the data to be processed, processing the data to be processed according to the data operation statement.
6. A data processing apparatus comprising:
the acquisition module is used for acquiring a data operation statement input by a user, wherein the data operation statement does not contain a data constraint condition for screening specified data;
the screening module screens all candidate data from a database and determines the address of each candidate data in the database according to the data operation statement;
the determining module is used for determining data selected from the candidate data by the user as data to be processed;
the rewriting module is used for rewriting the data operation statement according to the address of the data to be processed in the database to obtain a rewritten data operation statement;
and the processing module is used for processing the data to be processed according to the rewritten data operation statement.
7. The apparatus according to claim 6, wherein the filtering module is specifically configured to add a preset specified field for querying an address in the data operation statement; and inquiring each candidate data from the database and determining the address of each candidate data in the database according to the data operation statement added with the specified field.
8. The apparatus according to claim 7, wherein the rewriting module is specifically configured to add the preset specified field for querying an address to the data operation statement to rewrite the data operation statement, so as to obtain a rewritten data operation statement.
9. The apparatus according to claim 6, wherein the rewrite module is specifically configured to parse the data operation statement to determine whether the data operation statement includes a data constraint condition for the to-be-processed data; and if not, rewriting the data operation statement according to the address of the data to be processed in the database.
10. The apparatus of claim 6, wherein the processing module is further configured to process the data to be processed according to the rewritten data operation statement.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of the preceding claims 1 to 5.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims 1 to 5 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211738119.XA CN115905267A (en) | 2022-12-30 | 2022-12-30 | Data processing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211738119.XA CN115905267A (en) | 2022-12-30 | 2022-12-30 | Data processing method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115905267A true CN115905267A (en) | 2023-04-04 |
Family
ID=86473086
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211738119.XA Pending CN115905267A (en) | 2022-12-30 | 2022-12-30 | Data processing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115905267A (en) |
-
2022
- 2022-12-30 CN CN202211738119.XA patent/CN115905267A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107526777B (en) | Method and equipment for processing file based on version number | |
CN111797073B (en) | Database management method, electronic device, and computer-readable storage medium | |
CN107391101B (en) | Information processing method and device | |
CN107622080B (en) | Data processing method and equipment | |
CN110968601A (en) | Data query processing method and device | |
CN111400681B (en) | Data authority processing method, device and equipment | |
CN115756449B (en) | Page multiplexing method and device, storage medium and electronic equipment | |
CN110399359B (en) | Data backtracking method, device and equipment | |
US20240256613A1 (en) | Data processing method and apparatus, readable storage medium, and electronic device | |
CN114327759B (en) | Method and device for processing block chain data | |
CN115934161A (en) | Code change influence analysis method, device and equipment | |
CN106156050B (en) | Data processing method and device | |
CN111694992A (en) | Data processing method and device | |
CN112559346A (en) | Service testing method and device | |
CN117935915A (en) | Gene expression quantity detection data management method and device | |
CN115905267A (en) | Data processing method and device, storage medium and electronic equipment | |
CN110502551A (en) | Data read-write method, system and infrastructure component | |
CN111339117B (en) | Data processing method, device and equipment | |
CN116010419A (en) | Method and device for creating unique index and optimizing logic deletion | |
CN115391426A (en) | Data query method and device, storage medium and electronic equipment | |
CN111552977A (en) | Method, device and system for determining application permission | |
CN110704742A (en) | Feature extraction method and device | |
CN117743809B (en) | Cell detection data preprocessing method, device and storage medium | |
CN110659328B (en) | Data query method, device, equipment and computer readable storage medium | |
CN114282510B (en) | Document generation method and device, storage medium and electronic equipment |
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 |