CN112835978A - Data storage method and device and computer equipment - Google Patents

Data storage method and device and computer equipment Download PDF

Info

Publication number
CN112835978A
CN112835978A CN202110107240.1A CN202110107240A CN112835978A CN 112835978 A CN112835978 A CN 112835978A CN 202110107240 A CN202110107240 A CN 202110107240A CN 112835978 A CN112835978 A CN 112835978A
Authority
CN
China
Prior art keywords
data
synchronized
preset position
synchronization
type
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
CN202110107240.1A
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.)
Beijing Ziroom Information Technology Co Ltd
Original Assignee
Beijing Ziroom Information 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 Ziroom Information Technology Co Ltd filed Critical Beijing Ziroom Information Technology Co Ltd
Priority to CN202110107240.1A priority Critical patent/CN112835978A/en
Publication of CN112835978A publication Critical patent/CN112835978A/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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Environmental & Geological Engineering (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data storage method, a data storage device and computer equipment, wherein the data storage method comprises the following steps: acquiring data to be synchronized, and storing the data to be synchronized to the local; monitoring local network connection conditions; and when the local network connection is normal, automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized. According to the invention, the acquired data to be synchronized is stored locally, so that the normal work of workers can be supported according to the locally stored data under the condition of no network or weak network, when the network connection is normal, the automatic synchronization is carried out by combining the data types, and different data types correspond to different synchronization modes, so that the operation of manually selecting the synchronization mode is reduced, the time of synchronizing the data of the workers is reduced, and the working efficiency of the workers is improved.

Description

Data storage method and device and computer equipment
Technical Field
The invention relates to the technical field of data storage, in particular to a data storage method and device and computer equipment.
Background
The work high above the ground generally means work high above the ground, and means work performed by a worker at a height with a certain position as a reference. When the high-altitude worker uses the terminal device to perform high-altitude operation, when the terminal device is in a non-network or weak network, the work is not smooth, for example, after the high-altitude worker shoots an image, the high-altitude worker needs to take the terminal device to the ground, and the high-altitude worker transmits the image to the server for storage, so that the image is transmitted once every time one image is shot, and the work efficiency is low.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect of low working efficiency caused by the condition that the terminal device is in a non-network or weak network during high-altitude operation in the prior art, so as to provide a data storage method, an apparatus and a computer device.
According to a first aspect, the present invention discloses a data storage method, comprising the steps of: acquiring data to be synchronized, and storing the data to be synchronized to the local; monitoring local network connection conditions; and when the local network connection is normal, automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized.
Optionally, the acquiring data to be synchronized and storing the data to be synchronized locally includes: acquiring the data to be synchronized; determining the type of the data to be synchronized based on the source of the data to be synchronized; and storing the data to be synchronized in a local storage space corresponding to the type.
Optionally, the automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized includes: extracting the data to be synchronized from each local storage space to obtain target synchronization data and the type of the target synchronization data; determining a synchronization method by using the type of the target synchronization data; and automatically synchronizing the target synchronization data to the preset position based on the synchronization method.
Optionally, when the type of the target synchronization data is multimedia data, the automatically synchronizing the target synchronization data to the preset position based on the synchronization method includes: acquiring the address of the preset position; and automatically synchronizing the multimedia data to the preset position according to the address of the preset position based on the synchronization method.
Optionally, when the type of the target synchronization data is service data, the automatically synchronizing the target synchronization data to the preset position based on the synchronization method includes: acquiring the address of the preset position and the type information of the service data; determining a synchronization method of the service data according to the type information of the service data; and automatically synchronizing the service data to the preset position according to the synchronization method of the service data and the address of the preset position.
Optionally, when the type of the data to be synchronized is multimedia data, the storing the data to be synchronized in a local storage space corresponding to the type further includes: generating a target identifier corresponding to the multimedia data; acquiring the address of the preset position; and generating an access address of the multimedia data on the preset position based on the address of the preset position and the target identification.
Optionally, the automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized includes: monitoring to-be-synchronized data meeting preset clearing conditions to obtain to-be-cleared data; and deleting the data to be cleared from the local.
According to a second aspect, the present invention discloses a data storage device comprising: the acquisition module is used for acquiring data to be synchronized and storing the data to be synchronized to the local; the network connection condition monitoring module is used for monitoring the local network connection condition; and the synchronization module is used for automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized when the local network connection is normal.
According to a third aspect, the invention also discloses a computer device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the data storage method of the first aspect or any one of the optional embodiments of the first aspect.
According to a fourth aspect, the present invention also discloses a computer-readable storage medium, on which a computer program is stored, which computer program, when executed by a processor, performs the steps of the data storage method according to the first aspect or any one of the alternative embodiments of the first aspect.
The technical scheme of the invention has the following advantages:
according to the data storage method and device provided by the invention, the data to be synchronized is acquired and stored locally, the local network connection condition is monitored, and when the local network connection is normal, the data to be synchronized is automatically synchronized to the preset position based on the type of the data to be synchronized. According to the invention, the acquired data to be synchronized is stored locally, so that the normal work of workers can be supported according to the locally stored data under the condition of no network or weak network, when the network connection is normal, the automatic synchronization is carried out by combining the data types, and different data types correspond to different synchronization modes, so that the operation of manually selecting the synchronization mode is reduced, the time of synchronizing the data of the workers is reduced, and the working efficiency of the workers is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a specific example of a data storage method in an embodiment of the present invention;
FIG. 2 is a functional block diagram of a specific example of a data storage device in an embodiment of the present invention;
FIG. 3 is a diagram of an embodiment of a computer device.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention discloses a data storage method, which is applied to a processor of an intelligent terminal (such as a mobile phone, a tablet and the like) used by a worker, and comprises the following steps as shown in figure 1:
s11: and acquiring data to be synchronized, and storing the data to be synchronized to the local.
Illustratively, the data to be synchronized may be recorded data, video data, service data, and the like. The embodiment of the present invention does not specifically limit the data to be synchronized, and those skilled in the art can determine the data to be synchronized according to the actual requirements of the staff. Correspondingly, the method for acquiring the data to be synchronized can be used for acquiring the data from an image head and a recorder shot by the intelligent terminal, and can also be used for receiving the data manually filled in the APP by a worker by the intelligent terminal.
The data to be synchronized is stored locally, the data to be synchronized can be stored on an SD card of the intelligent terminal for the intelligent terminal, and can also be stored in a memory of the intelligent terminal or an APP database.
The data to be synchronized is stored locally, so that the data can be added, deleted, modified and inquired by workers at any time, the preset position is not required to be accessed in a short time without modification every time, the dependence on the preset position is reduced, and the waste of network bandwidth resources is reduced.
S12: and monitoring local network connection conditions.
Illustratively, the network connection scenario may include: normal network connection and abnormal network connection. Wherein, the network connection normally includes: the local network is in wifi mode or 4G network mode or 5G network mode. The network connection anomaly includes: the local network is disconnected or in 3G network mode or 2G network mode. The network connection condition can be monitored through the corresponding service in the data synchronization engine of the intelligent terminal.
S13: and when the local network connection is normal, automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized.
Exemplary types of data to be synchronized may include: multimedia data (picture data, audio recording data, video data, etc.) and service data, etc. The preset position can be a terminal corresponding to the service server or a cloud terminal. The embodiment of the invention does not specifically limit the type and the preset position of the data to be synchronized, and can be determined by a person skilled in the art according to the actual situation.
Different data types to be synchronized can correspond to different data synchronization methods, and the intelligent terminal is matched with different data synchronization methods for synchronization according to different data types. In the embodiment of the invention, the intelligent terminal server can synchronize one data to be synchronized at a time, and can synchronize a plurality of data to be synchronized at a time in order to reduce the network request times and reduce the network bandwidth and the power consumption of the intelligent terminal.
When the local network connection is abnormal, the data to be synchronized is kept to be stored locally, the intelligent terminal continues to monitor the local network connection condition until the local network connection is normal, and the data to be synchronized is automatically synchronized to a preset position.
According to the data storage method provided by the invention, the data to be synchronized is acquired and stored locally, the local network connection condition is monitored, and when the local network connection is normal, the data to be synchronized is automatically synchronized to the preset position based on the type of the data to be synchronized. According to the invention, the acquired data to be synchronized is stored locally, so that the normal work of workers can be supported according to the locally stored data under the condition of no network or weak network, when the network connection is normal, the automatic synchronization is carried out by combining the data types, and different data types correspond to different synchronization modes, so that the operation of manually selecting the synchronization mode is reduced, the time of synchronizing the data of the workers is reduced, and the working efficiency of the workers is improved.
As an optional implementation manner of the embodiment of the present invention, before automatically synchronizing the data to be synchronized to the preset position based on the type of the data to be synchronized, the data storage method further includes:
the intelligent terminal judges the synchronization state of the data to be synchronized according to the acquired data to be synchronized, automatically synchronizes the data to be synchronized to a preset position when the synchronization state is not synchronous, and does not process the data to be synchronized or deletes the data to be synchronized when the synchronization state is synchronous. The method avoids the repeated execution of the synchronization operation on the data to be synchronized, reduces the workload of the processor and reduces the network load.
As an optional implementation manner of the embodiment of the present invention, the step S11 includes:
first, data to be synchronized is acquired. The specific implementation manner is described in the above embodiment in relation to "acquiring data to be synchronized" in step S11, and is not described herein again.
Secondly, the type of the data to be synchronized is determined based on the source of the data to be synchronized.
Illustratively, the source of the synchronization data may be a sound recorder, a camera, a worker, a third party device (e.g., a smart terminal of a worker's colleague), and so on. The source of the data to be synchronized is not particularly limited in the embodiments of the present invention, and those skilled in the art can determine the source according to the actual situation of the data to be synchronized. The processor of the intelligent terminal can determine the source of the data to be synchronized according to different data interfaces, and further determine the type of the data to be synchronized according to the source of the data to be synchronized.
And thirdly, storing the data to be synchronized in a local storage space corresponding to the type.
For example, the local storage space may be preset in advance, for example, a multimedia data table is preset for multimedia data, and a service data table is preset for service data. The multimedia data table may store a primary key (String id), a data category (int type), a sort (int sort), a local file Path (String Path), a preset location access address (String url), a data synchronization state (int states), a creation time (time), an extension field (String info), group information (String group), a service (String token), and the like. The service data table may store a primary key (String id), a search key (String key), offline file group information (String file _ grope), service data text information (String content), creation time (time), data synchronization status (int states), extension field (String info), method routing address (String router), and the like. The embodiment of the invention does not specifically limit the storage contents of the multimedia data table and the service data table, and can be determined by a person skilled in the art according to the actual situation. And the intelligent terminal calls a local storage method to store the data to be synchronized in a local storage space corresponding to the type.
According to the embodiment of the invention, different types of data to be synchronized are stored in different storage spaces, different information is stored aiming at different data, the effect of accurately storing the information is achieved, and meanwhile, the data query by workers is facilitated.
As an optional implementation manner of the embodiment of the present invention, the step S13 includes:
firstly, data to be synchronized is extracted from each local storage space, and target synchronization data and the type of the target synchronization data are obtained.
Secondly, the type of the target synchronous data is used for determining a synchronous method.
And thirdly, automatically synchronizing the target synchronization data to a preset position based on a synchronization method.
For example, in the embodiment of the present invention, different synchronization methods may be synchronization using different data interfaces. For a certain APP, the data type and the corresponding method of the synchronization method are set in advance during the design. And after the intelligent terminal determines the target synchronous data, the corresponding data interface can be directly called to carry out data synchronization.
Because the data types are stored in the service data table, the types of the target synchronous data can be directly determined after the data to be synchronized are extracted from different local storage spaces.
As an optional implementation manner of the embodiment of the present invention, when the type of the target synchronization data is multimedia data, automatically synchronizing the target synchronization data to a preset position based on a synchronization method includes:
first, an address of a preset location is acquired.
For example, the address of the preset location may be an address of a service server, and may also be an address of a cloud server. In the embodiment of the invention, the intelligent terminal can store the address information of the preset position to the local and directly call the address information from the local when in use.
And secondly, automatically synchronizing the multimedia data to the preset position according to the address of the preset position based on a synchronization method.
As an optional implementation manner of the embodiment of the present invention, when the type of the target synchronization data is service data, automatically synchronizing the target synchronization data to a preset position based on a synchronization method includes:
the method comprises the steps of obtaining an address of a preset position and type information of service data, determining a synchronization method of the service data according to the type information of the service data, and automatically synchronizing the service data to the preset position according to the synchronization method of the service data and the address of the preset position.
For example, the method for acquiring the address of the preset location may refer to the above description of "acquiring the address of the preset location", and is not described herein again. The type information of the service data may be directly the type information of the service data, or may also be the routing information of the service data. The acquisition method can be directly called from the service data table for the intelligent terminal.
According to the embodiment of the invention, the service data synchronization interface is associated with the service data through the defined type information, and after the user submits the data to be synchronized to the local, the user does not need to worry about the mapping relation between the data to be synchronized and the interface, so that the user experience is improved.
As an optional implementation manner of the embodiment of the present invention, when the type of the data to be synchronized is multimedia data, storing the data to be synchronized in a local storage space corresponding to the type, further includes:
first, a target identifier corresponding to multimedia data is generated.
For example, the target identifier may be name information of the multimedia data, or may be a character string generated according to the multimedia data.
Specifically, the character string generated according to the multimedia data may be obtained by encrypting the hash value and the timestamp of the multimedia data by using an MD5 algorithm for the intelligent terminal.
Secondly, the address of the preset position is obtained. For a specific implementation method, reference is made to the description of "obtaining an address of a preset location", and details are not described herein again.
And thirdly, generating an access address of the multimedia data on the preset position based on the address of the preset position and the target identification. In the embodiment of the invention, the intelligent terminal can directly splice the address of the preset position and the target identification to obtain the access address. For example, the access address may be "http: com/group2/M00/19/BE/8a90a5d85841edb0015847dd78a80014.jpg ".
According to the method and the device, the access address of the multimedia data is generated at the terminal device, the process that each multimedia data needs to access the preset position to generate the access address of the preset position is avoided, the access times of the preset position are reduced, the waiting time for a user to access the preset position is reduced, and the user experience is improved.
As an optional implementation manner of the embodiment of the present invention, automatically synchronizing data to be synchronized to a preset position based on a type of the data to be synchronized includes:
and monitoring the data to be synchronized meeting the preset clearing condition to obtain the data to be cleared, and deleting the data to be cleared from the local.
For example, the preset clearing condition may be that the data synchronization state is synchronized data, the intelligent terminal marks the data whose data synchronization state is synchronized as data to be cleared, and deletes the data to be cleared from the local area.
In the embodiment of the present invention, the intelligent terminal may also clear the locally stored data to be synchronized at a preset time interval, for example, once every hour. The embodiment of the invention effectively avoids the problem of insufficient storage space of the terminal and also avoids the problem of low query efficiency caused by more data in the local storage space by regularly clearing the data to be cleared.
The embodiment of the present invention further discloses a data storage device, as shown in fig. 2, including:
the acquisition module 21 is configured to acquire data to be synchronized and store the data to be synchronized locally; the specific implementation manner is described in the above embodiment in relation to step S11, and is not described herein again.
A network connection condition monitoring module 22, configured to monitor a local network connection condition; the specific implementation manner is described in the above embodiment in relation to step S12, and is not described herein again.
The synchronization module 23 is configured to, when the local network connection is normal, automatically synchronize the data to be synchronized to a preset position based on the type of the data to be synchronized. The specific implementation manner is described in the above embodiment in relation to step S13, and is not described herein again.
The data storage device provided by the invention monitors the local network connection condition by acquiring the data to be synchronized and storing the data to be synchronized locally, and automatically synchronizes the data to be synchronized to the preset position based on the type of the data to be synchronized when the local network connection is normal. According to the invention, the acquired data to be synchronized is stored locally, so that the normal work of workers can be supported according to the locally stored data under the condition of no network or weak network, when the network connection is normal, the automatic synchronization is carried out by combining the data types, and different data types correspond to different synchronization modes, so that the operation of manually selecting the synchronization mode is reduced, the time of synchronizing the data of the workers is reduced, and the working efficiency of the workers is improved.
As an optional implementation manner of the embodiment of the present invention, the obtaining module 21 includes:
the acquisition submodule is used for acquiring data to be synchronized; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The data synchronization device comprises a data to be synchronized type determination module, a synchronization module and a synchronization module, wherein the data to be synchronized type determination module is used for determining the type of the data to be synchronized based on the source of the data to be synchronized; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the storage module is used for storing the data to be synchronized in the local storage space corresponding to the type. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the synchronization module 23 includes:
the extraction module is used for extracting data to be synchronized from each local storage space to obtain target synchronization data and the type of the target synchronization data; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The synchronization method determination module is used for determining a synchronization method by utilizing the type of the target synchronization data; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the first synchronization submodule is used for automatically synchronizing the target synchronization data to a preset position based on a synchronization method. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the type of the target synchronization data is multimedia data, and the synchronization module 23 includes:
the first address acquisition module is used for acquiring an address of a preset position; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the first synchronization method determination submodule is used for automatically synchronizing the multimedia data to the preset position according to the address of the preset position based on the synchronization method. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, the type of the target synchronization data is service data, and the synchronization module 23 includes:
the address and type acquisition module is used for acquiring the address of the preset position and the type information of the service data; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The second synchronization method determining submodule is used for determining the synchronization method of the service data according to the type information of the service data; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And automatically synchronizing the service data to the preset position according to the synchronization method of the service data and the address of the preset position. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, when the type of the data to be synchronized is multimedia data, the apparatus further includes:
the target identification generating module is used for generating a target identification corresponding to the multimedia data; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
The second address acquisition module is used for acquiring the address of the preset position; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the access address generating module is used for generating an access address of the multimedia data on the preset position based on the address of the preset position and the target identification. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
As an optional implementation manner of the embodiment of the present invention, automatically synchronizing data to be synchronized to a preset position based on a type of the data to be synchronized includes:
the data to be synchronized monitoring module is used for monitoring the data to be synchronized meeting the preset clearing condition to obtain the data to be cleared; the specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
And the deleting module is used for locally deleting the data to be cleared. The specific implementation manner is described in the relevant description of the corresponding steps in the above embodiments, and is not described herein again.
An embodiment of the present invention further provides a computer device, as shown in fig. 3, the computer device may include a processor 31 and a memory 32, where the processor 31 and the memory 32 may be connected by a bus or in another manner, and fig. 3 takes the example of being connected by a bus as an example.
The processor 31 may be a Central Processing Unit (CPU). The Processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 32, which is a non-transitory computer readable storage medium, can be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the data storage method in the embodiment of the present invention (for example, the obtaining module 21, the network connection condition monitoring module 22, and the synchronization module 23 shown in fig. 2). The processor 31 executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory 32, that is, implements the data storage method in the above method embodiment.
The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 31, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, and these remote memories may be connected to the processor 31 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 32 and, when executed by the processor 31, perform the data storage method in the embodiment shown in fig. 1.
The details of the computer device can be understood with reference to the corresponding related descriptions and effects in the embodiment shown in fig. 1, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method of storing data, comprising the steps of:
acquiring data to be synchronized, and storing the data to be synchronized to the local;
monitoring local network connection conditions;
and when the local network connection is normal, automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized.
2. The method of claim 1, wherein the obtaining the data to be synchronized and saving the data to be synchronized to a local place comprises:
acquiring the data to be synchronized;
determining the type of the data to be synchronized based on the source of the data to be synchronized;
and storing the data to be synchronized in a local storage space corresponding to the type.
3. The method of claim 2, wherein automatically synchronizing the data to be synchronized to a preset location based on the type of the data to be synchronized comprises:
extracting the data to be synchronized from each local storage space to obtain target synchronization data and the type of the target synchronization data;
determining a synchronization method by using the type of the target synchronization data;
and automatically synchronizing the target synchronization data to the preset position based on the synchronization method.
4. The method according to claim 3, wherein the automatically synchronizing the target synchronization data to the preset position based on the synchronization method when the type of the target synchronization data is multimedia data comprises:
acquiring the address of the preset position;
and automatically synchronizing the multimedia data to the preset position according to the address of the preset position based on the synchronization method.
5. The method according to claim 3, wherein when the type of the target synchronization data is traffic data, the automatically synchronizing the target synchronization data to the preset position based on the synchronization method comprises:
acquiring the address of the preset position and the type information of the service data;
determining a synchronization method of the service data according to the type information of the service data;
and automatically synchronizing the service data to the preset position according to the synchronization method of the service data and the address of the preset position.
6. The method according to claim 2, wherein when the type of the data to be synchronized is multimedia data, the saving the data to be synchronized in a local storage space corresponding to the type further comprises:
generating a target identifier corresponding to the multimedia data;
acquiring the address of the preset position;
and generating an access address of the multimedia data on the preset position based on the address of the preset position and the target identification.
7. The method according to any one of claims 1-6, wherein the automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized comprises:
monitoring to-be-synchronized data meeting preset clearing conditions to obtain to-be-cleared data;
and deleting the data to be cleared from the local.
8. A data storage device, comprising:
the acquisition module is used for acquiring data to be synchronized and storing the data to be synchronized to the local;
the network connection condition monitoring module is used for monitoring the local network connection condition;
and the synchronization module is used for automatically synchronizing the data to be synchronized to a preset position based on the type of the data to be synchronized when the local network connection is normal.
9. A computer device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the steps of the data storage method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the data storage method according to any one of claims 1 to 7.
CN202110107240.1A 2021-01-26 2021-01-26 Data storage method and device and computer equipment Pending CN112835978A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110107240.1A CN112835978A (en) 2021-01-26 2021-01-26 Data storage method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110107240.1A CN112835978A (en) 2021-01-26 2021-01-26 Data storage method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN112835978A true CN112835978A (en) 2021-05-25

Family

ID=75931761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110107240.1A Pending CN112835978A (en) 2021-01-26 2021-01-26 Data storage method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112835978A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116347435A (en) * 2023-01-05 2023-06-27 深圳市昂星科技有限公司 Driving data acquisition method and system
WO2023138353A1 (en) * 2022-01-21 2023-07-27 京东方科技集团股份有限公司 Picture processing method, electronic device and computer readable medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023138353A1 (en) * 2022-01-21 2023-07-27 京东方科技集团股份有限公司 Picture processing method, electronic device and computer readable medium
CN116347435A (en) * 2023-01-05 2023-06-27 深圳市昂星科技有限公司 Driving data acquisition method and system
CN116347435B (en) * 2023-01-05 2024-01-23 深圳市昂星科技有限公司 Driving data acquisition method and system

Similar Documents

Publication Publication Date Title
US9262899B2 (en) Method, device and system for implementing video recording retrieval
US20180359140A1 (en) Method, device, and system for processing a terminal fault
CN107770229B (en) Cloud file sharing method and system and cloud server
CN105447046A (en) Distributed system data consistency processing method, device and system
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
CN112835978A (en) Data storage method and device and computer equipment
CN107092686B (en) File management method and device based on cloud storage platform
WO2019057193A1 (en) Data deletion method and distributed storage system
CN113485962B (en) Log file storage method, device, equipment and storage medium
CN107040576A (en) Information-pushing method and device, communication system
CN103716384A (en) Method and device for realizing cloud storage data synchronization in cross-data-center manner
CN112052227A (en) Data change log processing method and device and electronic equipment
CN108063832B (en) Cloud storage system and storage method thereof
CN113051460A (en) Elasticissearch-based data retrieval method and system, electronic device and storage medium
CN110460668B (en) File uploading method and device, computer equipment and storage medium
CN111405215A (en) Video storage method and device, cloud server and storage medium
EP3579526A1 (en) Resource file feedback method and apparatus
CN111383038A (en) Advertisement display method and device of mobile terminal, mobile terminal and storage medium
CN103092988A (en) Realizing method of directly managing mobile phone media resources on desktop
CN112039936B (en) Data transmission method, first data processing equipment and monitoring system
WO2023125777A1 (en) Video recording data replenishment method, cloud storage server, system and storage medium
CN109189813B (en) Data sharing method and device
CN115205285B (en) Equipment with overhead line defect identification algorithm and defect identification method thereof
CN103812676A (en) Apparatus and method for realizing log data real-time association

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