CN111666421B - Data processing method and device and electronic equipment - Google Patents

Data processing method and device and electronic equipment Download PDF

Info

Publication number
CN111666421B
CN111666421B CN202010493175.6A CN202010493175A CN111666421B CN 111666421 B CN111666421 B CN 111666421B CN 202010493175 A CN202010493175 A CN 202010493175A CN 111666421 B CN111666421 B CN 111666421B
Authority
CN
China
Prior art keywords
data
stored
tdb
storing
file
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
CN202010493175.6A
Other languages
Chinese (zh)
Other versions
CN111666421A (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 SoundAI Technology Co Ltd
Original Assignee
Beijing SoundAI 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 SoundAI Technology Co Ltd filed Critical Beijing SoundAI Technology Co Ltd
Priority to CN202010493175.6A priority Critical patent/CN111666421B/en
Publication of CN111666421A publication Critical patent/CN111666421A/en
Application granted granted Critical
Publication of CN111666421B publication Critical patent/CN111666421B/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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures

Landscapes

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

Abstract

The disclosure provides a data processing method, a device and an electronic device, wherein the method comprises the following steps: acquiring data to be stored; determining a storage position for storing the data to be stored according to the data to be stored; and storing the data to be stored in the storage position. The storage position for storing is determined based on the data to be stored when the data to be stored is determined, so that the storage position for storing the stored data can be determined according to the data to be stored when the stored data to be stored is searched, and the data to be stored is further searched from the storage position, so that the searching range is reduced, and the data searching efficiency can be improved.

Description

Data processing method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of artificial intelligence, and in particular relates to a data processing method, a data processing device and electronic equipment.
Background
Along with the rapid development of knowledge graph technology, the storage of knowledge graph data is of great importance, and the data storage mode can influence the query speed of the data. At present, the knowledge graph data is stored by using a traditional database, the data query process is complex, and the query efficiency is low.
Disclosure of Invention
The embodiment of the disclosure provides a data processing method, a data processing device and electronic equipment, which are used for solving the problems of complex query process and low query efficiency caused by a storage mode of knowledge graph data in the prior related technology.
In order to solve the technical problems, the present disclosure is implemented as follows:
According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, applied to an electronic device, including:
Acquiring data to be stored;
determining a storage position for storing the data to be stored according to the data to be stored;
And storing the data to be stored in the storage position.
According to a second aspect of embodiments of the present disclosure, there is provided a data processing apparatus comprising:
The acquisition module is used for acquiring data to be stored;
the determining module is used for determining a storage position for storing the data to be stored according to the data to be stored;
and the storage module is used for storing the data to be stored in the storage position.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device including a processor, a memory, and a program stored on the memory and executable on the processor, the program implementing the steps of the data processing method described above when executed by the processor.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a readable storage medium having stored thereon a program which, when executed by a processor, implements the steps of the data processing method described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
Acquiring data to be stored; determining a storage position for storing the data to be stored according to the data to be stored; and storing the data to be stored in the storage position. The storage position for storing is determined based on the data to be stored when the data to be stored is determined, so that the storage position for storing the stored data can be determined according to the data to be stored when the stored data to be stored is searched, and the data to be stored is further searched from the storage position, so that the searching range is reduced, and the data searching efficiency can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 is a flow chart illustrating a method of data processing according to an exemplary embodiment;
FIG. 2 is another flow chart illustrating a method of data processing according to an exemplary embodiment;
FIG. 3 is a block diagram of a data processing apparatus according to an exemplary embodiment;
FIG. 4 is another block diagram of a data processing apparatus according to an exemplary embodiment;
FIG. 5 is a further block diagram of a data processing apparatus according to an exemplary embodiment;
fig. 6 is a block diagram of an electronic device, according to an example embodiment.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
Referring to fig. 1, fig. 1 is a flowchart illustrating a data processing method according to an exemplary embodiment, and as shown in fig. 1, the present embodiment provides a data processing method, which is applied to an electronic device, and includes the following steps:
step 101, obtaining data to be stored.
The data to be stored is the data to be stored in the electronic equipment, the data to be stored can also be called as data to be written in, and the data to be stored can be knowledge graph triple data.
Step 102, determining a storage position for storing the data to be stored according to the data to be stored.
Based on the data to be stored, a storage location for storing the data to be stored is determined. The electronic device includes a plurality of memory areas, the memory location being one of the plurality of memory areas. When determining the storage location based on the data to be stored, the determination may be performed based on the classification of the data to be stored, for example, if the data to be stored is data with a higher frequency of use, the storage location is determined to be the first storage area; and if the data to be stored is the data with lower use frequency, determining the storage position as a second storage area.
Step 103, storing the data to be stored in the storage position.
In this embodiment, the data to be stored is obtained; determining a storage position for storing the data to be stored according to the data to be stored; and storing the data to be stored in the storage position. The storage position for storing is determined based on the data to be stored when the data to be stored is determined, so that the storage position for storing the stored data can be determined according to the data to be stored when the stored data to be stored is searched, and the data to be stored is further searched from the storage position, so that the searching range is reduced, and the data searching efficiency can be improved.
In one embodiment of the present application, step 102, determining a storage location for storing the data to be stored according to the data to be stored, includes:
if the data to be stored is the first type of data, determining a data file for storing the data to be stored according to the data to be stored;
step 103, storing the data to be stored in the storage location, including:
And storing the data to be stored into the data file.
In this embodiment, the first type of data may be data with a low usage frequency, for example, data with a usage frequency lower than a preset frequency threshold, where the preset frequency threshold may be set according to an actual situation, and the usage frequency may be a historical usage frequency of the data to be stored.
Based on the data to be stored, a data file for storing the data to be stored is determined, for example, an operation is performed on the data to be stored, which one of a plurality of data files included in the electronic device is to be stored in the data to be stored is determined, or one of the plurality of data files is directly designated for the data to be stored, and a correspondence between the data to be stored and the designated data file is recorded.
After a data file for storing the data to be stored is determined, the data to be stored is stored in the data file. When the data file for storage is determined for the data to be stored, the data file for storage is determined based on the data to be stored, if the data to be stored is required to be found out from a plurality of data files of the electronic equipment, the data file stored by the electronic equipment can be determined according to the data to be stored, and the data to be stored is found out from the data file.
In one embodiment of the present application, if the data to be stored is a first type of data, determining, according to the data to be stored, a data file for storing the data to be stored includes:
If the data to be stored is the first type of data, mapping operation is carried out according to the data to be stored, and a TDB data file for storing the data to be stored is determined;
storing the data to be stored in the data file, including:
And storing the data to be stored into the TDB data file.
Specifically, a Triple Database (TDB) is a Database for storing knowledge-graph data, and can effectively support relational operation and various complex queries. The TDB may include a plurality of TDB data files.
The method comprises the steps of performing mapping operation according to data to be stored, determining a TDB data file, performing operation on the data to be stored to obtain an operation result, determining the TDB data file for storing the data to be stored according to the operation result, for example, performing hash operation on the data to be stored, determining the number of the TDB data file for storing the data to be stored, and determining the TDB data file for storing the data to be stored according to the number.
According to the data to be stored, mapping operation is carried out to determine a TDB data file, or a TDB data file for storage is directly determined for the data to be stored, an index table is established, the corresponding relation between the data to be stored and the information of the TDB data file is recorded in the index table, the information of the TDB data file can be the number or the file name of the file, so that when the data to be stored is searched in the TDB, the number of the TDB data file stored by the data to be stored is obtained through searching the index table, and then the data to be stored is searched in the TDB data file corresponding to the number. Because the data size of the index table is small, the corresponding relation between the data to be stored and the information of the TDB data files is directly stored in the index table, so that the storage position of the data to be stored in a large data size can be positioned by traversing the small data size, and the large data size can be understood as a plurality of TDB data files.
For sequentially increasing data to be stored, a method of creating an index table may be used to determine a TDB data file for storage, that is, determining, according to the data to be stored, in which index table of the multiple index tables the correspondence between the data to be stored and the TDB data file is located. For example, 10000 pieces of data can be stored in each index table, so that it can be determined that the corresponding relation of the data 38000 to be stored is stored in the fourth index table, and the fourth index table is directly traversed to obtain the corresponding relation between the data 38000 to be stored and the information of the TDB data file, so that the time for traversing the index table can be reduced, and the searching efficiency can be improved.
If the data to be stored is to be searched from a plurality of TDB data files of the electronic equipment, the stored data files can be quickly determined according to the data to be stored, and the data to be stored is searched from the data files.
In one embodiment of the present application, if the data to be stored is the first type of data, performing a mapping operation according to the data to be stored, and determining a TDB data file for storing the data to be stored includes:
if the data to be stored is the first type data, carrying out hash operation on the data to be stored, and determining the TDB data file for storing the data to be stored;
Or alternatively
And if the data to be stored is the first type of data, determining a corresponding relation between the data to be stored and the information of the TDB data files, wherein the electronic equipment comprises a plurality of TDB data files, and the TDB data files are files with minimum data storage amounts in the plurality of TDB data files.
In this embodiment, the mapping operation may be a hash operation, that is, performing a hash operation on the data to be stored, to determine the TDB data file used to store the data to be stored.
For example: the hash operation is hash remainder operation, the remainder is 10, if the data to be stored is 13, the result of the hash remainder operation on the data to be stored is 3, the number of the TDB data file of the data to be stored 13 is determined to be 3, and the data to be stored 13 is stored in the TDB data file with the number of 3; when the data 13 to be stored is queried later, the same hash remainder operation is adopted, so that the data 13 to be stored can be known to be stored in the TDB data file with the number of 3 or not exist, other TDB data files do not need to be accessed, the query time is saved, and the query efficiency is improved.
In order to control the situation of unbalanced data storage in the plurality of TDB data files, the stored TDB data file may be directly determined for the data to be stored, where the TDB data file is a file with the smallest data storage in the plurality of TDB data files, so as to control the situation of unbalanced data storage in the plurality of TDB data files.
The method for determining the correspondence between the data to be stored and the information of the TDB data file may be provided that: the difference between the data storage amount of a first TDB data file and the data storage amount of a second TDB data file in the plurality of TDB data files is larger than a preset difference, wherein the first TDB data file is the file with the largest data storage amount in the plurality of TDB data files; the second TDB data file is a file with the smallest data storage amount in the plurality of TDB data files, the preset difference may be a preset proportion, for example, 50%, of the data storage amount of the first TDB data file, and the preset difference may also select other setting modes according to actual situations, which is not limited herein.
When the stored TDB data file is directly determined for the data to be stored, an index table is established, information of the data to be stored and the TDB data file, such as the number or the file name of the TDB data file, is recorded in the index table, so that when the data to be stored is searched in the TDB, the number of the TDB data file stored by the data to be stored is obtained through searching the index table, and then the data to be stored is searched in the TDB data file corresponding to the number. Because the data size of the index table is small, the corresponding relation between the data to be stored and the information of the TDB data files is directly stored in the index table, so that the storage position of the data to be stored in a large data size can be positioned by traversing the small data size, and the large data size can be understood as a plurality of TDB data files.
In one embodiment of the present application, the storing the data to be stored in the TDB data file includes:
placing a write request of the data to be stored into a target queue, wherein the target queue is a write operation queue corresponding to the TDB data file;
and storing the data to be stored into the TDB data file according to the write-in request in the target queue.
In this embodiment, in order to improve the writing security of the TDB data files, it is ensured that the same file is written by only one thread at the same time, and a write operation queue is set for each TDB data file. And placing the write requests for the TDB data file into the write operation queue, namely placing the write requests into a target queue, and then storing the data to be stored into the TDB data file according to the write requests in the target queue.
In one embodiment of the present application, step 102, determining a storage location for storing the data to be stored according to the data to be stored, includes:
if the data to be stored is the second type data, determining a storage area for storing the data to be stored as a first storage area, wherein the electronic equipment comprises a plurality of storage areas, and the first storage area is the first storage area searched by the electronic equipment when the electronic equipment searches the data in the plurality of storage areas;
step 103, storing the data to be stored in the storage location, including:
and storing the data to be stored in the first storage area.
In this embodiment, the second type of data may be data with a higher usage frequency, for example, the usage frequency is not lower than a preset frequency threshold, the preset frequency threshold may be set according to an actual situation, and the usage frequency may be a historical usage frequency of the data to be stored. The electronic device includes a first storage area and a second storage area, the second storage area including a plurality of TDB data files. The storage capacity of the first storage area is smaller than the storage capacity of the second storage area, for example, may be smaller than the storage capacity of one TDB data file.
When the data is queried, the data is searched in the first storage area, and the first storage area comprises data with higher searching frequency, so that the first storage area is preferentially searched, the probability of searching the required data is higher, the searching time can be shortened, and the searching efficiency is improved. If the data to be queried is not found in the first storage area, the data to be queried is found in the second storage area, and when the data to be queried is found in the second storage area, the TDB data file is found according to the data to be queried, and the data to be queried is found in the TDB data file, so that the searching range is reduced, and the data querying efficiency can be improved.
Or searching an index table according to the data to be queried so as to determine a TDB data file, and then searching in the TDB data file according to the data to be queried. Because the data size of the index table is small, the storage position of the data to be queried in a large data size (namely a plurality of TDB data files) can be positioned by traversing the small data size, so that the searching efficiency can be improved.
Fig. 2 is a flow chart of a data processing method according to an embodiment of the present application, and as shown in fig. 2, a storage process of data to be stored includes:
classifying the data to be stored, namely determining whether the data to be processed belongs to the first type of data or the second type of data;
If the data to be stored is the first type of data, processing the data to be stored by utilizing a hash algorithm, and determining a storage position where the data to be stored is to be stored, namely determining information of the TDB data file, such as the number or the file name of the TDB data file;
if the data to be stored is the second type data, the data to be stored is stored in the first storage area;
If a hash algorithm is adopted to determine the storage position of the data, so that the data storage amount in each TDB data file is unbalanced, determining the storage position of the data to be stored in an index table manner, that is, determining the information of the TDB data file used for storing the data to be stored in an index table manner, for example, the number or the file name of the TDB data file in the case that the data storage amount of each TDB data file of the electronic device is unbalanced;
after determining a target TDB data file for storage, placing a write request for storing data to be stored into a write operation queue of the target TDB data file;
And storing the data to be stored into a target TDB data file according to the writing request in the writing operation queue, wherein the target TDB data file belongs to the second storage area.
The query process of the data to be queried comprises the following steps:
Searching in the first storage area according to the data to be queried, and obtaining a query result if the data to be queried is found; if not, searching is carried out in the second storage area, a query result is obtained, and when not found in the second storage area, the query result is empty.
Referring to fig. 3, fig. 3 is a block diagram of a data processing apparatus according to an embodiment of the present disclosure, and as shown in fig. 3, a data processing apparatus 300 includes:
An acquiring module 301, configured to acquire data to be stored;
A determining module 302, configured to determine a storage location for storing the data to be stored according to the data to be stored;
and the storage module 303 is used for storing the data to be stored in the storage position.
As shown in fig. 4, in one embodiment of the present application, the determining module 302 includes:
A first determining submodule 3021, configured to determine, according to the data to be stored, a data file for storing the data to be stored if the data to be stored is the first type of data;
the storage module 303 includes:
A first storage submodule 3031, configured to store the data to be stored in the data file.
In one embodiment of the present application, the first determining submodule 3021 includes:
The determining unit is used for performing mapping operation according to the data to be stored if the data to be stored is the first type data, and determining a triple database TDB data file for storing the data to be stored;
The first storage submodule 3031 includes:
And the storage unit is used for storing the data to be stored into the TDB data file.
In one embodiment of the application, the determining unit is configured to:
if the data to be stored is the first type data, carrying out hash operation on the data to be stored, and determining the TDB data file for storing the data to be stored;
Or alternatively
And if the data to be stored is the first type of data, determining a corresponding relation between the data to be stored and the information of the TDB data files, wherein the data processing device comprises a plurality of TDB data files, and the TDB data files are files with minimum data storage amounts in the plurality of TDB data files.
In one embodiment of the present application, the storage unit is configured to:
placing a write request of the data to be stored into a target queue, wherein the target queue is a write operation queue corresponding to the TDB data file;
and storing the data to be stored into the TDB data file according to the write-in request in the target queue.
As shown in fig. 5, in one embodiment of the present application, the determining module 302 includes:
A second determining submodule 3022, configured to determine, if the data to be stored is the second type data, that a memory area for storing the data to be stored is a first memory area, where the data processing apparatus includes a plurality of memory areas, and the first memory area is a memory area that is searched first when the plurality of memory areas search for data;
the storage module 303 includes:
A second storage submodule 3032, configured to store the data to be stored in the first storage area.
The data processing apparatus 300 is capable of implementing each process implemented by the electronic device in the method embodiment of fig. 1, and is not described herein again for avoiding repetition.
The data processing apparatus 300 of the embodiment of the present disclosure obtains data to be stored; determining a storage position for storing the data to be stored according to the data to be stored; and storing the data to be stored in the storage position. The storage position for storing is determined based on the data to be stored when the data to be stored is determined, so that the storage position for storing the stored data can be determined according to the data to be stored when the stored data to be stored is searched, and the data to be stored is further searched from the storage position, so that the searching range is reduced, and the data searching efficiency can be improved.
Fig. 6 is a schematic hardware structure of an electronic device implementing various embodiments of the disclosure, as shown in fig. 6, the electronic device 600 includes, but is not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 606, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, processor 610, and power supply 611. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 6 is not limiting of the electronic device and that the electronic device may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. In the embodiments of the present disclosure, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 610 is configured to obtain data to be stored;
determining a storage position for storing the data to be stored according to the data to be stored;
And storing the data to be stored in the storage position.
In one embodiment of the present application, the processor 610 is further configured to determine, if the data to be stored is the first type of data, a data file for storing the data to be stored according to the data to be stored;
And storing the data to be stored into the data file.
In one embodiment of the present application, the processor 610 is further configured to determine a triple database TDB data file for storing the data to be stored according to a mapping operation performed on the data to be stored if the data to be stored is the first type of data;
And storing the data to be stored into the TDB data file.
In one embodiment of the present application, the processor 610 is further configured to perform a hash operation on the data to be stored if the data to be stored is the first type of data, and determine the TDB data file for storing the data to be stored;
Or alternatively
And if the data to be stored is the first type of data, determining a corresponding relation between the data to be stored and the information of the TDB data files, wherein the electronic equipment comprises a plurality of TDB data files, and the TDB data files are files with minimum data storage amounts in the plurality of TDB data files.
In one embodiment of the present application, the processor 610 is further configured to put a write request for the data to be stored in a target queue, where the target queue is a write operation queue corresponding to the TDB data file;
and storing the data to be stored into the TDB data file according to the write-in request in the target queue.
In one embodiment of the present application, the processor 610 is further configured to determine, if the data to be stored is the second type of data, that a storage area for storing the data to be stored is a first storage area, where the electronic device includes a plurality of storage areas, and the first storage area is a storage area that is first to be searched by the electronic device when the electronic device searches the plurality of storage areas for data;
and storing the data to be stored in the first storage area.
The electronic device 600 can implement each process implemented by the electronic device in the foregoing embodiment, and in order to avoid repetition, a description is omitted here.
The electronic device 600 of the embodiment of the present disclosure obtains data to be stored; determining a storage position for storing the data to be stored according to the data to be stored; and storing the data to be stored in the storage position. The storage position for storing is determined based on the data to be stored when the data to be stored is determined, so that the storage position for storing the stored data can be determined according to the data to be stored when the stored data to be stored is searched, and the data to be stored is further searched from the storage position, so that the searching range is reduced, and the data searching efficiency can be improved.
It should be understood that, in the embodiment of the present disclosure, the radio frequency unit 601 may be configured to receive and send information or signals during a call, specifically, receive downlink data from a base station, and then process the downlink data with the processor 610; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 601 may also communicate with networks and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 602, such as helping the user to send and receive e-mail, browse web pages, and access streaming media, etc.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the electronic device 600. The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used for receiving audio or video signals. The input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, the graphics processor 6041 processing image data of still pictures or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphics processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. Microphone 6042 may receive sound and can process such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 601 in the case of a telephone call mode.
The electronic device 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 6061 and/or the backlight when the electronic device 600 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the electronic equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 605 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 606 is used to display information input by a user or information provided to the user. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in a form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 6071 or thereabout using any suitable object or accessory such as a finger, stylus, or the like). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 610, and receives and executes commands sent from the processor 610. In addition, the touch panel 6071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 6071 may be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 610 to determine a type of a touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although in fig. 6, the touch panel 6071 and the display panel 6061 are two independent components for implementing the input and output functions of the electronic device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 608 is an interface to which an external device is connected to the electronic apparatus 600. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 600 or may be used to transmit data between the electronic apparatus 600 and an external device.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a storage program area that may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609, thereby performing overall monitoring of the electronic device. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The electronic device 600 may also include a power supply 611 (e.g., a battery) for powering the various components, and preferably the power supply 611 may be logically coupled to the processor 610 via a power management system that performs functions such as managing charging, discharging, and power consumption.
In addition, the electronic device 600 includes some functional modules, which are not shown, and will not be described herein.
Preferably, the embodiment of the present disclosure further provides an electronic device, including a processor 610, a memory 609, and a program stored in the memory 609 and capable of running on the processor 610, where the program when executed by the processor 610 implements each process of the foregoing embodiment of the data processing method, and the same technical effects are achieved, and for avoiding repetition, a detailed description is omitted herein.
The embodiment of the present disclosure further provides a readable storage medium, on which a program is stored, where the program, when executed by a processor, implements each process of the foregoing data processing method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is provided herein. The readable storage medium is, for example, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk), including several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present disclosure.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The embodiments of the present disclosure have been described above with reference to the accompanying drawings, but the present disclosure is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the disclosure and the scope of the claims, which are all within the protection of the present disclosure.

