CN107463693B - Data processing method, device, terminal and computer readable storage medium - Google Patents

Data processing method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN107463693B
CN107463693B CN201710684861.XA CN201710684861A CN107463693B CN 107463693 B CN107463693 B CN 107463693B CN 201710684861 A CN201710684861 A CN 201710684861A CN 107463693 B CN107463693 B CN 107463693B
Authority
CN
China
Prior art keywords
data
identifier
target
database
identification
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
CN201710684861.XA
Other languages
Chinese (zh)
Other versions
CN107463693A (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.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software 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 Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN201710684861.XA priority Critical patent/CN107463693B/en
Publication of CN107463693A publication Critical patent/CN107463693A/en
Application granted granted Critical
Publication of CN107463693B publication Critical patent/CN107463693B/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

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

Abstract

The invention discloses a data processing method, a device, a terminal and a computer readable storage medium, wherein the method comprises the following steps: acquiring a first data identifier from a database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier; determining a target database identifier and a target data table identifier according to the data position identifier; searching target data according to the target database identifier, the target data table identifier and the target data identifier; a database query statement is executed on the target data. The embodiment of the invention can convert the target data identification into the corresponding target database and the target data table, thereby realizing the data storage mode of multiple database and multiple data tables of the relational database. When the data is stored in a multi-database multi-data table storage mode, the data amount stored in each data table is far smaller than the data amount stored in the data table when a single database is used in the prior art, so that the target data can be searched more quickly, and the data reading and writing efficiency is improved.

Description

Data processing method, device, terminal and computer readable storage medium
Technical Field
Embodiments of the present invention relate to database technologies, and in particular, to a data processing method, an apparatus, a terminal, and a computer-readable storage medium.
Background
With the rapid development of financial business, data related to the financial business is increased in a blowout manner. For example, asset management systems for storing and managing financial transaction data require that the amount of stored asset data rapidly increase from tens of millions of indices to trillions of numbers.
Because the asset management system uses the relational database for operation and maintenance, and the used database adopts a single-database single-table data storage technology, the existing database storage technology cannot meet the current trillion-level data volume requirement along with the well blowout type increase of data volume, and the data reading and writing efficiency is low.
Disclosure of Invention
The invention provides a data processing method, a data processing device, a terminal and a computer readable storage medium, which are used for improving the data reading and writing efficiency in a database.
In a first aspect, an embodiment of the present invention provides a data processing method, including:
acquiring a first data identifier from a database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier;
determining a target database identifier and a target data table identifier according to the data position identifier;
searching target data according to the target database identifier, the target data table identifier and the target data identifier;
a database query statement is executed on the target data.
Further, determining the target database identifier and the target data table identifier according to the data location identifier includes:
determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification;
and determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit.
Further, determining the target database identifier and the target data table identifier according to the data location identifier includes:
and determining a value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
Further, the data position identification comprises four flag bits; determining a target database identifier and a target data table identifier according to the data location identifier, including:
determining a first zone bit in the data position identification as an extension bit;
determining a second zone bit and a third zone bit in the data position identification as a target database identification;
and determining the fourth zone bit in the data position identification as the target data table identification.
Further, searching the target data according to the target database identifier, the target data table identifier and the target data identifier includes:
generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier;
replacing the first data identifier in the database query statement with a second data identifier;
and searching target data according to the second data identification.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus, including:
the data position identification module is used for acquiring a first data identification from a database query statement, wherein the first data identification comprises a target data identification and a data position identification;
the target identification determining module is used for determining a target database identification and a target data table identification according to the data position identification acquired by the data position identification acquiring module;
the target data searching module is used for searching target data according to the target database identifier, the target data table identifier and the target data identifier determined by the target identifier determining module;
and the database statement execution module is used for executing database query statements on the target data searched by the target data search module.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method as shown in the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the data processing method shown in the first aspect.
The embodiment of the invention can acquire the first data identifier from the database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier; determining a target database identifier and a target data table identifier according to the data position identifier; searching target data according to the target database identifier, the target data table identifier and the target data identifier; and executing database query statements on the target data so as to realize a relational database storage mode of multiple databases and multiple data tables. Compared with the data storage mode of a single database and a single data table in the prior art, the data storage method and the data storage device can convert the target data identification into the corresponding target database and the target data table, and further realize the data storage mode of multiple data tables of multiple databases of the relational database. For the same data volume, when the data volume is stored in a multi-database multi-data table storage mode, the data volume stored in each data table is far smaller than the data volume stored in the data table in the single-database single-table storage mode in the prior art, and therefore in each data access process, the target data can be searched more quickly, and the data reading and writing efficiency is improved.
Drawings
FIG. 1 is a flow chart of a data processing method in an embodiment of the invention;
FIG. 2 is a flow chart of another data processing method in an embodiment of the invention;
FIG. 3 is a flow chart of another data processing method in an embodiment of the invention;
FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a mobile terminal in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
At present, in the field of financial business, a relational database is generally used for storing and managing asset information related to financial business. In the prior art, asset information is stored in a single-library single-table storage mode. However, as the well-blowout type of asset information increases, the existing single-library single-table mode cannot respond to data access in time. Based on the above, the embodiment of the invention provides a data storage mode of a multi-library multi-table relational database, which is used for storing and processing asset information.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention, where the embodiment is applicable to a case where a relational database is used to store and manage asset information of a financial system, the method may be executed by a terminal storing the database, where the terminal may be a smart phone, a tablet computer, a personal computer, and the like, and the method specifically includes the following steps:
step 110, obtaining a first data identifier from the database query statement, where the first data identifier includes a target data identifier and a data location identifier.
The database query statement is used for reading data from the database, writing data into the database, querying the data and the like. The database query statement corresponds to a database, and for example, a Structured Query Language (SQL) statement may be used as the database query statement for a relational database.
And when the foreground interface receives user input or queries, reads or writes generated according to user behaviors, generating corresponding database query statements. The data query statement includes an operation type and an operation object. The operation type may be a select operation (select), write (write) or read (read), etc. And identifying the first data of the bronze drum as an operation object.
In one implementation, the first data identification includes a target data identification and a data location identification. The target data identification is followed by a data location identification. In the asset business field, the target data identifier may be an asset identifier, and may be used as a target data identifier through an asset serial number. The data location identification is used for schematically representing a database and a data table where the target data is located.
And step 120, determining the target database identification and the target data table identification according to the data position identification.
After the first data identifier is obtained in step 110, the data position identifier in the first data identifier is analyzed. The analytic expression can read the data position identification according to the data bit corresponding to the preset data position identification. The data position identification can be identified from the first data identification according to the preset data identification.
Optionally, the data position identifier is in a digital format, and may also be in a text format. The data location identification may be through multiple databases and multiple data tables at the hash table mapping.
In one implementation, step 120 may be implemented by:
firstly, determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification; and then, determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit.
The number of bits of the first flag bit is determined by the number of databases, and the number of bits of the first flag bit can identify all existing databases. The number of bits of the second flag bit is determined by the number of data tables, and the number of bits of the second flag bit can identify all the existing data tables. For example, if there are currently 30 databases, the two first flag bits are used to represent all the databases. If each database has 30 data tables, the two second flag bits can represent all the data tables. At this time, the data position identifier is composed of two first flag bits and two second flag bits, and the first flag bits are adjacent to the second flag bits. The first flag is located adjacent to the second flag, and may be the first flag before the second flag, or the second flag before the first flag. The first flag bits are consecutive, and the second flag bits are also consecutive.
In use, it is found that at present, the amount of asset data is increased sharply, and in order to improve the expandability of the databases, and to keep the number of data tables in each database and the number of entries in each data table from being too high, the data location identifier may be extended in the following manner:
and determining a value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
The third flag bit may be used for expansion, and the number of the third flag bits is not limited, and may be one or more. When the extension bit is used as the extension bit of the first flag bit, the third flag bit may be located before the first flag bit or after the first flag bit. When the extension bit is used as the extension bit of the second flag bit, the third flag bit may be located before the second flag bit or after the second flag bit.
Each time an extension bit is used, the corresponding data carrier will have an order of magnitude more identification means. Illustratively, if two first flag bits and one extension bit are currently provided, and each flag bit is represented by a 10-ary number, the number of currently representable databases is 100, and if the extension bit is enabled, the number of databases that can be represented is 1000, so that the usable databases are greatly increased, and the resource utilization rate is improved.
And step 130, searching target data according to the target database identifier, the target data table identifier and the target data identifier.
The same target data identifier may exist in different data tables, and a plurality of records corresponding to the same data identifier may also exist in the same data table. In the same data table, records with the same data identification are used for recording records corresponding to assets in different service stages. Wherein, the business stage of the assets comprises auditing, financing, remittance, pipelining and the like.
In one implementation, when searching for target data, the target database is first searched for according to the target database identifier, then a target data table corresponding to the target data identifier table identifier in the target database is accessed, and finally a plurality of records with the target data identifier are searched for in the target data table. And according to the current asset service stage, searching the target data in the plurality of records.
The above embodiments describe a process for reading target data after intercepting a database query statement. In another implementation, after intercepting the database query statement, the data location identifier in the database query statement may be analyzed to obtain the address of the target data. And then generating a new data identifier according to the address of the target data obtained by analysis and feeding back the new data identifier to the database system, so that the database system can access the target data according to the new data identifier according to a self-contained data access mechanism. Specifically, as shown in fig. 2, the following steps may be performed:
and 131, generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier.
The second data identification may be in a format recognizable by the database system. Because of the data format contained in the first data identifier, the real address is abbreviated to save storage space or facilitate input, and thus is not necessarily recognizable to the database. Step 131 thus generates a second data identifier after obtaining the target database identifier and the target data table identifier. The second data identifier may include a name of a real database in the database corresponding to the target database identifier and a name of a real data table in the data table corresponding to the target data table identifier.
Step 132, replacing the first data identifier in the database query statement with the second data identifier.
And deleting the first data identifier in the database query statement acquired in the step 110, and then adding the second data identifier to the position of the first data identifier. Or, a new database query statement is generated according to the type of the original database query statement (the database query statement obtained in step 110), the type of the new database query statement is consistent with that of the original database query statement, and the execution object of the new database query statement is the target data represented by the second data identifier.
And step 133, searching target data according to the second data identification.
And feeding back the new database query statement containing the second data identifier to the database system. And the database system operates the target data pointed by the second data identification according to the new database query statement.
Step 140, execute a database query statement on the target data.
The data processing method provided by this embodiment can obtain a first data identifier from a database query statement, where the first data identifier includes a target data identifier and a data location identifier; determining a target database identifier and a target data table identifier according to the data position identifier; searching target data according to the target database identifier, the target data table identifier and the target data identifier; and executing database query statements on the target data so as to realize a relational database storage mode of multiple databases and multiple data tables. Compared with the data storage mode of a single database and a single data table in the prior art, the data storage method can convert the target data identifier into the corresponding target database and the corresponding target data table, and further realize the data storage mode of multiple database and multiple data tables of the relational database. For the same data volume, when the data volume is stored in a multi-database multi-data table storage mode, the data volume stored in each data table is far smaller than the data volume stored in the data table in the single-database single-table storage mode in the prior art, and therefore in each data access process, the target data can be searched more quickly, and the data reading and writing efficiency is improved.
As further described below by a usage scenario, in the usage scenario, the data location identifier includes four flag bits, a first flag bit is an extension bit, a second flag bit and a third flag bit are target database identifiers, and a fourth flag bit is a target data table identifier, as shown in fig. 3, the method includes:
and step 200, establishing a database example.
An example database is created, comprising 100 databases, each database comprising 10 tables.
The naming format of each database is: the database names _ XX, XX are two-digit numbers from 00 to 99.
The naming format of each table is: data table name _ X, X is a one-digit number from 0 to 9.
Totaling 1000 database tables.
And 210, generating a data position identifier corresponding to each asset information.
The data location identification is formed by a random number with four bits. The first bit of the four-bit random number is an extension bit, the second bit and the third bit correspond to a target database where the asset information is located, and the fourth bit corresponds to a target data table where the asset information is located.
And step 220, determining a first data identifier corresponding to each asset information according to the data position identifier.
And generating an asset ID as a first data identifier of asset information corresponding to the asset for each asset. The last four digits of the "asset ID" are 4 random numbers.
Illustratively, the asset ID is: asset serial number + XXXX. Wherein, the asset serial number is a character string combining English letters and numbers, and XXXX is a four-digit number.
Step 230, when the asset information access requirement is triggered, a database query statement is generated.
Wherein the database query statement includes a first data identification.
The database query statement may be an SQL statement. Each sql statement that operates on the database passes "asset ID" as a parameter.
Step 240, obtaining a first data identifier from the database query statement, where the first data identifier includes a target data identifier and a data location identifier.
The SQL execution action of the ORM framework is intercepted, and the 'asset ID' is extracted from the SQL statement.
Step 250, determining the first flag bit in the data position identification as an extension bit.
Assume that the last four digits of the intercepted asset ID, i.e., the data location identification, is 0601. The first bit "0" is used as the extension bit, and since it is 0, it indicates that extension is not currently enabled.
And step 260, determining the second zone bit and the third zone bit in the data position identification as the target database identification.
In the above example, the second flag bit and the third flag bit are "60", and the target database identification may be determined to be 60.
And step 270, determining the fourth flag bit in the data position identifier as the target data table identifier.
In the above example, the fourth flag bit is "1", and thus it can be determined that the target data table identification is 1.
Step 280, searching the target data according to the target database identifier, the target data table identifier and the target data identifier.
Through the step 250 and 270, when the intercepted four-digit number is 0601, the intercepted three-digit number 601 is valid data, and the generated second data is identified as "database name _60, database table name _ 1".
Step 290, perform a database query statement on the target data.
According to the data processing method provided by the embodiment, hundreds of libraries and ten tables are established, the requirement of storing billions of assets is met, and the data storage pressure of a single library and a single table is reduced. The sub-database and sub-table scheme utilizes the property of the assets to route the asset data. The same batch of business data is ensured to be stored in the same base table, and the efficiency of data storage and retrieval is improved. In addition, the defect that the storage quantity of a single-library single-table storage technology is low is overcome, and a hundred-library ten-table scheme is designed to meet the storage requirement of a billion-level system. The traditional relational database is difficult to achieve the expectation of storing massive asset data, but the traditional relational database can meet the requirement of storing massive asset data through the scheme. Through the implementation of the scheme, the original asset data storage and retrieval speed is increased from the second level to the millisecond level, and the service data storage and retrieval requirements are met.
Fig. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, where the apparatus is configured to implement the method according to the embodiment, and the apparatus is located in a terminal, and includes:
a data location identifier module 310, configured to obtain a first data identifier from a database query statement, where the first data identifier includes a target data identifier and a data location identifier;
a target identifier determining module 320, configured to determine a target database identifier and a target data table identifier according to the data location identifier obtained by the data location identifier obtaining module;
a target data searching module 330, configured to search for target data according to the target database identifier, the target data table identifier, and the target data identifier determined by the target identifier determining module 320;
the database statement executing module 340 is configured to execute a database query statement on the target data found by the target data searching module 330.
Further, the target identification determination module 320 is configured to:
determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification;
and determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit.
Further, the target identification determination module 320 is configured to:
and determining a value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
Further, the data location identifier includes four flag bits, and the target identifier determining module 320 is configured to:
determining a first zone bit in the data position identification as an extension bit;
determining a second zone bit and a third zone bit in the data position identification as a target database identification;
and determining the fourth zone bit in the data position identification as the target data table identification.
Further, the target data lookup module 330 is configured to:
generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier;
replacing the first data identifier in the database query statement with a second data identifier;
and searching target data according to the second data identification.
In the data processing apparatus provided in the embodiment of the present invention, the data location identifier module may obtain a first data identifier from a database query statement, where the first data identifier includes a target data identifier and a data location identifier; the target identification determining module determines a target database identification and a target data table identification according to the data position identification; the target data searching module searches target data according to the target database identifier, the target data table identifier and the target data identifier; the database statement execution module executes database query statements on target data, and then a relational database storage mode of multiple database data tables is achieved. Compared with the data storage mode of a single database and a single data table in the prior art, the data storage method and the data storage device can convert the target data identification into the corresponding target database and the target data table, and further realize the data storage mode of multiple data tables of multiple databases of the relational database. For the same data volume, when the data volume is stored in a multi-database multi-data table storage mode, the data volume stored in each data table is far smaller than the data volume stored in the data table in the single-database single-table storage mode in the prior art, and therefore in each data access process, the target data can be searched more quickly, and the data reading and writing efficiency is improved.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For details not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present invention.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention. As shown in fig. 5, the terminal may include: a housing (not shown), a first memory 401, a first Central Processing Unit (CPU) 402 (also called a first processor, hereinafter referred to as CPU), a computer program stored in the first memory 401 and operable on the first processor 402, a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU402 and the first memory 401 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the terminal; the first memory 401 is used for storing executable program codes; the CPU402 reads the executable program code stored in the first memory 401 to run a program corresponding to the executable program code, and executes:
acquiring a first data identifier from a database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier;
determining a target database identifier and a target data table identifier according to the data position identifier;
searching target data according to the target database identifier, the target data table identifier and the target data identifier;
a database query statement is executed on the target data.
The above terminal further includes: peripheral interface 403, RF (Radio Frequency) circuitry 405, audio circuitry 406, speakers 411, power management chip 408, input/output (I/O) subsystem 409, touch screen 412, other input/control devices 410, and external port 404, which communicate via one or more communication buses or signal lines 407.
In addition, the terminal also comprises a camera and an RGB light sensor. The RGB light sensor is located beside the camera and can be arranged adjacent to the camera. The camera can be a front camera or a rear camera. The RGB light sensor may also be arranged separately from the camera, for example on a narrow side of the terminal.
It should be understood that the illustrated terminal 400 is merely one example of a terminal and that the terminal 400 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a terminal for implementing doorbell control according to this embodiment, where the terminal is a smart phone as an example.
A first memory 401, said first memory 401 being accessible by the CPU402, the peripheral interface 403, etc., said first memory 401 may comprise a high speed random access first memory and may further comprise a non-volatile first memory, such as one or more magnetic disk first storage devices, flash memory devices, or other volatile solid state first storage devices.
A peripheral interface 403, the peripheral interface 403 being capable of connecting input and output peripherals of the device to the CPU402 and the first memory 401.
An I/O subsystem 409, the I/O subsystem 409 connecting input and output peripherals on the device, such as a touch screen 412 and other input/control devices 410, to the peripheral interface 403. The I/O subsystem 409 may include a display controller 4091 and one or more input controllers 4092 for controlling other input/control devices 410. Where one or more input controllers 4092 receive electrical signals from or send electrical signals to other input/control devices 410, the other input/control devices 410 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 4092 may be connected to any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
The touch screen 412 may be a resistive type, a capacitive type, an infrared type, or a surface acoustic wave type, according to the operating principle of the touch screen and the classification of media for transmitting information. Classified by the installation method, the touch screen 412 may be: external hanging, internal or integral. Classified according to technical principles, the touch screen 412 may be: a vector pressure sensing technology touch screen, a resistive technology touch screen, a capacitive technology touch screen, an infrared technology touch screen, or a surface acoustic wave technology touch screen.
A touch screen 412, which is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like. Optionally, the touch screen 412 sends an electrical signal (e.g., an electrical signal of the touch surface) triggered by the user on the touch screen to the first processor 402.
The display controller 4091 in the I/O subsystem 409 receives electrical signals from the touch screen 412 or transmits electrical signals to the touch screen 412. The touch screen 412 detects a contact on the touch screen, and the display controller 4091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 412, i.e., implements a human-computer interaction, and the user interface object displayed on the touch screen 412 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 405 is mainly used to establish communication between the smart speaker and a wireless network (i.e., a network side), and implement data reception and transmission between the smart speaker and the wireless network. Such as sending and receiving short messages, e-mails, etc.
The audio circuit 406 is mainly used to receive audio data from the peripheral interface 403, convert the audio data into an electric signal, and transmit the electric signal to the speaker 411.
And the loudspeaker 411 is used for restoring the voice signal received by the intelligent sound box from the wireless network through the RF circuit 405 into sound and playing the sound to the user.
And the power management chip 408 is used for supplying power and managing power to the hardware connected with the CPU402, the I/O subsystem and the peripheral interface.
In this embodiment, the central first processor 402 is configured to:
acquiring a first data identifier from a database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier;
determining a target database identifier and a target data table identifier according to the data position identifier;
searching target data according to the target database identifier, the target data table identifier and the target data identifier;
a database query statement is executed on the target data.
Further, determining the target database identifier and the target data table identifier according to the data location identifier includes:
determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification;
and determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit.
Further, determining the target database identifier and the target data table identifier according to the data location identifier includes:
and determining a value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
Further, the data position identification comprises four flag bits; determining a target database identifier and a target data table identifier according to the data location identifier, including:
determining a first zone bit in the data position identification as an extension bit;
determining a second zone bit and a third zone bit in the data position identification as a target database identification;
and determining the fourth zone bit in the data position identification as the target data table identification.
Further, searching the target data according to the target database identifier, the target data table identifier and the target data identifier includes:
generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier;
replacing the first data identifier in the database query statement with a second data identifier;
and searching target data according to the second data identification.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the following steps:
acquiring a first data identifier from a database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier;
determining a target database identifier and a target data table identifier according to the data position identifier;
searching target data according to the target database identifier, the target data table identifier and the target data identifier;
a database query statement is executed on the target data.
Further, determining the target database identifier and the target data table identifier according to the data location identifier includes:
determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification;
and determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit.
Further, determining the target database identifier and the target data table identifier according to the data location identifier includes:
and determining a value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
Further, the data position identification comprises four flag bits; determining a target database identifier and a target data table identifier according to the data location identifier, including:
determining a first zone bit in the data position identification as an extension bit;
determining a second zone bit and a third zone bit in the data position identification as a target database identification;
and determining the fourth zone bit in the data position identification as the target data table identification.
Further, searching the target data according to the target database identifier, the target data table identifier and the target data identifier includes:
generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier;
replacing the first data identifier in the database query statement with a second data identifier;
and searching target data according to the second data identification.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (7)

1. A data processing method, comprising:
acquiring a first data identifier from a database query statement, wherein the first data identifier comprises a target data identifier and a data position identifier;
determining a target database identifier and a target data table identifier according to the data position identifier;
searching target data according to the target database identifier, the target data table identifier and the target data identifier;
executing the database query statement on the target data;
the determining the target database identifier and the target data table identifier according to the data position identifier includes:
determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification;
determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit;
and determining a numerical value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
2. The data processing method of claim 1, wherein the data location identifier comprises four flag bits; the determining the target database identifier and the target data table identifier according to the data position identifier includes:
determining a first zone bit in the data position identification as an extension bit;
determining a second zone bit and a third zone bit in the data position identification as a target database identification;
and determining a fourth zone bit in the data position identification as a target data table identification.
3. The data processing method of claim 1, wherein the searching for target data according to the target database identifier, the target data table identifier, and the target data identifier comprises:
generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier;
replacing the first data identifier in the database query statement with the second data identifier;
and searching target data according to the second data identification.
4. A data processing apparatus, comprising:
the data position identification module is used for acquiring a first data identification from a database query statement, wherein the first data identification comprises a target data identification and a data position identification;
the target identification determining module is used for determining a target database identification and a target data table identification according to the data position identification acquired by the data position identification acquiring module;
the target data searching module is used for searching target data according to the target database identifier, the target data table identifier and the target data identifier determined by the target identifier determining module;
a database statement executing module, configured to execute the database query statement on the target data found by the target data searching module;
the target identification determination module is configured to:
determining a numerical value corresponding to at least one first zone bit in the data position identification as a target database identification;
determining a numerical value corresponding to at least one second zone bit in the data position identification as a target data table identification, wherein the at least one first zone bit is adjacent to the at least one second zone bit;
the target identification determination module is further configured to:
and determining a value corresponding to at least one third zone bit in the data position identifier as an extension bit, wherein the at least one first zone bit, the at least one second zone bit and the at least one third zone bit form the data position identifier.
5. The data processing apparatus of claim 4, wherein the target data lookup module is configured to:
generating a second data identifier according to the target database identifier, the target data table identifier and the target data identifier;
replacing the first data identifier in the database query statement with the second data identifier;
and searching target data according to the second data identification.
6. A terminal, characterized in that the terminal comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a data processing method as claimed in any one of claims 1-3.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data processing method of any one of claims 1 to 3.
CN201710684861.XA 2017-08-11 2017-08-11 Data processing method, device, terminal and computer readable storage medium Active CN107463693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710684861.XA CN107463693B (en) 2017-08-11 2017-08-11 Data processing method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710684861.XA CN107463693B (en) 2017-08-11 2017-08-11 Data processing method, device, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107463693A CN107463693A (en) 2017-12-12
CN107463693B true CN107463693B (en) 2020-05-01

Family

ID=60548878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710684861.XA Active CN107463693B (en) 2017-08-11 2017-08-11 Data processing method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107463693B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018034192A1 (en) * 2016-08-19 2018-02-22 日本電気株式会社 Information processing device, information processing method, and storage medium
CN108304491B (en) * 2018-01-09 2021-05-11 比特大陆科技有限公司 Data query method and device and electronic equipment
CN110019244A (en) * 2018-05-14 2019-07-16 网联清算有限公司 Data processing method, device and computer readable storage medium
CN108959940B (en) * 2018-06-19 2024-01-19 杭州网易数之帆科技有限公司 Data access control method, medium, device and computing equipment
CN111143424B (en) * 2018-11-05 2024-05-28 阿波罗智能技术(北京)有限公司 Feature scene data mining method, device and terminal
CN109656980A (en) * 2018-12-27 2019-04-19 Oppo(重庆)智能科技有限公司 Data processing method, electronic equipment, device and readable storage medium storing program for executing
CN109800270B (en) * 2019-01-22 2020-12-04 青岛聚好联科技有限公司 Data storage and query method and Internet of things system
CN110415095A (en) * 2019-07-24 2019-11-05 深圳乐信软件技术有限公司 A kind of account checking method, device, terminal and storage medium
CN112579344A (en) * 2019-09-29 2021-03-30 北京国双科技有限公司 Data processing method, device and equipment
CN110795431B (en) * 2019-10-28 2020-12-01 天津同阳科技发展有限公司 Environment monitoring data processing method, device, equipment and storage medium
CN110941627A (en) * 2019-12-12 2020-03-31 南京医渡云医学技术有限公司 Data processing method and device, electronic equipment and storage medium
CN112765443B (en) * 2020-12-31 2023-10-24 广州技象科技有限公司 Internet of things data query method and device based on historical operation data
CN113626458A (en) * 2021-08-19 2021-11-09 咪咕数字传媒有限公司 High-concurrency data updating method, device, equipment and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308513A (en) * 2008-06-27 2008-11-19 福建星网锐捷网络有限公司 Distributed system cache data synchronous configuration method and apparatus
CN104090901A (en) * 2013-12-31 2014-10-08 腾讯数码(天津)有限公司 Method, device and server for processing data
CN105243167A (en) * 2015-11-10 2016-01-13 中国建设银行股份有限公司 Data processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9965507B2 (en) * 2010-08-06 2018-05-08 At&T Intellectual Property I, L.P. Securing database content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308513A (en) * 2008-06-27 2008-11-19 福建星网锐捷网络有限公司 Distributed system cache data synchronous configuration method and apparatus
CN104090901A (en) * 2013-12-31 2014-10-08 腾讯数码(天津)有限公司 Method, device and server for processing data
CN105243167A (en) * 2015-11-10 2016-01-13 中国建设银行股份有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN107463693A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN107463693B (en) Data processing method, device, terminal and computer readable storage medium
CN111247518B (en) Method and system for database sharding
CN102214208B (en) Method and equipment for generating structured information entity based on non-structured text
US11561972B2 (en) Query conversion for querying disparate data sources
CN103092604A (en) Application program classification method and device
CN106648569B (en) Target serialization realization method and device
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN111694866A (en) Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium
CN108140039B (en) Streaming records from database access of parallel batches
CN107547646B (en) Application program pushing method and device, terminal and computer readable storage medium
US10664663B2 (en) Natural language processing system
CN112100092B (en) Information caching method, device, equipment and medium
CN108491325B (en) File system testing method and device, storage medium and terminal
US9201937B2 (en) Rapid provisioning of information for business analytics
CN105354506A (en) File hiding method and apparatus
US20080033949A1 (en) Electronic apparatus and method therefor
CN105051734A (en) Information processing device, data input assistance method, and program
CN114969044A (en) Materialized column creating method based on data lake and data query method
CN114547106A (en) Data query method and device, storage medium and computer system
CN113704273A (en) Data management method, device, storage medium and server
CN109558387B (en) Method and device for processing identity card number, storage medium and terminal
CN113434585A (en) Resource saving method and equipment
CN107765956B (en) User interface editing method, device, terminal and computer readable storage medium
CN107844554B (en) Application recommendation method and device, terminal equipment and storage medium
CN111782834A (en) Image retrieval method, device, equipment and computer readable storage medium

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