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

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

Info

Publication number
CN112817990B
CN112817990B CN202110121416.9A CN202110121416A CN112817990B CN 112817990 B CN112817990 B CN 112817990B CN 202110121416 A CN202110121416 A CN 202110121416A CN 112817990 B CN112817990 B CN 112817990B
Authority
CN
China
Prior art keywords
data
statement
database
converted
target
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.)
Active
Application number
CN202110121416.9A
Other languages
Chinese (zh)
Other versions
CN112817990A (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

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, a data processing 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 the first database based on the first data definition, and converting the update statement to be converted into a second update statement supported by the second database based on the first data definition; the first database is different from sentences supported by the second database; the data in the first database is updated based on the first updating statement, the index information of the data in the second database is updated based on the second updating statement, and 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, 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
Internet products are goods produced for business in the internet field, and related information of the internet products is generally stored as internet product data to record the related information of the internet products. Wherein the internet product data is generally configured with a plurality of fields (e.g., merchandise ID, shop name, cover, user tag, etc.). In the operation process, internet product data needs to be processed frequently according to different operation requirements, for example, the covers of internet products are replaced, the internet product data with specific user labels are screened out, and the like.
Currently, internet product data is basically stored in a database in the form of a database table, and processing of the internet product data is basically performed by programming the database. Because of the long development time required for programming, it is difficult to satisfy the data update efficiency required for the operation of the internet product.
Disclosure of Invention
The disclosure provides a data processing method, a data processing device, electronic equipment and a readable storage medium.
According to a first aspect of the present disclosure, there is provided a data processing method comprising:
converting the update statement to be converted into a first update statement supported by the first database based on the first data definition, and converting the update statement to be converted into a second update statement supported by the second database based on the first data definition; the first database is different from sentences supported by the second database;
the data in the first database is updated based on the first updating statement, the index information of the data in the second database is updated based on the second updating statement, and 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 the first database based on the first data definition and converting the update statement to be converted into a second update statement supported by the second database based on the first data definition; the first database is different from sentences supported by the second database;
the updating module is used for updating the data in the first database based on the first updating statement, 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 the method of 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 storing computer instructions for causing a computer to perform the method of 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 of 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 description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for 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 one embodiment of the disclosure;
FIG. 3 is a schematic diagram of determining a second update statement in accordance with one embodiment of the disclosure;
FIG. 4 is a schematic diagram of acquiring 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 example application 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 in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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 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 is different from sentences supported by the second database;
s102, updating data in a first database based on a first updating statement, and updating index information of the data in a second database based on a 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 disclosure, the update statement to be converted is converted into the first update statement supported by the first database based on the first data definition, and the update statement to be converted is converted into the second update statement supported by the 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 are not required to be written for the first database and the second database, the data updating efficiency can be improved, and the development cost is saved. Furthermore, the data processing method disclosed by the invention is used for processing the Internet product data, so that the Internet product data updating requirement can be met.
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 update statement to be converted.
Wherein, the data definition is used for representing all fields contained in the data and the attributes of the fields, and the attributes comprise field names, data types of field values, value ranges of the field values and the like.
For example, the statement to be converted is "method=retrieve & module id=7 &_grade=1", where module id=7 indicates that the first data definition identifier of the update statement to be converted is 7, and the first data definition whose data definition identifier is 7 may be obtained from a plurality of preset data definitions, for example, the first data definition is:
data a { field 1: attribute 1, attribute 2, attribute 3
Field 2: attribute 1, attribute 2, attribute 3
……
Field N: attribute 1, attribute 2, attribute 3}
Since all fields of the data and the attributes of the fields thereof are contained in the first data definition, the fields related to the update statement to be converted and the attributes of the fields can be further determined from the first data definition.
In another example, the update statement to be converted may be packaged in a conditional expression packaging manner. For example, the statement to be updated of "data having a price greater than and equal to 50" is "method=retrieve & price: > =50". The update statement to be converted can be generated based on the input conditional expression for the front end, for example, the update statement to be generated can be generated by inputting a price: > =50 at the query control of the front end.
The first database-supported statements may be SQL (Structured Query Language ) statements and the second database-supported statements may be DSL (Domain Specific Language, domain-specific language) statements.
Because the fields related to the update statement to be converted and the attributes of the fields are determined based on the first data definition, the determined fields and the attributes 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 on the first database and the second database respectively is avoided, and the updating speed of the data can be improved.
In another example, by presetting a new data definition and encapsulating 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 to the first database and index information of the new data is added to the second database.
Therefore, the updating of the new data is facilitated, a corresponding updating program is not required to be redesigned for the new data, and the updating speed of the data is improved.
In one embodiment, the update statement to be converted includes a plurality of statement conditions, as shown in fig. 2, based on the first data definition, converting the update statement to be converted into a first update statement supported by the first database, including:
s201, respectively converting a plurality of sentence conditions based on a first data definition and a preset first conversion rule to obtain conversion results of the sentence conditions;
s202, fusion processing is carried out on the conversion results of the sentence conditions, and a first updated sentence is obtained.
The sentence condition includes a conditional expression, and the sentence condition is converted to obtain a conversion result of the sentence condition, including:
inquiring a related field matched with the conditional expression from the first data definition aiming at the conditional expression 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 related field and the field value in the conditional expression into the target expression rule to obtain a conversion result.
For example, the conditional expression is "price: > =50", the queried key name is "price", the target expression rule corresponding to the conditional expression is "key name is ≡field value", and the obtained target expression is "price ≡50".
Further, fusion processing is performed on the conversion results of the plurality of sentence conditions to obtain a first updated sentence, including:
determining an operation sentence rule corresponding to the update sentence to be converted from the first conversion rule; the operation sentence rule and the target expression rule have a nested relation;
and embedding the conversion result into the operation statement rule according to the embedding relation to obtain a first updated statement.
Based on the method, the to-be-converted update statement can be converted into the first update statement supported by the first database, so that the data stored in the first database can be updated by using the first update statement, program development is not required for the first database, the data updating efficiency can be improved, and the development cost is reduced.
In one embodiment, the update statement to be converted includes a plurality of statement conditions, as shown in fig. 3, converting the update statement to be converted into a second update statement supported by a second database, including:
s301, determining target sentence conditions related to index information from a plurality of sentence conditions;
s302, converting the target sentence based on the first data definition and a preset second conversion rule to obtain a conversion result of the target sentence condition;
s303, taking the conversion result of the target sentence condition as a second update sentence.
The target sentence condition related to the index information may be all sentence conditions of the plurality of sentence conditions, or may be part of sentence conditions of the plurality of sentence conditions, for example, the update sentence to be converted includes "method=retrieve &_subject=product &_grade=3 &_compound=6", and the sentence condition related to the index information in the update sentence to be converted may be "method=retrieve &_subject=product & _grade=3", where the sentence condition "method=retrieve" indicates that the operation type is a query.
The target sentence condition comprises a conditional expression, and the target sentence is converted to obtain a conversion result of the target sentence condition, which comprises the following steps:
for a conditional expression in the target statement condition, querying a field matched with the conditional expression from the first data definition;
determining a target sentence rule matched with the data type of the field from a preset second conversion rule based on the operation type in the target sentence condition and the data type of the field;
and adding the related information of the conditional expression into the target sentence rule to obtain a conversion result of the target sentence.
For example, for the conditional expression "grade=3", the query from the first data definition for a matching field is "grade: the data type-character string type "can determine a query sentence rule conforming to the character string type from a preset second conversion rule, and then add" grade "and" 3 "in the conditional expression to the query sentence rule to obtain a conversion result of the conditional expression" grade=3 ".
In one example, the target sentence condition may include a plurality of, including:
and combining the conversion results of the plurality of target sentence conditions to form a second updated sentence.
For example, for one conditional expression "grade=3" corresponding to the target sentence condition, the conversion result is query { structdata.value: 1, structdata.key: grade }, for another conditional expression "subject=Chinese" corresponding to the target sentence condition, the conversion result is query { structdata.value: chinese, structdata.key: subject }, respectively, and then the combined second update sentence is query { object 1{ request { structdata.value: 1, structdata.key: grade }, object 2{ request { structdata.value: chinese, structdata.key: subject }.
Based on the above, the mapping relation between the first data definition and the second conversion rule is utilized, and 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 is 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 the method, the data in the first database can be subjected to addition, modification or deletion, and the index information of the data in the second database can be subjected to corresponding addition, modification or deletion, so that the processing efficiency of the addition, modification or deletion of the data and the index information of the data is improved.
In one embodiment, as shown in fig. 4, the method further comprises:
s401, under the condition that query sentences to be converted are obtained, converting the query sentences to be converted into first query sentences 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;
s403, acquiring target data from the first database based on the related information of the target data.
Wherein the second data definition is determined from a plurality of preset 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 method for the update statement to be converted, and will not be described herein.
The query statement conditions to be converted can also be packaged in a conditional expression packaging mode, so that the query conditions of the data can be flexibly adjusted to adapt to different query requirements.
In one example, index information of data stored in the second database has a corresponding relationship with related information of the data, wherein the index information of the data can be a part of field names and field values of the data, the related information of the data is a data ID (Identity document, identity number) of the data, the index information matched with the first query statement can be queried from the second database based on the first query statement, and further the data ID can be determined based on the corresponding relationship between the index information and the data ID, so that all field names and field values of the data corresponding to the data ID can be acquired 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: a field value of 1; field 2: field value 2, the data format stored in the second database may be: data ID { field 1: a field value of 1; field 2: a field value of 2; field 3: field value 3}. Assume that index information is stored in a first database: 01{ price:10; grade:1, 02{ price:11; grade:1, 03{ price:9, a step of performing the process; grade:1}. The second database stores corresponding data: 01{ price:10; grade:1, a step of; the Subject: chinese },02{ price:11; grade:1, a step of; the Subject: math },03{ price:9, a step of performing the process; grade:1, a step of; the Subject: chinese }.
If the data with the price greater than or equal to 10 is to be queried by using the query statement to be converted, a 01{ price can be queried from the second database: 10; grade:1, 02{ price:11; grade:1, and further determines that the data IDs are 01 and 02. Further, all field names of the corresponding data and field values thereof may be acquired from the first database based on 01 and 02.
In one example, the data may be saved in JSON (JavaScript Object Notation, JS object profile) 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 are saved in JSON format as key value pairs, and a data ID is 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 related information of the queried data. Therefore, the target data can be queried by inputting the query statement to be converted, codes are not required to be written for the first database and the second database, the query efficiency of the data can be improved, and the development cost is saved.
In one embodiment, obtaining the target data from the first database based on information related to the target data includes:
determining a query statement rule from a preset second rule;
adding the related 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, the 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 database executes the second query statement, 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, index information of the data is stored in the second database, then related information of target data is queried by the second database, and the target data is acquired from the first database based on the related information of the target data, so that data in the first database does not need to be traversed in the query process, and the query efficiency is improved.
In an application scenario, the first database in the data processing method disclosed by the disclosure can be adopted to store internet product data, and the second database is adopted to store index information of the internet product data, so that different operation requirements (such as adding new internet product data, modifying internet products with specific user labels, and the like) for the internet products are packaged into an update statement to be converted or a query statement to be converted, the corresponding processing can be rapidly performed on the internet product data, the update efficiency required by the operation of the internet products can be effectively met, and the efficient management of the internet product data is facilitated.
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, based on a first data definition, an update sentence to be converted into a first update sentence supported by a first database, and convert, based on the first data definition, the update sentence to be converted into a second update sentence supported by a second database; the first database is different from sentences supported by the second database;
the updating module 520 is configured to update the data in the first database based on the first update statement, update the index information of the data in the second database based on the second update statement, and have a correspondence relationship with the index information of the data.
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 used to store a preset plurality of data definitions, and the first determination module 640 may be used to obtain, based on the first data definition identifier in the update statement to be converted, a first data definition matching the first data definition identifier from the plurality of data definitions in the data definition module 610. The first update statement and the second update statement converted by the first conversion module 510 may be stored in the update module 520, where 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 to update 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 to update 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 sub-module 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 sub-module is used for carrying out fusion processing on the conversion results of the statement conditions to obtain a first updated 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, configured to determine a target sentence condition related to the index information from a plurality of sentence conditions;
the second conversion sub-module is used for converting the target sentence based on the first data definition and a preset second conversion rule to obtain a conversion result of the target sentence condition;
and the second determination submodule is used for taking the conversion result of the target statement condition as a second update 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 that the query statement to be converted is acquired;
the second conversion module is used for converting the query statement to be converted into a first query statement supported by the second database based on the second data definition;
the third determining module is used for determining relevant information of the target data matched with the first query statement based on 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 acquisition module includes:
the third determining submodule is used for determining a query statement rule from a preset second conversion rule;
the adding sub-module is used for adding the related information of the target data into the query statement rule to obtain a second query statement supported by the first database;
and the acquisition sub-module is used for acquiring the target data from the first database based on the second query statement.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary 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 that 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 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input output (I/O) interface 705 is also connected to bus 704.
Various 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, etc.; 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 through a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of 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, etc. The computing unit 701 performs the respective methods and processes described above, such as a data processing method. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the 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 a computer program is loaded into RAM 703 and executed by 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 circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 pointing device (e.g., a mouse or 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 may 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 background 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 background, 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 a client and a server. The client and server are typically 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 appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A data processing method, comprising:
based on a first data definition and a preset first conversion rule, converting a plurality of statement conditions respectively to obtain conversion results of the statement conditions; fusion processing is carried out on the conversion results of the statement conditions to obtain a first updated statement supported by a first database; wherein the first data definition is determined from a plurality of preset data definitions based on an update statement to be converted, and the update statement to be converted comprises a plurality of statement conditions;
determining target sentence conditions related to the index information from a plurality of sentence conditions; converting the target sentence condition based on the first data definition and a preset second conversion rule to obtain a conversion result of the target sentence condition; taking the conversion result of the target sentence condition as a second update sentence supported by a second database; wherein the first database is different from the sentences supported by the second database;
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.
2. The method of claim 1, the update statement to be converted comprising at least one of an add statement to be converted, a modify statement to be converted, and a delete statement to be converted.
3. The method of claim 1, further comprising:
under the condition that query sentences to be converted are obtained, converting the query sentences to be converted into first query sentences supported by a second database based on a second data definition;
determining related information of target data matched with the first query statement based on index information of the data stored in the second database;
the target data is acquired from the first database based on the related information of the target data.
4. A method according to claim 3, wherein the second data definition is determined from a plurality of data definitions preset based on the query statement to be converted, 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 related information of the target data into the query statement rule to obtain a second query statement supported by the first database;
the target data is obtained from the first database based on the second query statement.
5. A data processing apparatus comprising:
the first conversion module 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; fusion processing is carried out on the conversion results of the statement conditions to obtain a first updated statement supported by a first database; wherein the first data definition is determined from a plurality of preset data definitions based on an update statement to be converted, and the update statement to be converted comprises a plurality of statement conditions;
the first conversion module is further used for determining target statement conditions related to the index information from a plurality of statement conditions; converting the target sentence condition based on the first data definition and a preset second conversion rule to obtain a conversion result of the target sentence condition; taking the conversion result of the target sentence condition as a second update sentence supported by a second database; wherein the first database is different from the sentences supported by the second database;
and the updating module is used for updating the data in the first database based on the first updating statement, 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.
6. The apparatus of claim 5, the update statement to be converted comprising at least one of an add statement to be converted, a modify statement to be converted, and a delete statement to be converted.
7. The apparatus of claim 5, further comprising:
the second conversion module is used for converting the query statement to be converted into a first query statement supported by the second database based on a second data definition under the condition that the query statement to be converted is acquired;
a third determining module, configured to determine related information of target data matched with the first query statement based on 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.
8. The apparatus of claim 7, wherein the second data definition is determined by a second determining module from a plurality of preset data definitions based on the query statement to be converted, and the acquiring module includes:
the third determining submodule is used for determining a query statement rule from a preset second conversion rule;
an adding sub-module, configured to add relevant information of the target data to the query statement rule, to obtain a second query statement supported by the first database;
and the acquisition sub-module is used for acquiring the target data from the first database based on the second query statement.
9. 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-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-4.
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 CN112817990A (en) 2021-05-18
CN112817990B true 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 (12)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10726039B2 (en) * 2016-11-29 2020-07-28 Salesforce.Com, Inc. Systems and methods for updating database indexes

Patent Citations (12)

* 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
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
基于路径索引的密集邻域图数据查询方法研究;段慧芳;汤小春;;计算机应用研究(第12期);全文 *
数据库优化技术的分析与探讨;席洁;;电脑知识与技术(第12期);全文 *

Also Published As

Publication number Publication date
CN112817990A (en) 2021-05-18

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
CN114120414B (en) Image processing method, image processing apparatus, electronic device, and medium
CN110689268A (en) Method and device for extracting indexes
CN114816393B (en) Information generation method, device, equipment and storage medium
CN111259107A (en) Storage method and device of determinant text and electronic equipment
CN113836314A (en) Knowledge graph construction method, device, equipment and storage medium
CN113868273B (en) Metadata snapshot method and device
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
CN112926008B (en) Method, device, electronic equipment and storage medium for generating form page
CN116302218B (en) Function information adding method, device, equipment and storage medium
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN112817990B (en) Data processing method, device, electronic equipment and readable storage medium
CN114491253B (en) Method and device for processing observation information, electronic equipment and storage medium
CN115328917A (en) Query method, device, equipment and 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
CN114116924A (en) Data query method based on map data, map data construction method and device
CN114036397A (en) Data recommendation method and device, electronic equipment and medium
CN110866002A (en) Method and device for processing sub-table data
CN117931195A (en) Data dictionary processing method and device, electronic equipment and storage medium
CN113010182B (en) Method and device for generating upgrade file and electronic equipment
CN113032402B (en) Method, device, equipment and storage medium for storing data and acquiring data

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