Claims (8)

1. A data processing method applied to an electronic device, comprising:
Acquiring data to be stored;
If the data to be stored is the first type of data, determining a data file for storing the data to be stored according to the data to be stored, and storing the data to be stored into the data file;
If the data to be stored is the second type data, determining a storage area for storing the data to be stored as a first storage area, wherein the electronic equipment comprises a plurality of storage areas, and the first storage area is the first storage area searched by the electronic equipment when the electronic equipment searches the data in the plurality of storage areas; storing the data to be stored in the first storage area;
If the data to be stored is the first type of data, determining a data file for storing the data to be stored according to the data to be stored, including:
if the data to be stored is the first type of data, mapping operation is carried out according to the data to be stored, and a triple database TDB data file for storing the data to be stored is determined;
storing the data to be stored in the data file, including:
storing the data to be stored into the TDB data file;
If the data to be stored is the first type data, performing mapping operation according to the data to be stored, and determining a TDB data file for storing the data to be stored includes:
And if the data to be stored is the first type of data, determining a corresponding relation between the data to be stored and the information of the TDB data files, wherein the electronic equipment comprises a plurality of TDB data files, the difference between the data storage amount of a first TDB data file and the data storage amount of a second TDB data file in the plurality of TDB data files is larger than a preset difference, the first TDB data file is the file with the largest data storage amount in the plurality of TDB data files, and the second TDB data file is the file with the smallest data storage amount in the plurality of TDB data files.
2. The method of claim 1, wherein if the data to be stored is the first type of data, performing a mapping operation according to the data to be stored to determine a TDB data file for storing the data to be stored, further comprising:
and if the data to be stored is the first type data, carrying out hash operation on the data to be stored, and determining the TDB data file for storing the data to be stored.
3. The method of claim 1, wherein the storing the data to be stored in the TDB data file comprises:
placing a write request of the data to be stored into a target queue, wherein the target queue is a write operation queue corresponding to the TDB data file;
and storing the data to be stored into the TDB data file according to the write-in request in the target queue.
4. A data processing apparatus for use in an electronic device, comprising:
The acquisition module is used for acquiring data to be stored;
The determining module comprises a first determining submodule and a second determining submodule, wherein the first determining submodule is used for determining a data file for storing the data to be stored according to the data to be stored if the data to be stored is the first type of data; the second determining submodule is used for determining a storage area for storing the data to be stored as a first storage area if the data to be stored is the second type data, and the data processing device comprises a plurality of storage areas, wherein the first storage area is the first storage area to be searched when the plurality of storage areas search the data;
the storage module comprises a first storage sub-module and a second storage sub-module, wherein the first storage sub-module is used for storing the data to be stored in the data file, and the second storage sub-module is used for storing the data to be stored in the first storage area;
Wherein the first determination submodule includes:
The determining unit is used for performing mapping operation according to the data to be stored if the data to be stored is the first type data, and determining a triple database TDB data file for storing the data to be stored;
the first storage sub-module includes:
a storage unit for storing the data to be stored in the TDB data file
The determining unit is used for:
And if the data to be stored is the first type of data, determining a corresponding relation between the data to be stored and the information of the TDB data files, wherein the electronic equipment comprises a plurality of TDB data files, the difference between the data storage amount of a first TDB data file and the data storage amount of a second TDB data file in the plurality of TDB data files is larger than a preset difference, the first TDB data file is the file with the largest data storage amount in the plurality of TDB data files, and the second TDB data file is the file with the smallest data storage amount in the plurality of TDB data files.
5. The apparatus of claim 4, wherein the determining unit is further configured to:
and if the data to be stored is the first type data, carrying out hash operation on the data to be stored, and determining the TDB data file for storing the data to be stored.
6. The apparatus of claim 4, wherein the memory unit is configured to:
placing a write request of the data to be stored into a target queue, wherein the target queue is a write operation queue corresponding to the TDB data file;
and storing the data to be stored into the TDB data file according to the write-in request in the target queue.
7. An electronic device comprising a processor, a memory and a program stored on the memory and executable on the processor, the program when executed by the processor implementing the steps of the data processing method according to any one of claims 1 to 3.
8. A readable storage medium, characterized in that the readable storage medium has stored thereon a program which, when executed by a processor, implements the steps of the data processing method according to any of claims 1 to 3.
CN202010493175.6A 2020-06-03 2020-06-03 Data processing method and device and electronic equipment Active CN111666421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010493175.6A CN111666421B (en) 2020-06-03 2020-06-03 Data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010493175.6A CN111666421B (en) 2020-06-03 2020-06-03 Data processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111666421A CN111666421A (en) 2020-09-15
CN111666421B true CN111666421B (en) 2024-05-10

