CN112817990A - Data processing method and device, electronic equipment and readable storage medium - Google Patents

Data processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112817990A
CN112817990A CN202110121416.9A CN202110121416A CN112817990A CN 112817990 A CN112817990 A CN 112817990A CN 202110121416 A CN202110121416 A CN 202110121416A CN 112817990 A CN112817990 A CN 112817990A
Authority
CN
China
Prior art keywords
statement
data
converted
database
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110121416.9A
Other languages
Chinese (zh)
Other versions
CN112817990B (en
Inventor
何兴鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110121416.9A priority Critical patent/CN112817990B/en
Publication of CN112817990A publication Critical patent/CN112817990A/en
Application granted granted Critical
Publication of CN112817990B publication Critical patent/CN112817990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/242Query formulation
    • G06F16/2433Query languages
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • 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/23Updating
    • 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/2452Query translation
    • G06F16/24528Standardisation; Simplification

Landscapes

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

Abstract

The disclosure provides a data processing method and device, electronic equipment and a readable storage medium, relates to the technical field of data processing, and particularly relates to cloud computing and cloud storage technologies. The specific implementation scheme is as follows: converting the update statement to be converted into a first update statement supported by a first database based on the first data definition, and converting the update statement to be converted into a second update statement supported by a second database based on the first data definition; the first database and the second database support different statements; and updating the data in the first database based on the first updating statement, and updating the index information of the data in the second database based on the second updating statement, wherein the data and the index information of the data have a corresponding relation. By adopting the embodiment of the disclosure, the data updating efficiency can be effectively improved.

Description

Data processing method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to the field of cloud computing and cloud storage.
Background
The internet product is a commodity produced for business in the internet field, and generally, related information of the internet product is stored as internet product data so as to record the related information of the internet product. Among other things, internet product data is typically configured with a plurality of fields (e.g., item ID, store name, cover page, user tag, etc.). In the operation process, aiming at different operation requirements, the internet product data is required to be processed frequently, for example, the cover of the internet product is replaced, and the internet product data with a specific user label is screened out.
Currently, internet product data is basically stored in a database in the form of a database table, and the processing of the internet product data is basically performed by programming the database. Because the development time required for writing programs is long, it is difficult to satisfy the data update efficiency required for the operation of internet products.
Disclosure of Invention
The disclosure provides a data processing method, a data processing device, an electronic device and a readable storage medium.
According to a first aspect of the present disclosure, there is provided a data processing method, including:
converting the update statement to be converted into a first update statement supported by a first database based on the first data definition, and converting the update statement to be converted into a second update statement supported by a second database based on the first data definition; the first database and the second database support different statements;
and updating the data in the first database based on the first updating statement, and updating the index information of the data in the second database based on the second updating statement, wherein the data and the index information of the data have a corresponding relation.
According to a second aspect of the present disclosure, there is provided a data processing apparatus comprising:
the first conversion module is used for converting the update statement to be converted into a first update statement supported by a first database based on a first data definition and converting the update statement to be converted into a second update statement supported by a second database based on the first data definition; the first database and the second database support different statements;
and the updating module is used for updating the data in the first database based on the first updating statement and updating the index information of the data in the second database based on the second updating statement, and the data and the index information of the data have a corresponding relation.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to any one of the embodiments of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform a method in any of the embodiments of the present disclosure.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method in any of the embodiments of the present disclosure.
According to the technology disclosed by the invention, the data updating efficiency can be improved, and the development cost is saved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a data processing method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of determining a first update statement in accordance with an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of determining a second update statement in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of obtaining target data according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of an application example according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device of a data processing method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a data processing method according to an embodiment of the present disclosure. As shown in fig. 1, the data processing method includes:
s101, converting an update statement to be converted into a first update statement supported by a first database based on a first data definition, and converting the update statement to be converted into a second update statement supported by a second database based on the first data definition; the first database and the second database support different statements;
s102, updating the data in the first database based on the first updating statement, and updating the index information of the data in the second database based on the second updating statement, wherein the data and the index information of the data have a corresponding relation.
According to the method of the embodiment of the present disclosure, the update statement to be converted is converted into a first update statement supported by a first database based on a first data definition, and the update statement to be converted is converted into a second update statement supported by a second database based on the first data definition, so that the data in the first database is updated based on the first update statement, and the index information related to the data in the first database in the second database is updated based on the second update statement. Therefore, the first database and the second database can be updated by inputting the update statement to be converted, program codes do not need to be written for the first database and the second database, the data updating efficiency can be improved, and the development cost can be saved. Moreover, the data processing method disclosed by the invention is adopted to process the internet product data, and is beneficial to meeting the requirement of updating the internet product data.
In one example, the update statement to be converted includes a first data definition identifier, and determining the first data definition corresponding to the update statement to be converted includes:
and determining a first data definition matched with the first data definition identifier from a plurality of preset data definitions based on the first data definition identifier of the updated statement to be converted.
The data definition is used for representing all fields contained in the data and attributes of the fields, wherein the attributes comprise field names, data types of the field values, value ranges of the field values and the like.
For example, if the statement to be converted is "method & module id &7 & _ grade ═ 1", where module id ═ 7 denotes that the first data definition of the update statement to be converted is identified as 7, the first data definition with the data definition identified as 7 may be obtained from a plurality of preset data definitions, such as the first data definition:
data a { field 1: attribute 1, Attribute 2, Attribute 3
Field 2: attribute 1, Attribute 2, Attribute 3
……
A field N: attribute 1, Attribute 2, Attribute 3}
Since the first data definition contains all fields of the data and the attributes of the fields, the fields and the attributes of the fields related to the update statement to be converted can be further determined from the first data definition.
In another example, the update statement to be converted may be packaged in a packaging manner of a conditional expression. For example, the statement to be updated of "data whose query price is greater than and equal to 50" is "method ═ retrieve & price: > -50". The to-be-converted update statement may be generated based on an input conditional expression for the front end, for example, if a price: > is input at a query control of the front end, the to-be-converted update statement may be generated.
The first database may support statements that may be SQL (Structured Query Language) statements, and the second database may support statements that may be DSL (Domain Specific Language) statements.
Because the field relevant to the update statement to be converted and the attribute of the field are determined based on the first data definition, the determined field and the attribute thereof are beneficial to converting the update statement to be converted into the first update statement and the second update statement, so that the first database updates data based on the first update statement, and the second database updates index information of the data based on the second update statement, program development aiming at the first database and the second database is avoided, and the data updating speed can be improved.
In another example, by presetting a new data definition and packaging an update statement to be converted for the new data definition, when the update statement to be converted is converted by the data processing method of the present disclosure, new data related to the new data definition is updated in the first database and index information of the new data is updated in the second database. For example, new data matching the new data definition is added in the first database and index information of the new data is added in the second database.
Therefore, the new data can be updated conveniently, a corresponding updating program does not need to be redesigned for the new data, and the data updating speed is improved.
In one embodiment, the update statement to be converted includes a plurality of statement conditions, and as shown in fig. 2, converting the update statement to be converted into a first update statement supported by a first database based on a first data definition includes:
s201, respectively converting a plurality of statement conditions based on a first data definition and a preset first conversion rule to obtain conversion results of the plurality of statement conditions;
s202, fusion processing is carried out on the conversion results of the statement conditions to obtain a first updating statement.
The sentence condition includes a conditional expression, and the sentence condition is converted to obtain a conversion result of the sentence condition, including:
inquiring related fields matched with the conditional expressions from the first data definition aiming at the conditional expressions in the update statement to be converted;
determining a target expression rule matched with the conditional expression from the first conversion rule;
and adding the key name of the relevant field and the field value in the conditional expression to the target expression rule to obtain a conversion result.
For example, if the conditional expression is "price: > 50", the queried key name is "price", and the target expression rule corresponding to the conditional expression is "key name ≧ field value", the obtained target expression is "price ≧ 50".
Further, the merging the conversion results of the statement conditions to obtain a first updated statement, including:
determining an operation statement rule corresponding to the statement to be converted and updated from the first conversion rule; the operation statement rule and the target expression rule have a nested relation;
and nesting the conversion result into an operation statement rule according to the nesting relation to obtain a first updating statement.
Based on this, the update statement to be converted can be converted into the first update statement supported by the first database, and then the data stored in the first database can be updated by using the first update statement, without program development for the first database, so that the update efficiency of the data can be improved, and the development cost can be reduced.
In one embodiment, the update statement to be converted includes a plurality of statement conditions, and as shown in fig. 3, converting the update statement to be converted into a second update statement supported by a second database includes:
s301, determining a target statement condition related to the index information from the statement conditions;
s302, converting the target statement based on the first data definition and a preset second conversion rule to obtain a conversion result of the target statement condition;
and S303, taking the conversion result of the target statement condition as a second updating statement.
The target statement condition related to the index information may be all statement conditions in the plurality of statement conditions, or may be a partial statement condition in the plurality of statement conditions, for example, the to-be-converted update statement includes "method ═ retrieve & _ subject ═ Chinese & _ grade & _ 3& _ core ═ 6", and the statement condition related to the index information in the to-be-converted update statement may be "method & _ subject & _ grade & _ 3", where the statement condition "method" indicates that the operation type is query.
The target statement condition comprises a conditional expression, the target statement is converted to obtain a conversion result of the target statement condition, and the conversion result comprises the following steps:
inquiring fields matched with the conditional expressions from the first data definition aiming at the conditional expressions in the target statement conditions;
determining a target statement rule matched with the data type of the field from a preset second conversion rule based on the operation type and the data type of the field in the target statement condition;
and adding the relevant information of the conditional expression into the target statement rule to obtain a conversion result of the target statement.
For example, for the conditional expression "grade ═ 3", the field queried from the first data definition to match is "grade: the data type — string type "may determine a query statement rule that conforms to the string type from a preset second conversion rule, and add" grade "and" 3 "in the conditional expression to the query statement rule to obtain a conversion result of the conditional expression" grade ═ 3 ".
In one example, the target sentence condition may include a plurality of, regarding a conversion result of the target sentence condition as a second update sentence, including:
and combining the conversion results of the multiple target statement conditions to form a second updating statement.
For example, for one conditional expression "grade ═ 3" corresponding to the target statement condition, the conversion result is query { stradingdata.value: 1, stradingdata.key: grade }, and for another conditional expression "subject ═ Chinese", the conversion result is query { stradingdata.value: Chinese, and stradingdata.key: subject }, respectively, and then the second updated statement formed by combination is query { object 1{ query { array { stradingdata.value: 1, stradingdata.key: grade }, object 2{ stradingdata.value: Chinese, and stradingdata.key: subject }.
Based on the mapping relation between the first data definition and the second conversion rule, the target statement condition related to the index information of the data in the update statement to be converted can be converted into the second update statement supported by the second database, so that the index information in the second database can be synchronously updated.
In one embodiment, the update statement to be converted includes at least one of an add statement to be converted, a modify statement to be converted, and a delete statement to be converted. Based on this, the data in the first database can be added, modified or deleted, and the index information of the data in the second database can be correspondingly added, modified or deleted, which is beneficial to improving the processing efficiency of adding, modifying or deleting the data and the index information thereof.
In one embodiment, as shown in fig. 4, the method further comprises:
s401, under the condition that the query statement to be converted is obtained, converting the query statement to be converted into a first query statement supported by a second database based on a second data definition;
s402, determining relevant information of target data matched with the first query statement based on index information of data stored in the second database;
and S403, acquiring the target data from the first database based on the related information of the target data.
Wherein the second data definition is determined from a preset plurality of data definitions based on the query statement to be converted.
The conversion of the query statement to be converted into the first query statement supported by the second database is the same as the conversion of the update statement to be converted, and is not described herein again.
The query statement conditions to be converted can also be packaged in a packaging mode of a conditional expression, so that the query conditions of the data can be flexibly adjusted to adapt to different query requirements.
In one example, the index information of the data stored in the second database has a corresponding relationship with the related information of the data, where the index information of the data may be a partial field name of the data and a field value thereof, the related information of the data is a data ID (Identity document) of the data, the index information matching the first query statement may be queried from the second database based on the first query statement, and the data ID may be determined based on the corresponding relationship between the index information and the data ID, so that the entire field name of the data corresponding to the data ID and the field value thereof may be obtained from the first database based on the data ID.
For example, the format of the index information of the data stored in the first database may be: data ID { field 1: 1, field value; field 2: field value 2, the data format stored in the second database may be: data ID { field 1: 1, field value; field 2: a field value of 2; field 3: field value 3 }. Assuming that the index information is stored in the first database: 01{ price: 10; grade: 1}, 02{ price: 11; grade: 1}, 03{ price: 9; grade: 1}. The second database stores corresponding data: 01{ price: 10; grade: 1; subject: chinese }, 02{ price: 11; grade: 1; subject: math }, 03{ price: 9; grade: 1; subject: chinese }.
If the data with the price larger than or equal to 10 needs to be queried by the query statement to be converted, 01{ price: 10; grade: 1}, 02{ price: 11; grade: 1, and further determines that the data IDs are 01 and 02. Further, all field names and field values of the corresponding data may be acquired from the first database based on 01 and 02.
In one example, the data may be saved in JSON (JSON Object Notation) format in the first database, for example, a plurality of pieces of data may be saved in the first database, pairs of fields and field values in each piece of data may be saved in JSON format as key value pairs, and a data ID may be set for each piece of data.
In this embodiment, when the query statement to be converted is obtained, the query statement to be converted can be converted into the first query statement supported by the second database, and the target data can be obtained from the first database based on the relevant information of the queried data. Therefore, the target data can be queried by inputting the query statement to be converted without compiling codes for the first database and the second database, so that the query efficiency of the data can be improved, and the development cost can be saved.
In one embodiment, obtaining the target data from the first database based on the related information of the target data includes:
determining a query statement rule from a preset second rule;
adding the relevant information of the target data into the query statement rule to obtain a second query statement supported by the first database;
target data is obtained from the first database based on the second query statement.
In one example, the related information of the target data is a data ID of the target data, a second query statement supported by the first database can be obtained by adding the data ID of the target data to a preset query statement rule, and when the second query statement is executed by the second database, the target data corresponding to the data ID can be obtained.
Based on the method, all fields and field values of the data are stored in the first database, the index information of the data is stored in the second database, the second database is used for inquiring the relevant information of the target data, and the target data is acquired from the first database based on the relevant information of the target data, so that the data in the first database does not need to be traversed in the inquiring process, and the inquiring efficiency is improved.
In an application scenario, the first database in the data processing method disclosed by the disclosure may be used to store internet product data, and the second database may be used to store index information of the internet product data, and different operation requirements for internet products (for example, adding new internet product data, modifying internet products with specific user tags, etc.) are encapsulated into an update statement to be converted or an inquiry statement to be converted, so that the internet product data can be quickly and correspondingly processed, the update efficiency required by the operation of the internet products can be effectively met, and the internet product data can be efficiently managed.
Fig. 5 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure. As shown in fig. 5, the data processing apparatus 500 includes:
a first conversion module 510, configured to convert the update statement to be converted into a first update statement supported by a first database based on a first data definition, and convert the update statement to be converted into a second update statement supported by a second database based on the first data definition; the first database and the second database support different statements;
and the updating module 520 is configured to update the data in the first database based on the first update statement, and update the index information of the data in the second database based on the second update statement, where the data and the index information of the data have a corresponding relationship.
Fig. 6 is a schematic diagram of an application example according to an embodiment of the present disclosure. As shown in fig. 6, the data definition module 610 may be adopted to store a plurality of preset data definitions, and the first determination module 640 is utilized to obtain a first data definition matching a first data definition identifier from the plurality of data definitions in the data definition module 610 based on the first data definition identifier in the update statement to be converted. The first update statement and the second update statement converted by the first conversion module 510 may be stored in the update module 520, the update module 520 sends the first update statement to the first database 620, so that the first database 620 executes the first update statement, and then updates the data in the first database 620, and the update module 520 sends the second update statement to the second database 630, so that the second database 630 executes the second update statement, and then updates the index information of the data in the second database 630 synchronously.
In one embodiment, the update statement to be converted includes a plurality of statement conditions, and the first conversion module 510 includes:
the first conversion submodule is used for respectively converting the plurality of statement conditions based on the first data definition and a preset first conversion rule to obtain conversion results of the plurality of statement conditions;
and the fusion processing submodule is used for carrying out fusion processing on the conversion results of the statement conditions to obtain a first updating statement.
In one embodiment, the update statement to be converted includes a plurality of statement conditions, and the first conversion module 510 includes:
a first determining submodule for determining a target sentence condition related to the index information from the plurality of sentence conditions;
the second conversion submodule is used for converting the target statement based on the first data definition and a preset second conversion rule to obtain a conversion result of the target statement condition;
and the second determining submodule is used for taking the conversion result of the target statement condition as a second updating statement.
In one embodiment, the update statement to be converted includes at least one of an add statement to be converted, a modify statement to be converted, and a delete statement to be converted.
In one embodiment, the apparatus further comprises:
the second determining module is used for determining a second data definition corresponding to the query statement to be converted under the condition of acquiring the query statement to be converted;
the second conversion module is used for converting the query statement to be converted into the first query statement supported by the second database based on the second data definition;
the third determining module is used for determining the relevant information of the target data matched with the first query statement based on the index information of the data stored in the second database;
and the acquisition module is used for acquiring the target data from the first database based on the related information of the target data.
In one embodiment, the obtaining module includes:
a third determining submodule, configured to determine a query statement rule from a preset second conversion rule;
the adding submodule is used for adding the relevant information of the target data into the query statement rule to obtain a second query statement supported by the first database;
and the obtaining sub-module is used for obtaining the target data from the first database based on the second query statement.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 707 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
A number of components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 707 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 executes the respective methods and processes described above, such as the data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 707. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the data processing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (15)

1. A method of data processing, comprising:
converting an update statement to be converted into a first update statement supported by a first database based on a first data definition, and converting the update statement to be converted into a second update statement supported by a second database based on the first data definition; the statements supported by the first database and the second database are different;
updating data in the first database based on the first updating statement, and updating index information of the data in the second database based on the second updating statement, wherein the data and the index information of the data have a corresponding relation.
2. The method of claim 1, wherein the first data definition is determined from a preset plurality of data definitions based on the update statement to be converted, the update statement to be converted includes a plurality of statement conditions, and the converting the update statement to be converted into a first update statement supported by a first database based on the first data definition comprises:
respectively converting the statement conditions based on the first data definition and a preset first conversion rule to obtain conversion results of the statement conditions;
and performing fusion processing on the conversion results of the statement conditions to obtain the first update statement.
3. The method of claim 1, wherein the update statement to be converted includes a plurality of statement conditions, and wherein converting the update statement to be converted into a second update statement supported by a second database includes:
determining a target statement condition related to the index information from a plurality of statement conditions;
converting the target statement based on the first data definition and a preset second conversion rule to obtain a conversion result of the target statement condition;
and taking the conversion result of the target statement condition as the second updating statement.
4. The method of claim 1, wherein the update statement to be converted comprises at least one of an add statement to be converted, a modify statement to be converted, and a delete statement to be converted.
5. The method of claim 1, further comprising:
under the condition that the query statement to be converted is obtained, converting the query statement to be converted into a first query statement supported by a second database based on a second data definition;
determining relevant information of target data matched with the first query statement based on index information of the data stored in the second database;
and acquiring the target data from the first database based on the related information of the target data.
6. The method of claim 5, wherein the second data definition is determined from a preset plurality of data definitions based on the query statement to be converted, and the obtaining the target data from the first database based on the relevant information of the target data comprises:
determining a query statement rule from a preset second conversion rule;
adding the relevant information of the target data into the query statement rule to obtain a second query statement supported by the first database;
obtaining the target data from the first database based on the second query statement.
7. A data processing apparatus comprising:
the first conversion module is used for converting the update statement to be converted into a first update statement supported by a first database based on a first data definition and converting the update statement to be converted into a second update statement supported by a second database based on the first data definition; the statements supported by the first database and the second database are different;
and the updating module is used for updating the data in the first database based on the first updating statement and updating the index information of the data in the second database based on the second updating statement, and the data and the index information of the data have a corresponding relation.
8. The apparatus of claim 7, wherein the first data definition is determined by a first determining module from a preset plurality of data definitions based on the update-to-be-converted statement, the update-to-be-converted statement comprising a plurality of statement conditions, and the first converting module comprises:
the first conversion submodule is used for respectively converting the statement conditions based on the first data definition and a preset first conversion rule to obtain conversion results of the statement conditions;
and the fusion processing submodule is used for carrying out fusion processing on the conversion results of the statement conditions to obtain the first updating statement.
9. The apparatus of claim 7, wherein the update statement to be translated comprises a plurality of statement conditions, the first translation module to:
a first determining submodule configured to determine a target sentence condition related to the index information from the plurality of sentence conditions;
a second conversion sub-module, configured to convert the target statement based on the first data definition and a preset second conversion rule, so as to obtain a conversion result of the target statement condition;
and the second determining submodule is used for taking the conversion result of the target statement condition as the second updating statement.
10. The apparatus according to claim 7, wherein the update statement to be converted comprises at least one of an add statement to be converted, a modify statement to be converted, and a delete statement to be converted.
11. The apparatus of claim 7, further comprising:
the second conversion module is used for converting the query statement to be converted into the first query statement supported by the second database based on a second data definition under the condition of acquiring the query statement to be converted;
a third determining module, configured to determine, based on the index information of the data stored in the second database, relevant information of target data that matches the first query statement;
an obtaining module, configured to obtain the target data from the first database based on the relevant information of the target data.
12. The apparatus of claim 11, wherein the second data definition is determined by a second determining module from a preset plurality of data definitions based on the query statement to be converted, and the obtaining module comprises:
a third determining submodule, configured to determine a query statement rule from a preset second conversion rule;
the adding sub-module is used for adding the relevant information of the target data into the query statement rule to obtain a second query statement supported by the first database;
an obtaining sub-module, configured to obtain the target data from the first database based on the second query statement.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-6.
CN202110121416.9A 2021-01-28 2021-01-28 Data processing method, device, electronic equipment and readable storage medium Active CN112817990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110121416.9A CN112817990B (en) 2021-01-28 2021-01-28 Data processing method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110121416.9A CN112817990B (en) 2021-01-28 2021-01-28 Data processing method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112817990A true CN112817990A (en) 2021-05-18
CN112817990B CN112817990B (en) 2024-03-08

Family

ID=75860002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110121416.9A Active CN112817990B (en) 2021-01-28 2021-01-28 Data processing method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112817990B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447156A (en) * 2015-11-30 2016-03-30 北京航空航天大学 Resource description framework distributed engine and incremental updating method
CN106777970A (en) * 2016-12-15 2017-05-31 北京锐软科技股份有限公司 The integrated system and method for a kind of medical information system data template
WO2017088358A1 (en) * 2015-11-26 2017-06-01 华为技术有限公司 Distributed database processing method and device
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN107844581A (en) * 2017-11-13 2018-03-27 成都蓝景信息技术有限公司 A kind of multi-resources Heterogeneous data fusion platform
US20180150533A1 (en) * 2016-11-29 2018-05-31 Salesforce.Com, Inc. Systems and methods for updating database indexes
CN108121757A (en) * 2017-11-10 2018-06-05 广州优视网络科技有限公司 A kind of method of data synchronization, device, system, computing device and storage medium
CN109271428A (en) * 2018-09-11 2019-01-25 北京市计算中心 Data pick-up method and method for exhibiting data based on geography information
CN110309196A (en) * 2019-05-22 2019-10-08 深圳壹账通智能科技有限公司 Block chain data storage and query method, apparatus, equipment and storage medium
CN110334147A (en) * 2019-05-20 2019-10-15 中国平安财产保险股份有限公司 A kind of method of data synchronization and device
CN110647562A (en) * 2019-09-29 2020-01-03 中国联合网络通信集团有限公司 Data query method and device, electronic equipment and storage medium
CN111367893A (en) * 2020-03-31 2020-07-03 中国建设银行股份有限公司 Method and device for database version iteration
US10719667B1 (en) * 2015-06-30 2020-07-21 Google Llc Providing a natural language based application program interface

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10719667B1 (en) * 2015-06-30 2020-07-21 Google Llc Providing a natural language based application program interface
WO2017088358A1 (en) * 2015-11-26 2017-06-01 华为技术有限公司 Distributed database processing method and device
CN105447156A (en) * 2015-11-30 2016-03-30 北京航空航天大学 Resource description framework distributed engine and incremental updating method
US20180150533A1 (en) * 2016-11-29 2018-05-31 Salesforce.Com, Inc. Systems and methods for updating database indexes
CN106777970A (en) * 2016-12-15 2017-05-31 北京锐软科技股份有限公司 The integrated system and method for a kind of medical information system data template
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN108121757A (en) * 2017-11-10 2018-06-05 广州优视网络科技有限公司 A kind of method of data synchronization, device, system, computing device and storage medium
CN107844581A (en) * 2017-11-13 2018-03-27 成都蓝景信息技术有限公司 A kind of multi-resources Heterogeneous data fusion platform
CN109271428A (en) * 2018-09-11 2019-01-25 北京市计算中心 Data pick-up method and method for exhibiting data based on geography information
CN110334147A (en) * 2019-05-20 2019-10-15 中国平安财产保险股份有限公司 A kind of method of data synchronization and device
CN110309196A (en) * 2019-05-22 2019-10-08 深圳壹账通智能科技有限公司 Block chain data storage and query method, apparatus, equipment and storage medium
CN110647562A (en) * 2019-09-29 2020-01-03 中国联合网络通信集团有限公司 Data query method and device, electronic equipment and storage medium
CN111367893A (en) * 2020-03-31 2020-07-03 中国建设银行股份有限公司 Method and device for database version iteration

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
席洁;: "数据库优化技术的分析与探讨", 电脑知识与技术, no. 12 *
段慧芳;汤小春;: "基于路径索引的密集邻域图数据查询方法研究", 计算机应用研究, no. 12 *

Also Published As

Publication number Publication date
CN112817990B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
CN113342345A (en) Operator fusion method and device of deep learning framework
CN111177231A (en) Report generation method and report generation device
CN110689268B (en) Method and device for extracting indexes
CN114120414B (en) Image processing method, image processing apparatus, electronic device, and medium
CN115686850A (en) Spark-based target task processing method and device and electronic equipment
CN114201242A (en) Method, apparatus, device and storage medium for processing data
CN113836314A (en) Knowledge graph construction method, device, equipment and storage medium
CN115222444A (en) Method, apparatus, device, medium and product for outputting model information
CN113312539B (en) Method, device, equipment and medium for providing search service
CN114064925A (en) Knowledge graph construction method, data query method, device, equipment and medium
CN114461658A (en) Name determination method, apparatus, device, program product, and storage medium
CN114048315A (en) Method and device for determining document tag, electronic equipment and storage medium
CN113609100A (en) Data storage method, data query method, data storage device, data query device and electronic equipment
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN114330718B (en) Method and device for extracting causal relationship and electronic equipment
CN112817990B (en) Data processing method, device, electronic equipment and readable storage medium
CN115329150A (en) Method and device for generating search condition tree, electronic equipment and storage medium
CN110764768A (en) Method and device for mutual conversion between model object and JSON object
CN115328917A (en) Query method, device, equipment and storage medium
CN115167855A (en) Front-end page generation method, device and equipment applied to matching transaction system
CN114116924A (en) Data query method based on map data, map data construction method and device
CN113239273A (en) Method, device, equipment and storage medium for generating text
CN113138760A (en) Page generation method and device, electronic equipment and medium
CN113515504B (en) Data management method, device, electronic equipment and storage medium
CN114330364B (en) Model training method, intention recognition device 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
GR01 Patent grant
GR01 Patent grant