CN113886401A - Data storage method, device, equipment and computer readable storage medium - Google Patents

Data storage method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN113886401A
CN113886401A CN202111262851.XA CN202111262851A CN113886401A CN 113886401 A CN113886401 A CN 113886401A CN 202111262851 A CN202111262851 A CN 202111262851A CN 113886401 A CN113886401 A CN 113886401A
Authority
CN
China
Prior art keywords
data
unit
database
stored
setting unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111262851.XA
Other languages
Chinese (zh)
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202111262851.XA priority Critical patent/CN113886401A/en
Publication of CN113886401A publication Critical patent/CN113886401A/en
Pending legal-status Critical Current

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/2291User-Defined Types; Storage management thereof
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

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 embodiment of the application discloses a data storage method, a device, equipment and a medium, which are used for acquiring data to be stored; and converting the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database. Under the condition of acquiring a data reading instruction carrying a target unit, uniformly converting data to be read in the database into data of the target unit based on the target unit and a database setting unit. In the data storage stage, based on the current unit of the data and the database setting unit, the data can be converted into the data of the database setting unit, and the unit unification of the data of the same data type in the database is ensured. When data is read, the data to be read only needs to be uniformly converted into the target unit, so that the operation flow of data unit conversion is simplified, and the efficiency of data unit conversion is improved.

Description