Family

ID=72385572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010493175.6A Active CN111666421B (en) 2020-06-03 2020-06-03 Data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111666421B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631513A (en) * 2020-12-14 2021-04-09 深兰人工智能(深圳)有限公司 Data storage method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881259A (en) * 2015-06-29 2015-09-02 联想(北京)有限公司 Data processing method and device and storage device
CN105511814A (en) * 2015-12-11 2016-04-20 上海爱数信息技术股份有限公司 Storage method of static data file
CN110750529A (en) * 2018-07-04 2020-02-04 百度在线网络技术(北京)有限公司 Data processing method, device, equipment and storage medium
CN111026674A (en) * 2019-11-29 2020-04-17 维沃移动通信有限公司 Data storage method and electronic equipment
CN111090628A (en) * 2019-12-20 2020-05-01 上海米哈游网络科技股份有限公司 Data processing method and device, storage medium and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060274153A1 (en) * 2005-06-02 2006-12-07 Searete Llc, A Limited Liability Corporation Of The State Of Delaware Third party storage of captured data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881259A (en) * 2015-06-29 2015-09-02 联想(北京)有限公司 Data processing method and device and storage device
CN105511814A (en) * 2015-12-11 2016-04-20 上海爱数信息技术股份有限公司 Storage method of static data file
CN110750529A (en) * 2018-07-04 2020-02-04 百度在线网络技术(北京)有限公司 Data processing method, device, equipment and storage medium
CN111026674A (en) * 2019-11-29 2020-04-17 维沃移动通信有限公司 Data storage method and electronic equipment
CN111090628A (en) * 2019-12-20 2020-05-01 上海米哈游网络科技股份有限公司 Data processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111666421A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
WO2021129762A1 (en) Application sharing method, electronic device and computer-readable storage medium
CN108763316B (en) Audio list management method and mobile terminal
CN109885574B (en) Data query method and device
CN108874280B (en) Screen division method, terminal and computer readable storage medium
US11543935B2 (en) Information processing method and terminal device
CN108984066B (en) Application icon display method and mobile terminal
CN107783709B (en) Image viewing method and mobile terminal
CN109885573B (en) data storage system maintenance method, device and mobile terminal
CN108920040B (en) Application icon sorting method and mobile terminal
CN110688497A (en) Resource information searching method and device, terminal equipment and storage medium
CN111163449B (en) Application sharing method, first electronic device and computer-readable storage medium
CN109902092B (en) Operation method and device of data storage system and mobile terminal
CN108089935B (en) Application program management method and mobile terminal
JP2021524203A (en) Object recognition method and mobile terminal
CN111666421B (en) Data processing method and device and electronic equipment
CN111475066B (en) Background switching method of application program and electronic equipment
CN110908751B (en) Information display and collection method and device, electronic equipment and medium
CN109508300B (en) Disk fragment sorting method and device and computer readable storage medium
CN107734049B (en) Network resource downloading method and device and mobile terminal
CN115167764A (en) Data read-write processing method and device, electronic equipment and storage medium
CN109976610B (en) Application program identifier classification method and terminal equipment
CN109189576B (en) Redis-based request processing method, server and computer-readable storage medium
CN108446345B (en) Data searching method and mobile terminal
CN113419701A (en) Sound effect setting method and related equipment
CN108255930B (en) Data cleaning method of mobile terminal and mobile terminal

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