Data storage method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of data management technologies, and in particular, to a data hosting method, apparatus, device, and computer-readable storage medium.
Background
During the version evolution process of the nanotube object, the unit of the index may be modified, for example, the unit of the capacity is changed from GB to TB, the unit of the response time is changed from second to millisecond, and the like. Changes in the index unit may be attributed to changes in the index version. The management platform generally handles such version changes of different indexes as follows: and judging the version number of the managed object, and performing different processing on the management platform according to different versions. If the version is the initial version, the data is displayed according to the unit of the initial version; and if the new version exists, displaying the data according to the unit of the new version.
For information displayed in real time, the processing mode is not problematic. However, if the management platform needs to continuously collect and display the historical data and the current data, all the data need to be displayed in a uniform unit for the convenience of reading by the user. The general method is based on the unit of the latest version, the data of the new version is not processed, and the historical data outside the latest version in the database is subjected to unit conversion processing. Although it can be realized that all data is subject to the latest version, in practical application, the amount of historical data in the database is often too large, and the historical data stored at different stages may have different units for the same type of index. When reading and displaying the data, the proportional relation between the unit of each piece of historical data in the database and the unit of the currently required displayed data needs to be calculated. And then, sequentially converting each piece of historical data into data of a data unit required to be displayed currently according to the proportional relation corresponding to each piece of historical data, wherein the operation process is complicated.
Therefore, how to simplify the operation flow of data unit conversion and improve the efficiency of data unit conversion is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application aims to provide a data storage method, a data storage device, data storage equipment and a computer readable storage medium, which can simplify the operation flow of data unit conversion and improve the efficiency of data unit conversion.
In order to solve the foregoing technical problem, an embodiment of the present application provides a data hosting method, including:
acquiring data to be stored;
converting the data to be stored into data of a database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database;
under the condition of acquiring a data reading instruction carrying a target unit, uniformly converting data to be read in the database into data of the target unit based on the target unit and the database setting unit.
Optionally, the converting the data to be stored into data in a database setting unit according to the current unit of the data to be stored and the database setting unit includes:
and converting the data to be stored into the data of the database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
Optionally, before the converting the data to be stored into data in a database setting unit based on a multiple relationship between the current unit of the data to be stored and the database setting unit, the method further includes:
judging whether the data to be stored contains multiple information of new and old units; the new and old unit multiple information comprises the multiple relation between the current unit of the data to be stored and the set unit of the database;
and under the condition that the data to be stored contains multiple information of new and old units, executing the step of converting the data to be stored into data of a database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
Optionally, the method further comprises:
and under the condition that the data to be stored does not contain the multiple information of the new and old units, storing the data to be stored in the database.
Optionally, the database setting unit includes units corresponding to different data types respectively;
the storing the data of the database setting unit into the database includes:
and storing the data of the database setting unit into an area matched with the target data type in the database based on the target data type to which the data of the database setting unit belongs.
Optionally, the method further comprises:
and modifying the database setting unit into the standard unit under the condition of acquiring an adjusting instruction carrying the standard unit.
Optionally, after the converting the data to be stored into data in a database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data in the database setting unit into the database, the method further includes:
recording a current unit corresponding to the latest stored data;
storing the corresponding relation between the current unit and the database setting unit;
and when a display instruction is acquired, uniformly converting the data to be displayed in the database into the data of the current unit according to the corresponding relation, and displaying the data of the current unit.
The embodiment of the application also provides a data storage device, which comprises an acquisition unit, a first conversion unit, a storage unit and a second conversion unit;
the acquisition unit is used for acquiring data to be stored;
the first conversion unit is used for converting the data to be stored into data of a database setting unit according to the current unit of the data to be stored and the database setting unit;
the storage unit is used for storing the data of the database setting unit into the database;
the second conversion unit is configured to, when a data reading instruction carrying a target unit is acquired, uniformly convert data to be read in the database into data of the target unit based on the target unit and the database setting unit.
Optionally, the first conversion unit is configured to convert the data to be stored into data in a database setting unit based on a multiple relationship between the current unit of the data to be stored and the database setting unit.
Optionally, the system further comprises a judging unit;
the judging unit is used for judging whether the data to be stored contains new and old unit multiple information; the new and old unit multiple information comprises the multiple relation between the current unit of the data to be stored and the set unit of the database; and under the condition that the data to be stored contains multiple information of new and old units, triggering the first conversion unit to execute the step of converting the data to be stored into the data of the database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
Optionally, the storage unit is further configured to store the data to be stored in the database when the data to be stored does not include multiple information of new and old units.
Optionally, the database setting unit includes units corresponding to different data types respectively;
the storage unit is used for storing the data of the database setting unit to an area matched with the target data type in the database based on the target data type to which the data of the database setting unit belongs.
Optionally, a modification unit is further included;
and the modifying unit is used for modifying the database setting unit into the standard unit under the condition of acquiring the adjusting instruction carrying the standard unit.
Optionally, the system further comprises a recording unit, a storage unit and a display unit;
the recording unit is used for recording the current unit corresponding to the latest stored data;
the storage unit is used for storing the corresponding relation between the current unit and the database setting unit;
and the display unit is used for uniformly converting the data to be displayed in the database into the data of the current unit according to the corresponding relation and displaying the data of the current unit when a display instruction is obtained.
The embodiment of the present application further provides a data nanotube device, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the data hosting method as described above.
The embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the data nano-tube method.
According to the technical scheme, the data to be stored are obtained; and converting the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database. By uniformly converting the data to be stored into the database setting unit, the data of the same data type stored in the database can be ensured to have the same unit, and the condition that the data units stored at different stages are not uniform can not occur. Under the condition of acquiring a data reading instruction carrying a target unit, data of the same data type in the database have the same unit, so that the data to be read in the database can be uniformly converted into the data of the target unit based on the target unit and the unit set in the database. In the technical scheme, in the data storage stage, the data can be converted into the data in the database setting unit based on the current unit of the data and the database setting unit, and the unit unification of the data in the same data type in the database is ensured. Compared with the traditional mode that the corresponding conversion proportion of each piece of data to be read is calculated aiming at each piece of data to be read, so that each piece of data to be read is converted into the data of a target unit, when the data is read, as the data of the same data type in the database has the uniform unit, only the data to be read needs to be uniformly converted into the target unit, the operation flow of data unit conversion is simplified, and the efficiency of data unit conversion is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a flow chart of a data hosting method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a data nanotube apparatus according to an embodiment of the present application;
fig. 3 is a block diagram of a data hosting device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The terms "including" and "having," and any variations thereof, in the description and claims of this application and the drawings described above, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Next, a data hosting method provided by the embodiment of the present application is described in detail. Fig. 1 is a flowchart of a data hosting method provided in an embodiment of the present application, where the method includes:
s101: and acquiring data to be stored.
The data storage scheme provided by the embodiment of the application is suitable for an interactive process of storage equipment and a management platform. The hosting device can be a terminal device used by a user, and the user can transmit data to the management platform through the hosting device. For the sake of distinction, the data transmitted by the nanotube device to the management platform may be referred to as data to be stored.
S102: and converting the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database.
In order to realize that the data is stored according to a uniform unit, the data to be stored transmitted from the nanotube device to the management platform carries the current unit of the data. For example, the data to be stored contains capacity data, the current unit of capacity being Terabytes (TB), or the data to be stored contains response time data, the current unit of response time being milliseconds (ms).
The management platform records a database setting unit. After receiving the data to be stored, the management platform can convert the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit, so that the data of the database setting unit is stored into the database.
In consideration of practical application, the types of data are various, and the units corresponding to different data types are different. In the embodiment of the application, the data of the same data type is converted into a uniform unit and stored in the database, so that in order to distinguish the data of different data types, a corresponding identifier can be set for each data type, and the data to be stored carries the corresponding identifier, thereby facilitating the management platform to distinguish the data of different data types.
Setting database setting units corresponding to different data types, and recording the database setting units corresponding to different data types in the management platform, for example, for capacity data, the database setting unit may be Gigabyte (GB); the database setting unit may be seconds(s) for the response time.
In practical application, the data to be stored can be converted into the data in the database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
For example, assume that the data to be stored is capacity data, the data size thereof is 2TB, and the current unit carried by the data to be stored is TB. If the database is set to have a unit of GB, the relationship between TB and GB is as follows: and when the 1TB is 1024GB, the 2TB needs to be converted into 2 × 1024GB and stored into the database, so as to ensure that all the capacity data stored in the database takes GB as a uniform storage unit.
S103: under the condition of acquiring a data reading instruction carrying a target unit, uniformly converting data to be read in the database into data of the target unit based on the target unit and a database setting unit.
The target unit refers to a data unit that needs to be presented currently. Taking capacity data as an example, the database is set to have a unit of GB, and assuming that the target unit is TB, all the capacity data in the database is uniformly divided by 1024 to obtain capacity data in units of TB.
In consideration of the variety of data types, the database setting unit may include units corresponding to different data types.
In a specific implementation, to facilitate subsequent read call of data, different areas may be divided in the database for storing data of different data types. Therefore, when storing the data of the database setting unit into the database is executed, the data of the database setting unit can be stored into the area matched with the target data type in the database based on the target data type to which the data of the database setting unit belongs.
According to the technical scheme, the data to be stored are obtained; and converting the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database. By uniformly converting the data to be stored into the database setting unit, the data of the same data type stored in the database can be ensured to have the same unit, and the condition that the data units stored at different stages are not uniform can not occur. Under the condition of acquiring a data reading instruction carrying a target unit, data of the same data type in the database have the same unit, so that the data to be read in the database can be uniformly converted into the data of the target unit based on the target unit and the unit set in the database. In the technical scheme, in the data storage stage, the data can be converted into the data in the database setting unit based on the current unit of the data and the database setting unit, and the unit unification of the data in the same data type in the database is ensured. Compared with the traditional mode that the corresponding conversion proportion of each piece of data to be read is calculated aiming at each piece of data to be read, so that each piece of data to be read is converted into the data of a target unit, when the data is read, as the data of the same data type in the database has the uniform unit, only the data to be read needs to be uniformly converted into the target unit, the operation flow of data unit conversion is simplified, and the efficiency of data unit conversion is improved.
In practical application, the management platform can receive data to be stored transmitted by a plurality of nanotube devices. In order to reduce the calculation amount of the management platform, the nanotube device can carry the multiple information of new and old units when transmitting the data to be stored to the management platform.
When the current unit of the data to be stored is the same as the database setting unit, the multiple information of the new unit and the old unit does not need to be carried in the data to be stored; when the current unit of the data to be stored is different from the database setting unit, the data storage device can calculate the multiple relationship between the current unit of the data to be stored and the database setting unit, the multiple relationship is multiple information of the new and old units, and the data to be stored transmitted to the management platform by the data storage device at this time can carry the multiple information of the new and old units.
Correspondingly, before converting the data to be stored into the data of the database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit, the management platform can firstly judge whether the data to be stored contains multiple information of new and old units; the new and old unit multiple information comprises the multiple relation between the current unit of the data to be stored and the set unit of the database.
Under the condition that the data to be stored contains multiple information of new and old units, the current unit of the data to be stored is different from the set unit of the database, and in order to realize the unity of the units with the same data type in the database, the step of converting the data to be stored into the data of the set unit of the database based on the multiple relation between the current unit of the data to be stored and the set unit of the database needs to be executed.
Under the condition that the data to be stored does not contain the multiple information of the new unit and the old unit, the current unit of the data to be stored is the same as the set unit of the database, and the data to be stored can be directly stored in the database at the moment.
By carrying the multiple information of the new and old units in the data to be stored, the management platform can directly rely on the multiple information of the new and old units to realize data conversion, the management platform does not need to calculate the multiple relation based on the current unit of the data to be stored and the set unit of the database, and the calculation amount of the management platform is effectively reduced.
In practical applications, the database setting unit may also be adjusted to meet the current business requirements. In a specific implementation, the management platform modifies the database setting unit into the standard unit under the condition of acquiring the adjustment instruction carrying the standard unit.
The standard unit may be a unit set by a user, for example, the standard unit of capacity data may be set to TB. The standard unit of response time may be set to ms.
Modifying the database setting unit to the standard unit includes converting all data stored in the database to data corresponding to the standard unit.
The current business requirement can be met by modifying the set unit of the database. In practical application, the set unit of the database can be adjusted to a unit which is more likely to be displayed currently, so that a large amount of data read from the database can be directly displayed, and the calculation amount of data unit conversion is further reduced.
In consideration of the fact that in practical application, a user may not set a unit required to be displayed by data when reading the data from a database, the management platform can record a current unit corresponding to the latest stored data; storing the corresponding relation between the current unit and the set unit of the database; and when the display instruction is acquired, uniformly converting the data to be displayed in the database into the data of the current unit according to the corresponding relation, and displaying the data of the current unit.
The current unit corresponding to the latest stored data is closer to the current business requirement of the user, so that the management platform can improve the automation level of data display and the satisfaction degree of the user for reading the data based on the current unit corresponding to the latest stored data.
Fig. 2 is a schematic structural diagram of a data nanotube apparatus according to an embodiment of the present application, including an obtaining unit 21, a first converting unit 22, a storage unit 23, and a second converting unit 24;
an acquisition unit 21 configured to acquire data to be stored;
the first conversion unit 22 is used for converting the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit;
a storage unit 23 for storing data of a database setting unit into a database;
the second conversion unit 24 is configured to, when a data reading instruction carrying a target unit is obtained, uniformly convert data to be read in the database into data of the target unit based on the target unit and the database setting unit.
Optionally, the first conversion unit is configured to convert the data to be stored into the data in the database setting unit based on a multiple relationship between the current unit of the data to be stored and the database setting unit.
Optionally, the system further comprises a judging unit;
the judging unit is used for judging whether the data to be stored contains new and old unit multiple information; the new and old unit multiple information comprises the multiple relation between the current unit of the data to be stored and the set unit of the database; and under the condition that the data to be stored contains multiple information of new and old units, triggering the first conversion unit to execute the step of converting the data to be stored into the data of the database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
Optionally, the storage unit is further configured to store the data to be stored in the database when the data to be stored does not contain the multiple information of the new and old units.
Optionally, the database setting unit includes units corresponding to different data types;
the storage unit is used for storing the data of the database setting unit into an area matched with the target data type in the database based on the target data type to which the data of the database setting unit belongs.
Optionally, a modification unit is further included;
and the modifying unit is used for modifying the database setting unit into the standard unit under the condition of acquiring the adjusting instruction carrying the standard unit.
Optionally, the system further comprises a recording unit, a storage unit and a display unit;
the recording unit is used for recording the current unit corresponding to the latest stored data;
the storage unit is used for storing the corresponding relation between the current unit and the set unit of the database;
and the display unit is used for uniformly converting the data to be displayed in the database into the data of the current unit according to the corresponding relation and displaying the data of the current unit when the display instruction is obtained.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the data to be stored are obtained; and converting the data to be stored into the data of the database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database. By uniformly converting the data to be stored into the database setting unit, the data of the same data type stored in the database can be ensured to have the same unit, and the condition that the data units stored at different stages are not uniform can not occur. Under the condition of acquiring a data reading instruction carrying a target unit, data of the same data type in the database have the same unit, so that the data to be read in the database can be uniformly converted into the data of the target unit based on the target unit and the unit set in the database. In the technical scheme, in the data storage stage, the data can be converted into the data in the database setting unit based on the current unit of the data and the database setting unit, and the unit unification of the data in the same data type in the database is ensured. Compared with the traditional mode that the corresponding conversion proportion of each piece of data to be read is calculated aiming at each piece of data to be read, so that each piece of data to be read is converted into the data of a target unit, when the data is read, as the data of the same data type in the database has the uniform unit, only the data to be read needs to be uniformly converted into the target unit, the operation flow of data unit conversion is simplified, and the efficiency of data unit conversion is improved.
Fig. 3 is a structural diagram of a data hosting device according to an embodiment of the present application, and as shown in fig. 3, the data hosting device includes: a memory 20 for storing a computer program;
and a processor 21, configured to implement the steps of the data hosting method according to the above-mentioned embodiment when executing the computer program.
The data hosting device provided by the embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the data hosting method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. The data 203 may include, but is not limited to, the current unit of data to be stored and the unit of database settings, and the like.
In some embodiments, the data hosting device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in FIG. 3 does not constitute a limitation of a data nanotube device and may include more or fewer components than those shown.
It is understood that, if the data hosting method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be substantially or partially implemented in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, a magnetic or optical disk, and other various media capable of storing program codes.
Based on this, the embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the data hosting method as described above.
The functions of the functional modules of the computer-readable storage medium according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
A data hosting method, an apparatus, a device, and a computer readable storage medium provided by the embodiments of the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
A data hosting method, apparatus, device, and computer-readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A method for data hosting, comprising:
acquiring data to be stored;
converting the data to be stored into data of a database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data of the database setting unit into the database;
under the condition of acquiring a data reading instruction carrying a target unit, uniformly converting data to be read in the database into data of the target unit based on the target unit and the database setting unit.
2. The method according to claim 1, wherein the converting the data to be stored into the data in the database setting unit according to the current unit of the data to be stored and the database setting unit comprises:
and converting the data to be stored into the data of the database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
3. The data hosting method according to claim 2, further comprising, before the converting the data to be stored into data in database-set units based on a multiple relationship between the current unit of the data to be stored and the database-set unit:
judging whether the data to be stored contains multiple information of new and old units; the new and old unit multiple information comprises the multiple relation between the current unit of the data to be stored and the set unit of the database;
and under the condition that the data to be stored contains multiple information of new and old units, executing the step of converting the data to be stored into data of a database setting unit based on the multiple relation between the current unit of the data to be stored and the database setting unit.
4. The data hosting method of claim 3, further comprising:
and under the condition that the data to be stored does not contain the multiple information of the new and old units, storing the data to be stored in the database.
5. The method according to claim 1, wherein the database setting unit comprises units corresponding to different data types;
the storing the data of the database setting unit into the database includes:
and storing the data of the database setting unit into an area matched with the target data type in the database based on the target data type to which the data of the database setting unit belongs.
6. The data hosting method of claim 1, further comprising:
and modifying the database setting unit into the standard unit under the condition of acquiring an adjusting instruction carrying the standard unit.
7. The method according to any one of claims 1 to 6, wherein after the converting the data to be stored into the data in the database setting unit according to the current unit of the data to be stored and the database setting unit, and storing the data in the database setting unit into the database, the method further comprises:
recording a current unit corresponding to the latest stored data;
storing the corresponding relation between the current unit and the database setting unit;
and when a display instruction is acquired, uniformly converting the data to be displayed in the database into the data of the current unit according to the corresponding relation, and displaying the data of the current unit.
8. A data storage device is characterized by comprising an acquisition unit, a first conversion unit, a storage unit and a second conversion unit;
the acquisition unit is used for acquiring data to be stored;
the first conversion unit is used for converting the data to be stored into data of a database setting unit according to the current unit of the data to be stored and the database setting unit;
the storage unit is used for storing the data of the database setting unit into the database;
the second conversion unit is configured to, when a data reading instruction carrying a target unit is acquired, uniformly convert data to be read in the database into data of the target unit based on the target unit and the database setting unit.
9. A data hosting device, comprising:
a memory for storing a computer program;
a processor for executing said computer program to carry out the steps of the data hosting method according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of the data hosting method of any one of claims 1 to 7.
CN202111262851.XA 2021-10-28 2021-10-28 Data storage method, device, equipment and computer readable storage medium Pending CN113886401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111262851.XA CN113886401A (en) 2021-10-28 2021-10-28 Data storage method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111262851.XA CN113886401A (en) 2021-10-28 2021-10-28 Data storage method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113886401A true CN113886401A (en) 2022-01-04

Family

ID=79014978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111262851.XA Pending CN113886401A (en) 2021-10-28 2021-10-28 Data storage method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113886401A (en)

Similar Documents

Publication Publication Date Title
CN107256707B (en) Voice recognition method, system and terminal equipment
CN109561117B (en) Data acquisition method and device
CN104199879A (en) Data processing method and device
CN104601683A (en) File download management method, mobile terminal and communication system
CN111104178A (en) Dynamic library loading method, terminal device and storage medium
CN109582377A (en) BIOS option amending method, device, equipment and storage medium
CN115392501A (en) Data acquisition method and device, electronic equipment and storage medium
CN106095417B (en) A kind of prospect Application Program Interface refresh synchronization method and system
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN110955438A (en) Method, device and equipment for monitoring performance of small program and storage medium
CN107704362A (en) A kind of method and device based on Ambari monitoring big data components
CN113886401A (en) Data storage method, device, equipment and computer readable storage medium
CN111162792A (en) Compression method and device for power load data
CN106373121A (en) Fuzzy image identification method and apparatus
CN115935909A (en) File generation method and device and electronic equipment
CN109582338A (en) BIOS option amending method, device, equipment and storage medium
CN108259698A (en) Image scan method, system, device and computer readable storage medium
CN113051105A (en) Data processing method, device, equipment and storage medium
CN111027196A (en) Simulation analysis task processing method and device for power equipment and storage medium
CN112114931A (en) Deep learning program configuration method and device, electronic equipment and storage medium
CN113949601B (en) Inter-controller station communication method, device and computer readable storage medium
CN111831348A (en) Method and device for automatically configuring application and terminal equipment
CN115905288B (en) General method and device for generating reconciliation data by data reporting
CN114302425B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN109116756B (en) Equipment building method and system

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