[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2020088542A1 - 数据管理方法、装置、系统、服务器、终端及存储介质 - Google Patents

数据管理方法、装置、系统、服务器、终端及存储介质 Download PDF

Info

Publication number
WO2020088542A1
WO2020088542A1 PCT/CN2019/114426 CN2019114426W WO2020088542A1 WO 2020088542 A1 WO2020088542 A1 WO 2020088542A1 CN 2019114426 W CN2019114426 W CN 2019114426W WO 2020088542 A1 WO2020088542 A1 WO 2020088542A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
data
end device
server
start time
Prior art date
Application number
PCT/CN2019/114426
Other languages
English (en)
French (fr)
Inventor
许爱秋
刘锋
李海燕
Original Assignee
杭州海康威视系统技术有限公司
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 杭州海康威视系统技术有限公司 filed Critical 杭州海康威视系统技术有限公司
Publication of WO2020088542A1 publication Critical patent/WO2020088542A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/732Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Definitions

  • This application relates to the field of data processing, and in particular, to a data management method, device, system, server, terminal, and storage medium.
  • time zone scenarios may occur, such as terminals used by users, servers used to provide storage services in multiple time zones, or front-end equipment used to collect video data in multiple time zones, no matter where Various multi-time zone scenarios will generate data management requirements in multi-time zone scenarios.
  • the time when the server stores video data adopts standard time, that is, UTC (Coordinated Universal Time) or Unix timestamp.
  • the front-end device and the server are in the same time zone.
  • the terminal performs query operations on the video data collected by the front-end device, the user can enter the start time and end time of the query on the terminal.
  • the time type of the start time and end time is the time zone time of the server.
  • the terminal converts the start time and end time to standard time according to the time zone of the server, and sends a data query request to the server, so that the server returns the queried data to the terminal.
  • the front-end device needs to be in the same time zone as the server, and cannot meet the data management requirements of the front-end device in multiple time zones.
  • Embodiments of the present application provide a data management method, device, system, server, terminal, and storage medium, which can solve the problem that related technologies cannot meet the data management requirements of front-end devices in multiple time zones.
  • the technical solution is as follows:
  • a data management method includes:
  • the data query request carries the identifier of the front-end device, a first start time, and a first end time, and the time type of the first start time and the first end time is standard time;
  • the standard time is the time type of the start time and end time of the data stored by the server;
  • the time period between the start time and the end time of the target data is the first time period, the first time period is included in the time period between the first start time and the first end time, and the first time difference
  • the information is used to indicate the time difference between the time zone time of the front-end device in the first time period and the standard time;
  • Start time and end time including:
  • the queried data segment is used as the target data .
  • the time difference information corresponding to the queried data segment is used as the first time difference information, and the start time and end time of the queried data segment are used as the start time and end time of the target data.
  • the method before the data query request of the receiving terminal, the method further includes:
  • the time difference query request carries the identifier of the front-end device, a third start time, and a third end time, and the time types of the third start time and the third end time are all Describe the time zone time of the front-end equipment;
  • Second time difference information of the front-end device within a second time period, where the second time period is a time period between the third start time and the third end time, and the second time difference information is used to Indicating the time difference between the time zone time of the front-end device in the second time period and the standard time;
  • the acquiring time difference information of the front-end device within a second time period includes:
  • the third start time and the third end time query a time zone information table to obtain the time difference information, and the time zone information table is used to record the time difference information of the front-end device in at least one time period.
  • the method before the data query request of the receiving terminal, the method further includes:
  • the data collection plan includes the identification of the front-end device, a data collection time template, and a time zone strategy.
  • the data collection time template is used to indicate the front end The time period during which the device collects data.
  • the time zone strategy includes time zone information of the front-end device.
  • the method further includes:
  • the time zone strategy table includes the time zone strategy of the server and the front-end device and the corresponding strategy identifier
  • each time zone strategy includes the strategy type, time zone, time to enter daylight saving time, time to exit daylight saving time, and The time difference between daylight saving time and winter time
  • the strategy type includes the time zone strategy of the server and the time zone strategy of the front-end device.
  • the acquiring the data collected by the front-end device according to the data collection plan for storage includes:
  • the data collected by the front-end device is stored in segments to obtain multiple segments of data, which are collected by the front-end device in multiple time zones, and the multiple segments of data correspond to multiple time differences Information, the time difference information corresponding to each piece of data is used to indicate the time difference between the time zone time at which the front-end device collects each piece of data and the standard time.
  • a data management method includes:
  • the data query request carries the identifier of the front-end device, the first start time, and the first end time, and the time type of the first start time and the first end time is standard time;
  • the standard time is the time type of the start time and end time of the data stored by the server;
  • the time period between the start time and the end time of the target data is the first time period, and the first time The period is included in the time period between the first start time and the first end time, and the first time difference information is used to indicate the time zone time and the standard of the front-end device in the first time period Time difference
  • the start time and end time of the target data are converted into a second start time and a second end time, the time type of the second start time and the second end time is the Time zone time of front-end equipment;
  • the target data and the second start time and the second end time are displayed.
  • the sending a data query request to the server includes:
  • the input start time and end time of the front-end device are acquired and the time type of the input start time and end time is the standard time, the input start time and end time are used as the first Sending the data query request to the server at the start time and the first end time.
  • the method before sending the data query request to the server, the method further includes:
  • the time difference query request is sent to the server, and the time types of the third start time and the third end time are all The time zone time of the front-end device, the time difference query request carries the identifier of the front-end device, the third start time, and the third end time;
  • Second time difference information sent by a server, where the second time difference information is used to indicate a time difference between the time zone time of the front-end device within a second time period and the standard time, and the second time period is the third The time period between the start time and the third end time;
  • the third start time and the third end time are converted into the first start time and the first end time.
  • a data management device in a third aspect, includes:
  • the receiving module is used to receive a data query request of the terminal, where the data query request carries the identifier of the front-end device, the first start time and the first end time, and the time type of the first start time and the first end time is Standard time, where the standard time is a time type of a start time and an end time of storing data by the server;
  • An obtaining module configured to obtain target data, first time difference information and the start time and time of the target data collected by the front-end device according to the identifier of the front-end device, the first start time and the first end time End time, the time period between the start time and the end time of the target data is the first time period, and the first time period is included in the time period between the first start time and the first end time,
  • the first time difference information is used to indicate the time difference between the time zone time of the front-end device in the first time period and the standard time;
  • the sending module is configured to send the target data, the first time difference information, and the start time and end time of the target data to the terminal.
  • the acquisition module is used to:
  • the queried data segment is used as the target data .
  • the time difference information corresponding to the queried data segment is used as the first time difference information, and the start time and end time of the queried data segment are used as the start time and end time of the target data.
  • the receiving module is further configured to receive a time difference query request of the terminal, where the time difference query request carries the identifier of the front-end device, a third start time, and a third end time.
  • the time type of the three start time and the third end time is the time zone time of the front-end device;
  • the obtaining module is further used to obtain second time difference information of the front-end device within a second time period, where the second time period is a time period between the third start time and the third end time.
  • the second time difference information is used to indicate the time difference between the time zone time of the front-end device in the second time period and the standard time;
  • the sending module is further configured to send the second time difference information to the terminal.
  • the acquiring module is configured to query a time zone information table according to the third start time and the third end time to obtain the time difference information, and the time zone information table is used to record the Time difference information of the front-end device in at least one time period.
  • the acquiring module is further configured to acquire and store data collected by the front-end device according to a data collection plan, and the data collection plan includes an identification of the front-end device, a data collection time template, and The identifier of the time zone strategy, the data collection time template is used to indicate the time period for the front-end device to perform data collection, and the time zone strategy includes the time zone information of the front-end device.
  • the obtaining module is further used to obtain a time zone policy table, the time zone policy table includes the time zone policies of the server and the front-end device, and corresponding policy identifiers, and each time zone policy includes a policy type , Time zone, time to enter daylight saving time, time to exit daylight saving time, and the time difference between daylight saving time and winter time, the policy types include the time zone policy of the server and the time zone policy of the front-end device.
  • the acquisition module is used to:
  • the data collected by the front-end device is stored in segments to obtain multiple segments of data, which are collected by the front-end device in multiple time zones, and the multiple segments of data correspond to multiple time differences Information, the time difference information corresponding to each piece of data is used to indicate the time difference between the time zone time at which the front-end device collects each piece of data and the standard time.
  • a data management device includes:
  • the sending module is used to send a data query request to the server, where the data query request carries the identifier of the front-end device, the first start time and the first end time, and the time type of the first start time and the first end time is Standard time, where the standard time is a time type of a start time and an end time of storing data by the server;
  • a receiving module configured to receive target data sent by the server, first time difference information, and a start time and an end time of the target data, and the time period between the start time and the end time of the target data is the first time period,
  • the first time period is included in a time period between the first start time and the first end time, and the first time difference information is used to indicate the time zone of the front-end device in the first time period The time difference between the time and the standard time;
  • a conversion module configured to convert the start time and end time of the target data to a second start time and second end time according to the first time difference information, the second start time and the second end time
  • the time type is the time zone time of the front-end device
  • a display module is used to display the target data and the second start time and the second end time.
  • the sending module is configured to: when the input identifier, start time and end time of the front-end device are acquired and the time type of the input start time and end time is the standard time, The input start time and end time are used as the first start time and the first end time, and the data query request is sent to the server.
  • the sending module is further configured to send the time difference query request to the server when the input identifier, third start time, and third end time of the front-end device are obtained.
  • the time type of the three start times and the third end time is the time zone time of the front-end device, and the time difference query request carries the identifier of the front-end device, the third start time, and the third end time;
  • the receiving module is further configured to receive second time difference information sent by the server, where the second time difference information is used to indicate the time difference between the time zone time of the front-end device in the second time period and the standard time, the second The time period is the time period between the third start time and the third end time;
  • the conversion module is configured to convert the third start time and the third end time to the first start time and the first end time according to the time difference information.
  • a data management system in a fifth aspect, includes a front-end device, a server, and a terminal.
  • the front-end device is used to collect data and send the collected data to the server;
  • the server is used to store the data collected by the front-end device in standard time
  • the terminal is used to send a data query request to the server, where the data query request carries the identifier of the front-end device, the first start time and the first end time, and the time type of the first start time and the first end time is Standard time, where the standard time is a time type of a start time and an end time of storing data by the server;
  • the server is also used to obtain the target data and the first data collected by the front-end device according to the identifier of the front-end device, the first start time, and the first end time when receiving a data query request from the terminal.
  • the time difference information and the start time and end time of the target data are sent to the terminal.
  • the time period between the start time and the end time of the target data is the first time period.
  • the first time period is included in the In the time period between the first start time and the first end time, the first time difference information is used to indicate the time difference between the time zone time of the front-end device in the first time period and the standard time;
  • the terminal is further configured to, when receiving the target data sent by the server, the first time difference information, and the start time and end time of the target data, according to the first time difference information, the target data start time and The end time is converted into a second start time and a second end time, the time type of the second start time and the second end time is the time zone time of the front-end device, and the target data and the second start time are displayed Time and the second end time.
  • a server including a processor and a memory; the memory is used to store at least one instruction; the processor is used to execute at least one instruction stored on the memory to implement the first aspect The method steps described in any implementation manner.
  • a terminal including a processor and a memory; the memory is used to store at least one instruction; the processor is used to execute at least one instruction stored on the memory to implement the second aspect The method steps described in any implementation manner.
  • a computer-readable storage medium where at least one instruction is stored in the computer-readable storage medium, and when the at least one instruction is executed by a processor, any one of the implementation manners of any of the foregoing aspects is implemented Method steps.
  • the target data collected by the front-end device, the first time difference information, and the start of the target data are obtained according to the identifier, first start time, and first end time of the front-end device carried in the data query request Return to the terminal after the time and end time.
  • the terminal can use the first time difference information to start and end the target data.
  • the time is converted to the time zone of the front-end device and displayed.
  • FIG. 1 is a schematic diagram of a data management system provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a data management method provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a data management method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a data management method provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of configuring a time zone policy provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of acquiring data provided by an embodiment of the present application.
  • FIG. 7 is a structural diagram of a data storage provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of a data management method provided by an embodiment of the present application.
  • FIG. 9 is a flowchart of a data query provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a data management device according to an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a data management device according to an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a terminal 1200 provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a server 1300 provided by an embodiment of the present application.
  • Unix timestamp also known as Unix time (Unix time), POSIX time (POSIX time), is a time representation method, defined as from Greenwich Mean Time, January 1, 1980, 00:00:00 The total number of seconds from now.
  • Daylight saving time is also called daylight saving time, daylight saving time, and daylight saving time. It is a local time system that is artificially specified to save energy. Usually in early summer, the time bar is artificially faster by one hour Daylight saving time differs from winter time by an hour. The specific regulations of different countries adopting daylight saving time are different. At present, there are nearly 110 countries in the world that implement daylight saving time every year.
  • UTC time Coordinated universal time, also known as universal time, universal standard time, and international coordinated time. Because English (CUT) and French (TUC) abbreviations are different, as a compromise, referred to as UTC.
  • Coordinated Universal Time is a time measurement system based on the length of the atomic time in seconds and as close as possible to Universal Time in time.
  • FIG. 1 is a schematic diagram of a data management system provided by an embodiment of the present application.
  • the data management system may include a front-end device 101, a server 102, and a terminal 103.
  • the front-end device 101 is used to collect data, such as video data, and send the collected data to the server 102 for storage.
  • the front-end device 101 may be an IPC (IP Camera, network camera), or other devices with a data collection function.
  • the server 102 is used to store the data collected by the front-end device 101 in standard time.
  • the server 102 is also used to obtain corresponding data when receiving a data query request from the terminal 103, and send the acquired data to the terminal 103.
  • the server 102 may refer to a server or a server cluster composed of multiple servers.
  • the multiple servers may include a data management server, a data collection plan management server, a video access server, and a video storage server.
  • the server 102 may be a server in a cloud storage system.
  • the terminal 103 is used to send a time difference query request to the server 102, and the terminal 103 is also used to send a data query request to the server 102 after receiving the time difference information sent by the server 102.
  • the data query request is used to obtain data collected by the front-end device 101.
  • the terminal 103 may be a user device such as a smart phone, a tablet computer, a notebook computer, or a desktop computer.
  • FIG. 2 is a flowchart of a data management method provided by an embodiment of the present application. Referring to Figure 2, the method includes:
  • 201 Receive a data query request from a terminal, where the data query request carries the identifier of the front-end device, a first start time, and a first end time.
  • the time type of the first start time and the first end time is standard time, and the standard time The time type of the start time and end time for storing data for this server.
  • the time period between the time and the end time is the first time period.
  • the first time period is included in the time period between the first start time and the first end time.
  • the first time difference information is used to indicate that the front-end device is The time difference between the time zone in the first time period and the standard time.
  • the method provided by the embodiment of the present application obtains the target data and the first data collected by the front-end device according to the identifier, the first start time and the first end time of the front-end device carried in the data query request when receiving the data query request of the terminal
  • the time difference information and the start time and end time of the target data are returned to the terminal. Since the first time difference information is used to indicate the time difference between the time zone time when the front-end device is collecting target data and the standard time, the terminal can use the first time difference information Convert the start time and end time of the target data to the time zone time of the front-end device and display it.
  • the above solution supports the front-end equipment in different time zones to access the server.
  • the front-end equipment and the server can be in different time zones. Different front-end equipment can be in different time zones. Data management needs of devices in multiple time zones.
  • FIG. 3 is a flowchart of a data management method provided by an embodiment of the present application. Referring to FIG. 3, the method includes:
  • the server sends a data query request to the server, where the data query request carries the identifier of the front-end device, the first start time, and the first end time.
  • the time type of the first start time and the first end time is standard time, and the standard time The time type of the start time and end time for storing data for this server;
  • the 302. Receive the target data sent by the server, the first time difference information, and the start time and end time of the target data.
  • the time period between the start time and the end time of the target data is the first time period.
  • the first time period includes In the time period between the first start time and the first end time, the first time difference information is used to indicate the time difference between the time zone time of the front-end device in the first time period and the standard time;
  • the time type of the second start time and the second end time is that of the front-end device Time zone time
  • the method provided in the embodiment of the present application sends a data query request to the server, and upon receiving the target data returned by the server, the first time difference information, and the start time and end time of the target data, according to the first time difference information, the target data
  • the start time and end time are converted to the time zone time of the front-end device and displayed.
  • the above solution supports the front-end devices in different time zones to access the server.
  • the front-end devices can be in different time zones with the server, different front-end devices can be in different time zones, and the same front-end device can be in different time zones in different time periods to meet the front-end requirements. Data management needs of devices in multiple time zones.
  • FIG. 4 is a flowchart of a data management method provided by an embodiment of the present application. Referring to Figure 4, the method includes:
  • the server obtains the time zone strategy of the server and the time zone strategy of the front-end device.
  • multiple time zone policies may be configured in the server, and these time zone policies may be divided into two types, one is the server's time zone strategy, and the other is the time zone strategy of the front-end device.
  • the time zone policy includes the policy type, time zone, time to enter daylight saving time, time to exit daylight saving time, and the time difference between daylight saving time and winter time.
  • the type of policy is used to distinguish the time zone policy between the front-end device and the server.
  • the time zone can be East Second District, East Eight District, etc. If the time zone where the device is located is daylight saving time from 13:00 on March 1 to 15:00 on October 1 every year, the time to enter daylight saving time is March At 13:00 on the 1st, daylight saving time is 15:00 on October 1.
  • the configuration of the above time zone strategy may be configured through a web page (web page), or through an SDK (Software Development Kit) interface.
  • the specific implementation process of configuring the time zone policy may include the following three steps a to c:
  • Step a Configure the server's time zone strategy through the web page.
  • the user can log in to the configuration page of the time zone policy on the terminal, and the user can enter and submit the server's time zone policy on the configuration web page, triggering the terminal to send the server's time zone policy to the server, and the server storing the time zone policy, thereby Complete the configuration of the server's time zone policy.
  • the server's time zone strategy is the default time zone strategy. If the front-end device does not specify the time zone strategy it uses, the server can use the server's time zone strategy by default.
  • Step b Configure the time zone policy of the front-end device through the SDK interface.
  • the terminal can call the server SDK interface (cloud storage SDK interface) to connect to the server and add the time zone policy of the front-end device. After the operation is successful, the SDK interface can return a unique policy ID (Identification) to the terminal, where the policy ID refers to The identification of the time zone strategy.
  • server SDK interface cloud storage SDK interface
  • the SDK interface can return a unique policy ID (Identification) to the terminal, where the policy ID refers to The identification of the time zone strategy.
  • the server can be connected to one or more front-end devices. Accordingly, in step b, the time zone policy of at least one front-end device can be configured through the SDK interface.
  • Step c The server obtains and saves the time zone policy table.
  • the time zone strategy table includes the time zone strategy of the server and the front-end device and the corresponding strategy ID.
  • Each time zone policy includes the policy ID, policy type, time zone, time to enter daylight saving time, time to exit daylight saving time, and the time difference between daylight saving time and winter time. Among them, the policy ID is used to distinguish different time zone policies. Time zone strategy and time zone strategy of the front-end device.
  • the server After the server obtains the time zone policies of the server and each front-end device through the above steps a and b, it can generate the identification of each time zone policy; according to the identification of each time zone policy, the server's time zone policy and the time zone policy of the front-end device, the time zone is generated Strategy table.
  • the server can store the collected data according to the time zone strategy of each front-end device and provide it to the terminal for data query.
  • the above method only uses the configuration of the server's time zone policy through the web page and the time zone policy of the front-end device through the SDK interface as an example. It can be understood that the server's time zone policy can also be configured through the SDK interface. The time zone strategy can also be configured through a webpage, which is not limited in the embodiments of the present application.
  • FIG. 5 is a flowchart of configuring a time zone strategy provided by an embodiment of the present application.
  • the server may include a video management service module and a data collection plan management service module , Video access service module and video storage service module.
  • the video management service module is used to manage the configuration of the time zone strategy and the storage of video data;
  • the data collection plan management service module is used to configure the data collection plan (recording plan);
  • the video access service module is used to receive the video data sent by the front-end device ;
  • Video storage service module is used to store video data.
  • the data collection plan management service module can synchronize the time zone strategy table from the video management service module in time, including the time zone strategy of the server and the time zone strategy of the front-end device. For example, the video management service module may send the time zone strategy table to the data collection plan management service module at regular time or in real time. In addition, the data collection plan management service module can synchronize the time zone policy table to the video access service module in time. For example, the data collection plan management service module can send the time zone policy table to the video access service module at regular or real time.
  • FIG. 5 illustrates the integration of functions of four modules, such as a video management service module, a data collection plan management service module, a video access service module, and a video storage service module, on a server.
  • the above four The interaction process of modules is the interaction process between modules in the same server. It can be understood that the functions of each of the above modules can also be provided by a server, that is, the interaction process of the above four modules is actually an interaction process between the four servers, and this embodiment of the present application does not do this limited.
  • the server obtains data from the front-end device for storage.
  • the server may obtain and store the data collected by the front-end device according to the data collection plan.
  • the data collection plan includes the identification of the front-end device, a data collection time template, and an identification of a time zone strategy.
  • the data collection time template is used to indicate the time period during which the front-end device performs data collection.
  • the time zone strategy includes time zone information of the front-end device.
  • the configuration process of the data collection plan is the same as the configuration process of the time zone strategy.
  • the terminal can configure the data collection plan to the server through the SDK interface.
  • the data collection plan can also be configured through the web page, which is not limited in the embodiments of the present application .
  • the server may store the data of any front-end device by: acquiring the time zone policy of the front-end device according to the identifier of the time zone policy of the front-end device in the data collection plan; and according to the time zone of the front-end device
  • the strategy is to store the data collected by the front-end device in sections to obtain multiple pieces of data.
  • the multiple pieces of data are collected by the front-end device in multiple time zones.
  • the multiple pieces of data correspond to multiple time difference information.
  • the time difference information corresponding to each piece of data is used to Instruct the front-end device to collect the time difference between the time zone of each piece of data and the standard time.
  • the server When the server receives the data collected by any front-end device, it can query the time zone policy table according to the time zone policy identifier of the front-end device to determine the time zone strategy of the front-end device, so as to know the time difference information of the front-end device in each time period.
  • the server The data collected in the same time zone can be divided into one segment based on the time difference information of the front-end device in each time period, and the data collected in the same time zone can be divided into one segment, so that one segment of data corresponds to one time difference information.
  • the data collected by the front-end device in each time zone and each time zone can be better distinguished, which is convenient for users to perform query operations.
  • FIG. 6 is a flowchart of acquiring data provided by an embodiment of the present application.
  • the terminal can configure the data collection plan to the data collection plan management service module through the SDK interface.
  • the data collection plan management service module is used to deliver the data collection plan to the video access service module.
  • the video access service module According to the information in the data collection plan, perform the task of obtaining real-time data streams from the front-end device.
  • the video access service module After the video access service module obtains the data, it can write the data to the video storage service module.
  • the video access service module needs to first communicate with the video management service module to apply for storage resources.
  • the video access service module can The video management service module sends an application resource agreement, which includes the encoder ID of the front-end device, the start time of the video data, and time difference information of the front-end device (the time difference between the time zone time of the front-end device and the standard time).
  • the video management service module After receiving the application resource agreement, the video management service module can return the applied storage resources to the video access service module according to the resource allocation strategy (load balancing strategy).
  • the video management service module can record the time zone information of the front-end device.
  • the video management service module may record the time zone information of the front-end device in the time zone information table.
  • a time zone information table is provided.
  • the time zone information table may record the encoder ID of the front-end device and the time difference information of the front-end device in at least one time period.
  • the video management service module can add a record to the time zone information table each time the time difference changes.
  • Table 1 the time zone of the front-end device with the encoder ID Test1 from 23:00 on January 12, 2018 to 23:00 on April 12, 2018 is East 3, and the time difference is 3 hours ( hour)
  • the front-end device changed at 23:00 on April 12, 2018, from East 3 to East 2 and the time difference was changed to 2 hours
  • the server can add a record to the video management service module. Since the time difference has changed from 3 hours to 2 hours, therefore, 23:00 on April 12, 2018 will be changed to 22:00 on April 12, 2018. If there is a change, the start time of the newly added record is 22:00 on April 12, 2018, and the end time is the current time.
  • the reason for the time difference change may also be the change of daylight saving time and winter time, such as the front-end device from summer time to east time, or The device enters daylight saving time from east time.
  • the video access service module When the video access service module writes the video data to the video storage service module, it can provide the time difference information of the video data (the time difference information of the front-end device that sent the video data) to the video storage service module, and the video storage service module will The information is saved in the storage block device for backup.
  • Video data is written into the underlying block device by the video storage service module for storage.
  • FIG. 7 is a structural diagram of a data storage provided by an embodiment of the present application.
  • the video storage service module may divide the video data into several video segments, such as video segments 1 and video segment 2.
  • the segment information corresponding to each video segment includes the start time, end time, and time difference from the UTC time of the segment.
  • the video management service module can use standard time for data storage.
  • the terminal sends a data query request to the server.
  • the data query request carries the identifier of the front-end device, the first start time, and the first end time.
  • the time type of the first start time and the first end time is standard time.
  • the standard Time is the time type of the start time and end time of the data stored by the server.
  • the user can query, download, or playback the data collected by a front-end device, where the query operation needs to be performed before downloading and playback, that is, , You need to query the data collected by the front-end device first.
  • the user may input the identifier of the front-end device to be queried and the query time period on the terminal, including the start time and the end time.
  • the terminal when the terminal obtains the identifier, start time and end time of the front-end device input by the user and the time of the input start time and end time
  • the terminal may use the input start time and end time as the first start time and the first end time, and send the data query request to the server.
  • the time type of the start time and end time of the server storage data is UTC time
  • the time type of the start time and end time entered by the user on the terminal is also UTC time
  • the terminal can directly enter the start time and end time entered by the user As the first start time and the first end time, in this way, the time type of the first start time and the first end time is UTC time.
  • the terminal needs to convert the start time and end time entered by the user first Is a Unix timestamp, for example, the terminal can convert UTC time to Unix timestamp through the SDK interface, and use the converted start time and end time as the first start time and the first end time. In this way, the first start time and the first end time
  • the time type of an end time is Unix timestamp.
  • the server When receiving the data query request from the terminal, the server obtains the target data, the first time difference information and the target data collected by the front-end device according to the identifier of the front-end device, the first start time, and the first end time Start time and end time.
  • the time period between the start time and the end time of the target data is a first time period
  • the first time period is included in the time period between the first start time and the first end time
  • the first time difference information It is used to indicate the time difference between the time zone time of the front-end device in the first time period and the standard time.
  • the server when the server receives the data query request of the terminal, it may query the stored data according to the first start time and the first end time carried in the data query request. Since the time type of the start time and end time of the server storing data is standard time, and the time type of the first start time and first end time is also standard time, therefore, in a possible implementation manner, the server obtains the target data.
  • the process of the first time difference information and the start time and end time of the target data includes: according to the identifier of the front-end device, the first start time and the first end time, query the stored data segments, the corresponding data segment Time difference information and the start time and end time of each data segment; when the time period between the start time and end time of any data segment is included in the time period between the first start time and the first end time , Use the queried data segment as the target data, the time difference information corresponding to the queried data segment as the first time difference information, and the start time and end time of the queried data segment as the start time and end of the
  • the server stores the data collected by the front-end device in segments, and when querying the target data, when the start time and end time of any data segment are included between the first start time and the first end time During the time period, the server can return the data to the terminal as a query result.
  • the server queries the target data it can also query the start time, end time, and first time difference information recorded in the information of the target data.
  • the server sends the target data, the first time difference information, and the start time and end time of the target data to the terminal.
  • the server when the server returns the target data as a query result to the terminal, it can also return the start time and end time of the target data and the corresponding first time difference information to the terminal.
  • the terminal converts the start time and end time of the target data into the second start time and the second time according to the first time difference information Second end time, the time type of the second start time and the second end time is the time zone time of the front-end device.
  • the second start time is the time when the front-end device starts collecting the target data
  • the second end time is the time when the front-end device ends collecting the target data
  • the terminal can also determine after receiving the target data returned by the server The local time zone time when the front-end device collected the target data.
  • the first time difference information indicates the time difference between the time zone time and the standard time when the front-end device collects the target data. Therefore, the terminal can convert the start time and end time of the target data into the local time zone time of the front-end device according to the first time difference information corresponding to the target data.
  • the terminal needs to convert the UTC time to the time zone time of the front-end device, for example, the terminal The UTC time can be converted to the time zone time of the front-end device through the SDK interface, thereby obtaining the second start time and the second end time.
  • the terminal needs to convert the Unix timestamp to the time zone time of the front-end device, For example, the terminal can convert the Unix timestamp to the time zone time of the front-end device through the SDK interface, thereby obtaining the second start time and the second end time.
  • the terminal displays the target data and the second start time and the second end time.
  • the terminal may display the target data.
  • the terminal can also display the local time zone time when the front-end device collects the target data, that is, the second start time and the second end time, so that the user can know the start time and end time of the front-end device to collect the data, In this way, an event that occurs within the collection range of the front-end device within this time period is known.
  • the terminal when the terminal displays the target data and the second start time and the second end time, it can also display the first time difference information corresponding to the target data, so that the user can know that the front-end device is collecting the target data The time difference between the time zone and the standard time.
  • the technical solutions provided by the embodiments of the present application simultaneously support data management of terminals, servers, and front-end devices under different time zone strategies.
  • the front-end equipment that supports multiple time zones can be accessed.
  • the encoder 1 of the front-end equipment 1 is in the east two area
  • the encoder 2 of the front-end equipment 2 is in the east eight area.
  • the system automatically recognizes that the front-end device 1 uses the local time of the East 2 area for query, playback, and download operations, and the front-end device 2 uses the local time of the East 8 area for query, playback, and download operations.
  • the above technical solution also supports multiple time zone strategy data management methods of the same front-end device.
  • the time zone of the encoder 1 of the front-end device 1 is the east two zone in January. In February, it was changed to the east three zone due to human factors.
  • the system automatically recognizes the time zone difference in different time periods. , Returns the corresponding query, playback, and download results.
  • the technical solution supports the method of querying data according to standard time.
  • the server In addition to returning data, the server also returns time zone information corresponding to the data.
  • the method provided by the embodiment of the present application obtains the target data and the first data collected by the front-end device according to the identifier, the first start time and the first end time of the front-end device carried in the data query request when receiving the data query request of the terminal
  • the time difference information and the start time and end time of the target data are returned to the terminal. Since the first time difference information is used to indicate the time difference between the time zone time when the front-end device is collecting the target data and the standard time, the terminal can use the first time difference information, Convert the start time and end time of the target data to the time zone time of the front-end device and display it.
  • the above solution supports the front-end devices in different time zones to access the server.
  • the front-end devices can be in different time zones with the server, different front-end devices can be in different time zones, and the same front-end device can be in different time zones in different time periods to meet the front-end requirements. Data management needs of devices in multiple time zones.
  • the embodiment corresponding to FIG. 4 is for the data query process when the input query time is the standard time (UTC time), and the query time entered by the user on the terminal may also be the time zone time of the front-end device.
  • the data in this case The query process will be described in the embodiment corresponding to FIG. 8.
  • FIG. 8 is a flowchart of a data management method provided by an embodiment of the present application. Referring to Figure 8, the method includes:
  • the server obtains the time zone policy of the server and the time zone policy of the front-end device.
  • the server obtains data from the front-end device for storage.
  • steps 801 to 802 are the same as steps 401 to 402, and are not repeated here.
  • the terminal sends a time difference query request to the server.
  • the time type of the third start time and the third end time is that of the front-end device. Time zone time.
  • the time difference query request carries the identifier of the front-end device, the third start time, and the third end time.
  • the time difference query request is used to obtain the time difference of the front-end device within the time period corresponding to the third start time and the third end time Information, the time difference information is used to indicate the time difference between the time zone time of the front-end device in the time period and the standard time.
  • the user can input the identifier of the front-end device to be queried and the query time period on the terminal, and the start time and end time of the query time period adopt the local time zone time of the front-end device, that is, the third start time And the third end time. Since the time for storing the underlying data of the server is standard time, the terminal needs to perform time conversion according to the time difference between the time zone time of the front-end device and the standard time, and convert the start time and end time of the query period to standard time before proceeding. Data query operation.
  • the terminal may carry the identifier of the front-end device, the third start time and the third end time in the time difference query request and send it to the server, so that the server can return the time difference of the front-end device to be queried within the query time period information.
  • the terminal can call the SDK interface to communicate with the server and send a time difference query request to the server.
  • the server obtains the second time difference information of the front-end device within the second time period, and sends the second time difference information to the terminal, where the second time period is the third In the time period between the start time and the third end time, the second time difference information is used to indicate the time difference between the time zone time of the front-end device in the second time period and the standard time.
  • the process for the server to obtain the second time difference information may include: querying the time zone information table according to the third start time and the third end time to obtain the time difference information, and the time zone information table is used to record the Time difference information of the front-end device in at least one time period.
  • the server may obtain the time difference information in the second time period, and then may return the obtained time difference information to the terminal.
  • the terminal converts the third start time and the third end time to the first start time and the first end time according to the time difference information, and sends a data query to the server request.
  • the data query request carries the identifier of the front-end device, the first start time and the first end time, the time type of the first start time and the first end time is standard time, and the standard time is the start of the server storing data Time type of time and end time.
  • the terminal may convert the third start time and the third end time to standard time according to the time difference information, that is, the first start time And the first end time.
  • the terminal needs to enter the start time and end entered by the user
  • the time is converted to UTC time.
  • the terminal can convert the time zone time of the front-end device to UTC time through the SDK interface, and use the converted time as the first start time and the first end time.
  • the terminal needs to input the start time and The end time is converted into a Unix timestamp.
  • the terminal can convert the time zone time of the front-end device to a Unix timestamp through the SDK interface, and use the converted time as the first start time and the first end time.
  • the terminal may carry the identifier of the front-end device in the data query request, The first start time and the first end time are sent to the server for data query.
  • the server When receiving the data query request from the terminal, the server acquires the target data, first time difference information and the target data collected by the front-end device according to the identifier of the front-end device, the first start time, and the first end time Start time and end time.
  • the server sends the target data, the first time difference information, and the start time and end time of the target data to the terminal.
  • the terminal converts the start time and end time of the target data to the second start time and the second time according to the first time difference information Second end time, the time type of the second start time and the second end time is the time zone time of the front-end device.
  • the terminal displays the target data and the second start time and the second end time.
  • steps 806 to 809 are the same as steps 404 to 407, and will not be repeated here.
  • FIG. 9 is a flowchart of a data query provided by an embodiment of the present application.
  • the terminal first obtains the time difference information of the front-end device during the query period from the server, and after the server returns the time difference information to the terminal, The terminal performs the data query operation again, and the server returns the data query result to the terminal.
  • the server may support access of multiple front-end devices, the multiple front-end devices may be in different time zones, and the same front-end device may have different time zones in different time periods.
  • the terminal can obtain the time difference information of the front-end device within the time period input by the user from the server, and then according to the server After returning the time difference information, the time zone time of the front-end device is converted to standard time, and then the data query operation is performed.
  • the above technical solutions simultaneously support data management of terminals, servers, and front-end devices under different time zone strategies.
  • the front-end equipment that supports multiple time zones can be accessed.
  • the encoder 1 of the front-end equipment 1 is in the east two area
  • the encoder 2 of the front-end equipment 2 is in the east eight area.
  • the system automatically recognizes that the front-end device 1 uses the local time of the East 2 area for query, playback, and download operations, and the front-end device 2 uses the local time of the East 8 area for query, playback, and download operations.
  • the above technical solution also supports multiple time zone strategy data management methods of the same front-end device.
  • the time zone of the encoder 1 of the front-end device 1 in January is the east two zone.
  • the time zone is changed to the east three zone.
  • the system automatically recognizes the time zone in different time periods. Difference, return the corresponding query, playback, download results.
  • the server can support two data query methods.
  • One is that the user enters standard time (UTC time) on the terminal.
  • the time of the data returned by the query result is the time zone of the front-end device.
  • the specific process is shown in the embodiment corresponding to FIG. 4. Show.
  • the other is that the user enters the time zone time of the front-end device on the terminal, and the time of the data returned by the query result is the time zone time of the front-end device.
  • the specific process is shown in the embodiment corresponding to FIG. 8.
  • the method provided by the embodiment of the present application obtains the target data and the first data collected by the front-end device according to the identifier, the first start time and the first end time of the front-end device carried in the data query request when receiving the data query request of the terminal
  • the time difference information and the start time and end time of the target data are returned to the terminal. Since the first time difference information is used to indicate the time difference between the time zone time when the front-end device is collecting the target data and the standard time, the terminal can use the first time difference information, Convert the start time and end time of the target data to the time zone time of the front-end device and display it.
  • the above solution supports the front-end devices in different time zones to access the server.
  • the front-end devices can be in different time zones with the server, different front-end devices can be in different time zones, and the same front-end device can be in different time zones in different time periods to meet the front-end requirements. Data management needs of devices in multiple time zones.
  • FIG. 10 is a schematic structural diagram of a data management device according to an embodiment of the present application. 10, the device includes:
  • the receiving module 1001 is configured to receive a data query request of the terminal, where the data query request carries the identifier of the front-end device, the first start time and the first end time, and the time type of the first start time and the first end time is standard time ,
  • the standard time is the time type of the start time and end time of the data stored by the server;
  • the obtaining module 1002 is configured to obtain target data, first time difference information, and start time and end time of the target data collected by the front-end device according to the identifier of the front-end device, the first start time, and the first end time.
  • the time period between the start time and the end time of the target data is the first time period
  • the first time period is included in the time period between the first start time and the first end time
  • the first time difference information is used to indicate The time difference between the time zone time of the front-end device in the first time period and the standard time;
  • the sending module 1003 is configured to send the target data, the first time difference information, and the start time and end time of the target data to the terminal.
  • the obtaining module 1002 is used to:
  • the first start time, and the first end time query the stored data segments, the time difference information corresponding to each data segment, and the start time and end time of each data segment;
  • the queried data segment is used as the target data, and the query
  • the time difference information corresponding to the obtained data segment is used as the first time difference information, and the start time and end time of the queried data segment are used as the start time and end time of the target data.
  • the receiving module 1001 is further configured to receive a time difference query request of the terminal, where the time difference query request carries the identifier of the front-end device, a third start time, and a third end time, and the third start time and The time type of the third end time is the time zone time of the front-end device;
  • the obtaining module 1002 is further used to obtain second time difference information of the front-end device within a second time period, where the second time period is a time period between the third start time and the third end time, and the second time difference information Used to indicate the time difference between the time zone time of the front-end device in the second time period and the standard time;
  • the sending module 1003 is also used to send the second time difference information to the terminal.
  • the acquiring module 1002 is configured to query a time zone information table according to the third start time and the third end time to obtain the time difference information.
  • the time zone information table is used to record at least one of the front-end devices. Time difference information within the time period.
  • the acquiring module 1002 is further configured to acquire and store the data collected by the front-end device according to a data collection plan.
  • the data collection plan includes the identification of the front-end device, a data collection time template, and a time zone strategy. ID, the data collection time template is used to indicate the time period for the front-end device to perform data collection, and the time zone strategy includes the time zone information of the front-end device.
  • the obtaining module 1002 is further used to obtain a time zone policy table.
  • the time zone policy table includes the time zone policies of the server and the front-end device and corresponding policy identifiers.
  • Each time zone policy includes a policy type, time zone, The time to enter daylight saving time, the time to exit daylight saving time, and the time difference between daylight saving time and winter time.
  • This type of policy includes the time zone policy of the server and the time zone policy of the front-end device.
  • the obtaining module 1002 is used to:
  • the data collected by the front-end device is stored in segments to obtain multiple segments of data.
  • the multiple segments of data are collected by the front-end device in multiple time zones.
  • the multiple segments of data correspond to multiple time difference information.
  • Each segment of data The corresponding time difference information is used to instruct the front-end device to collect the time difference between the time zone time of each piece of data and the standard time.
  • the apparatus obtains the target data and the first data collected by the front-end device by receiving the data query request of the terminal according to the identifier of the front-end device, the first start time and the first end time carried in the data query request
  • the time difference information and the start time and end time of the target data are returned to the terminal. Since the first time difference information is used to indicate the time difference between the time zone time when the front-end device is collecting the target data and the standard time, the terminal can use the first time difference information, Convert the start time and end time of the target data to the time zone time of the front-end device and display it.
  • the above solution supports the front-end devices in different time zones to access the server.
  • the front-end devices can be in different time zones with the server, different front-end devices can be in different time zones, and the same front-end device can be in different time zones in different time periods to meet the front-end requirements. Data management needs of devices in multiple time zones.
  • FIG. 11 is a schematic structural diagram of a data management device according to an embodiment of the present application.
  • the device includes:
  • the sending module 1101 is used to send a data query request to the server, where the data query request carries the identifier of the front-end device, the first start time and the first end time, and the time type of the first start time and the first end time is standard time ,
  • the standard time is the time type of the start time and end time of the data stored by the server;
  • the receiving module 1102 is configured to receive the target data sent by the server, the first time difference information, and the start time and end time of the target data.
  • the time period between the start time and the end time of the target data is the first time period.
  • a time period is included in the time period between the first start time and the first end time, and the first time difference information is used to indicate the time difference between the time zone time of the front-end device in the first time period and the standard time;
  • the conversion module 1103 is configured to convert the start time and end time of the target data into a second start time and a second end time according to the first time difference information, and the time type of the second start time and the second end time is The time zone time of the front-end device;
  • the display module 1104 is configured to display the target data and the second start time and the second end time.
  • the sending module 1101 is configured to input the input when the input identifier, start time, and end time of the front-end device are obtained and the input start time and end time are of the standard time The start time and the end time are used as the first start time and the first end time to send the data query request to the server.
  • the sending module 1101 is further configured to send the time difference query request to the server when the input identifier of the front-end device, the third start time, and the third end time are obtained, the third start time
  • the time type of the third end time is the time zone time of the front-end device, and the time difference query request carries the identifier of the front-end device, the third start time, and the third end time;
  • the receiving module 1102 is further configured to receive second time difference information sent by the server, and the second time difference information is used to indicate the time difference between the time zone time of the front-end device in the second time period and the standard time, and the second time period is the The period between the third start time and the third end time;
  • the conversion module 1103 is further configured to convert the third start time and the third end time to the first start time and the first end time according to the time difference information.
  • the apparatus obtains the target data and the first data collected by the front-end device by receiving the data query request of the terminal according to the identifier of the front-end device, the first start time and the first end time carried in the data query request
  • the time difference information and the start time and end time of the target data are returned to the terminal. Since the first time difference information is used to indicate the time difference between the time zone time when the front-end device is collecting the target data and the standard time, the terminal can use the first time difference information, Convert the start time and end time of the target data to the time zone time of the front-end device and display it.
  • the above solution supports the front-end devices in different time zones to access the server.
  • the front-end devices can be in different time zones with the server, different front-end devices can be in different time zones, and the same front-end device can be in different time zones in different time periods to meet the front-end requirements. Data management needs of devices in multiple time zones.
  • the data management device provided in the above embodiments is only exemplified by the division of the above functional modules. In practical applications, the above functions can be allocated by different functional modules according to needs. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the data management device and the data management method embodiment provided in the above embodiments belong to the same concept. For the specific implementation process, refer to the method embodiment, and details are not described here.
  • the terminal 1200 may be: a smartphone, a tablet computer, an MP3 player (Moving Pictures Experts Group Audio III), motion picture expert compression standard audio level 3), MP4 (Moving Pictures Experts Group Audio Audio Layer IV, motion picture expert compression standard audio Level 4) Player, laptop or desktop computer.
  • the terminal 1200 may also be called other names such as user equipment, portable terminal, laptop terminal, and desktop terminal.
  • the terminal 1200 includes a processor 1201 and a memory 1202.
  • the processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
  • the processor 1201 may adopt at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). achieve.
  • the processor 1201 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in a wake-up state, also known as a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor for processing data in the standby state.
  • the processor 1201 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw content that needs to be displayed on the display screen.
  • the processor 1201 may further include an AI (Artificial Intelligence, Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, Artificial Intelligence
  • the memory 1202 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 1202 may also include a high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • non-transitory computer-readable storage medium in the memory 1202 is used to store at least one instruction that is executed by the processor 1201 to implement data management provided by the method embodiments in the present application method.
  • the terminal 1200 may optionally include a peripheral device interface 1203 and at least one peripheral device.
  • the processor 1201, the memory 1202, and the peripheral device interface 1203 may be connected by a bus or a signal line.
  • Each peripheral device may be connected to the peripheral device interface 1203 through a bus, a signal line, or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 1204, a display screen 1205, a camera 1206, an audio circuit 1207, a positioning component 1208, and a power supply 1209.
  • the peripheral device interface 1203 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1201 and the memory 1202.
  • the processor 1201, the memory 1202, and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 1201, the memory 1202, and the peripheral device interface 1203 or Both can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 1204 communicates with the communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 1204 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
  • the radio frequency circuit 1204 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on.
  • the radio frequency circuit 1204 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocol includes but is not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity, wireless fidelity) networks.
  • the radio frequency circuit 1204 may further include a circuit related to NFC (Near Field Communication), which is not limited in this application.
  • the display screen 1205 is used to display a UI (User Interface).
  • the UI may include graphics, text, icons, video, and any combination thereof.
  • the display screen 1205 also has the ability to collect touch signals on or above the surface of the display screen 1205.
  • the touch signal may be input to the processor 1201 as a control signal for processing.
  • the display screen 1205 can also be used to provide virtual buttons and / or virtual keyboards, also called soft buttons and / or soft keyboards.
  • the display screen 1205 may be one display screen 1205, which is provided with the front panel of the terminal 1200; in other embodiments, there may be at least two display screens 1205, which are respectively provided on different surfaces of the terminal 1200 or have a folded design; In still other embodiments, the display screen 1205 may be a flexible display screen, which is disposed on the curved surface or the folding surface of the terminal 1200. Even, the display screen 1205 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
  • the display screen 1205 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light emitting diode) and other materials.
  • the camera assembly 1206 is used to collect images or videos.
  • the camera assembly 1206 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • the camera assembly 1206 may also include a flash.
  • the flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation at different color temperatures.
  • the audio circuit 1207 may include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 1201 for processing, or input them to the radio frequency circuit 1204 to implement voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively installed in different parts of the terminal 1200.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is used to convert the electrical signal from the processor 1201 or the radio frequency circuit 1204 into sound waves.
  • the speaker can be a traditional thin-film speaker or a piezoelectric ceramic speaker.
  • the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible by humans, but also convert electrical signals into sound waves inaudible to humans for distance measurement and other purposes.
  • the audio circuit 1207 may also include a headphone jack.
  • the positioning component 1208 is used to locate the current geographic location of the terminal 1200 to implement navigation or LBS (Location Based Service, location-based service).
  • the positioning component 1208 may be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China, the Grenas system of Russia, or the Galileo system of the European Union.
  • GPS Global Positioning System
  • the power supply 1209 is used to supply power to various components in the terminal 1200.
  • the power source 1209 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
  • the rechargeable battery may support wired charging or wireless charging.
  • the rechargeable battery can also be used to support fast charging technology.
  • the terminal 1200 further includes one or more sensors 1210.
  • the one or more sensors 1210 include, but are not limited to: an acceleration sensor 1211, a gyro sensor 1212, a pressure sensor 1213, a fingerprint sensor 1214, an optical sensor 1215, and a proximity sensor 1216.
  • the acceleration sensor 1211 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal 1200.
  • the acceleration sensor 1211 may be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 1201 may control the touch display 1205 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 1211.
  • the acceleration sensor 1211 can also be used for game or user movement data collection.
  • the gyro sensor 1212 can detect the body direction and rotation angle of the terminal 1200, and the gyro sensor 1212 can cooperate with the acceleration sensor 1211 to collect a 3D action of the user on the terminal 1200.
  • the processor 1201 can realize the following functions according to the data collected by the gyro sensor 1212: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
  • the pressure sensor 1213 may be disposed on the side frame of the terminal 1200 and / or the lower layer of the touch display 1205.
  • the pressure sensor 1213 can detect the user's grip signal on the terminal 1200, and the processor 1201 can perform left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 1213.
  • the processor 1201 controls the operability control on the UI interface according to the user's pressure operation on the touch display 1205.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 1214 is used to collect the user's fingerprint, and the processor 1201 identifies the user's identity according to the fingerprint collected by the fingerprint sensor 1214, or the fingerprint sensor 1214 identifies the user's identity according to the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 1201 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
  • the fingerprint sensor 1214 may be provided on the front, back, or side of the terminal 1200. When a physical button or a manufacturer's logo is provided on the terminal 1200, the fingerprint sensor 1214 may be integrated with the physical button or the manufacturer's logo.
  • the optical sensor 1215 is used to collect the ambient light intensity.
  • the processor 1201 may control the display brightness of the touch display 1205 according to the ambient light intensity collected by the optical sensor 1215. Specifically, when the ambient light intensity is high, the display brightness of the touch display 1205 is increased; when the ambient light intensity is low, the display brightness of the touch display 1205 is decreased.
  • the processor 1201 may also dynamically adjust the shooting parameters of the camera assembly 1206 according to the ambient light intensity collected by the optical sensor 1215.
  • the proximity sensor 1216 also called a distance sensor, is usually provided on the front panel of the terminal 1200.
  • the proximity sensor 1216 is used to collect the distance between the user and the front of the terminal 1200.
  • the processor 1201 controls the touch display 1205 to switch from the bright screen state to the breathing state; when the proximity sensor 1216 detects When the distance from the user to the front of the terminal 1200 gradually becomes larger, the processor 1201 controls the touch display 1205 to switch from the screen-holding state to the bright-screening state.
  • FIG. 12 does not constitute a limitation on the terminal 1200, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
  • the server 1300 may have a relatively large difference due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1301 and One or more memories 1302, wherein at least one instruction is stored in the memory 1302, and the at least one instruction is loaded and executed by the processor 1301 to implement the methods provided by the foregoing method embodiments.
  • processors Central Processing Units, CPU
  • memories 1302 wherein at least one instruction is stored in the memory 1302, and the at least one instruction is loaded and executed by the processor 1301 to implement the methods provided by the foregoing method embodiments.
  • the server may also have components such as a wired or wireless network interface, a keyboard, and input and output interfaces for input and output.
  • the server may also include other components for implementing device functions, which will not be repeated here.
  • a computer-readable storage medium storing at least one instruction, for example, a memory storing at least one instruction, where the at least one instruction is executed by a processor to implement data management in the foregoing embodiment method.
  • the computer-readable storage medium may be read-only memory (Read-Only Memory, ROM), random-access memory (Random Access Memory, RAM), read-only compact disc (Compact Disc Read-Only Memory, CD-ROM), Magnetic tapes, floppy disks, optical data storage devices, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Electric Clocks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种数据管理方法、装置、系统、服务器、终端及存储介质,属于数据处理领域。所述方法包括:接收终端的数据查询请求,数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,第一开始时间和第一结束时间的时间类型为标准时间,标准时间为服务器存储数据的开始时间和结束时间的时间类型;根据前端设备的标识、第一开始时间和第一结束时间,获取前端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间,第一时差信息用于指示前端设备在第一时间段内的时区时间与标准时间的时差;将目标数据、第一时差信息以及目标数据的开始时间和结束时间发送给终端。本申请可以满足前端设备在多个时区的数据管理需求。

Description

数据管理方法、装置、系统、服务器、终端及存储介质
本申请要求于2018年10月31日提交的申请号为201811289487.4、发明名称为“数据管理方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理领域,尤其涉及一种数据管理方法、装置、系统、服务器、终端及存储介质。
背景技术
在视频监控和存储领域中可能会出现多时区场景,如用户使用的终端、用于提供存储服务的服务器在多个时区,或者,用于采集视频数据的前端设备在多个时区,无论在哪种多时区场景,均会产生多时区场景下的数据管理需求。
目前,相关技术中,服务器存储视频数据的时间采用标准时间,即UTC(Coordinated Universal Time,协调世界时)时间或Unix时间戳。前端设备与服务器在同一时区,终端对前端设备采集的视频数据进行查询操作时,用户可以在终端上输入查询的开始时间和结束时间,该开始时间和结束时间的时间类型为服务器的时区时间。终端根据服务器的时区时间,将该开始时间和结束时间转换为标准时间,并向服务器发送数据查询请求,使得服务器向终端返回查询到的数据。
上述方案中前端设备需要与服务器在同一时区,无法满足前端设备在多个时区的数据管理需求。
发明内容
本申请实施例提供了一种数据管理方法、装置、系统、服务器、终端及存储介质,可以解决相关技术无法满足前端设备在多个时区的数据管理需求的问题。所述技术方案如下:
第一方面,提供了一种数据管理方法,所述方法包括:
接收终端的数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型 为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
将所述目标数据、所述第一时差信息以及所述目标数据的开始时间和结束时间发送给所述终端。
在一种可能实现方式中,根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,包括:
根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,查询已存储的数据段、每个数据段对应的时差信息以及每个数据段的开始时间和结束时间;
当查询到任一数据段的开始时间和结束时间之间时间段包含在所述第一开始时间和所述第一结束时间之间时间段内时,将查询到的数据段作为所述目标数据,将查询到的数据段对应的时差信息作为所述第一时差信息,将查询到的数据段的开始时间和结束时间作为所述目标数据的开始时间和结束时间。
在一种可能实现方式中,所述接收终端的数据查询请求之前,所述方法还包括:
接收所述终端的时差查询请求,所述时差查询请求携带所述前端设备的标识、第三开始时间和第三结束时间,所述第三开始时间和所述第三结束时间的时间类型为所述前端设备的时区时间;
获取所述前端设备在第二时间段内的第二时差信息,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段,所述第二时差信息用于指示所述前端设备在所述第二时间段内的时区时间与所述标准时间的时差;
将所述第二时差信息发送给所述终端。
在一种可能实现方式中,所述获取所述前端设备在第二时间段内的时差信息,包括:
根据所述第三开始时间和所述第三结束时间,查询时区信息表,得到所述时差信息,所述时区信息表用于记录所述前端设备在至少一个时间段内的时差信息。
在一种可能实现方式中,所述接收终端的数据查询请求之前,所述方法还包括:
根据数据采集计划,获取所述前端设备所采集的数据进行存储,所述数据采集计划包括所述前端设备的标识、数据采集时间模板以及时区策略的标识,所述数据采集时间模板用于指示前端设备进行数据采集的时间段,所述时区策略包括前端设备的时区信息。
在一种可能实现方式中,所述方法还包括:
获取时区策略表,所述时区策略表包括所述服务器和所述前端设备的时区策略以及对应的策略标识,每个时区策略包括策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,所述策略类型包括服务器的时区策略和前端设备的时区策略。
在一种可能实现方式中,所述根据数据采集计划,获取所述前端设备所采集的数据进行存储,包括:
根据所述数据采集计划中所述前端设备的时区策略的标识,获取所述前端设备的时区策略;
根据所述前端设备的时区策略,对所述前端设备采集的数据进行分段存储,得到多段数据,所述多段数据由所述前端设备在多个时区采集得到,所述多段数据对应多个时差信息,每段数据对应的时差信息用于指示所述前端设备采集所述每段数据的时区时间与所述标准时间的时差。
第二方面,提供了一种数据管理方法,所述方法包括:
向服务器发送数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
接收所述服务器发送的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段 内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
根据所述第一时差信息,将所述目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,所述第二开始时间和所述第二结束时间的时间类型为所述前端设备的时区时间;
显示所述目标数据以及所述第二开始时间和所述第二结束时间。
在一种可能实现方式中,所述向服务器发送数据查询请求,包括:
当获取到输入的所述前端设备的标识、开始时间和结束时间且输入的开始时间和结束时间的时间类型为所述标准时间时,将所述输入的开始时间和结束时间作为所述第一开始时间和所述第一结束时间,向所述服务器发送所述数据查询请求。
在一种可能实现方式中,所述向服务器发送数据查询请求之前,所述方法还包括:
当获取到输入的所述前端设备的标识、第三开始时间和第三结束时间时,向服务器发送所述时差查询请求,所述第三开始时间和所述第三结束时间的时间类型为所述前端设备的时区时间,所述时差查询请求携带所述前端设备的标识、所述第三开始时间和所述第三结束时间;
接收服务器发送的第二时差信息,所述第二时差信息用于指示所述前端设备在第二时间段内的时区时间与所述标准时间的时差,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段;
根据所述时差信息,将所述第三开始时间和所述第三结束时间转换为所述第一开始时间和所述第一结束时间。
第三方面,提供了一种数据管理装置,所述装置包括:
接收模块,用于接收终端的数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
获取模块,用于根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为 第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
发送模块,用于将所述目标数据、所述第一时差信息以及所述目标数据的开始时间和结束时间发送给所述终端。
在一种可能实现方式中,所述获取模块用于:
根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,查询已存储的数据段、每个数据段对应的时差信息以及每个数据段的开始时间和结束时间;
当查询到任一数据段的开始时间和结束时间之间时间段包含在所述第一开始时间和所述第一结束时间之间时间段内时,将查询到的数据段作为所述目标数据,将查询到的数据段对应的时差信息作为所述第一时差信息,将查询到的数据段的开始时间和结束时间作为所述目标数据的开始时间和结束时间。
在一种可能实现方式中,所述接收模块还用于接收所述终端的时差查询请求,所述时差查询请求携带所述前端设备的标识、第三开始时间和第三结束时间,所述第三开始时间和所述第三结束时间的时间类型为所述前端设备的时区时间;
所述获取模块还用于获取所述前端设备在第二时间段内的第二时差信息,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段,所述第二时差信息用于指示所述前端设备在所述第二时间段内的时区时间与所述标准时间的时差;
所述发送模块还用于将所述第二时差信息发送给所述终端。
在一种可能实现方式中,所述获取模块用于根据所述第三开始时间和所述第三结束时间,查询时区信息表,得到所述时差信息,所述时区信息表用于记录所述前端设备在至少一个时间段内的时差信息。
在一种可能实现方式中,所述获取模块还用于根据数据采集计划,获取所述前端设备所采集的数据进行存储,所述数据采集计划包括所述前端设备的标识、数据采集时间模板以及时区策略的标识,所述数据采集时间模板用于指示前端设备进行数据采集的时间段,所述时区策略包括前端设备的时区信息。
在一种可能实现方式中,所述获取模块还用于获取时区策略表,所述时区策略表包括所述服务器和所述前端设备的时区策略以及对应的策略标识,每个 时区策略包括策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,所述策略类型包括服务器的时区策略和前端设备的时区策略。
在一种可能实现方式中,所述获取模块用于:
根据所述数据采集计划中所述前端设备的时区策略的标识,获取所述前端设备的时区策略;
根据所述前端设备的时区策略,对所述前端设备采集的数据进行分段存储,得到多段数据,所述多段数据由所述前端设备在多个时区采集得到,所述多段数据对应多个时差信息,每段数据对应的时差信息用于指示所述前端设备采集所述每段数据的时区时间与所述标准时间的时差。
第四方面,提供了一种数据管理装置,所述装置包括:
发送模块,用于向服务器发送数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
接收模块,用于接收所述服务器发送的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
转换模块,用于根据所述第一时差信息,将所述目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,所述第二开始时间和所述第二结束时间的时间类型为所述前端设备的时区时间;
显示模块,用于显示所述目标数据以及所述第二开始时间和所述第二结束时间。
在一种可能实现方式中,所述发送模块用于当获取到输入的所述前端设备的标识、开始时间和结束时间且输入的开始时间和结束时间的时间类型为所述标准时间时,将所述输入的开始时间和结束时间作为所述第一开始时间和所述第一结束时间,向所述服务器发送所述数据查询请求。
在一种可能实现方式中,所述发送模块还用于当获取到输入的所述前端设备的标识、第三开始时间和第三结束时间时,向服务器发送所述时差查询请求,所述第三开始时间和所述第三结束时间的时间类型为所述前端设备的时区时间,所述时差查询请求携带所述前端设备的标识、所述第三开始时间和所述第三结束时间;
所述接收模块还用于接收服务器发送的第二时差信息,所述第二时差信息用于指示所述前端设备在第二时间段内的时区时间与所述标准时间的时差,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段;
转换模块,用于根据所述时差信息,将所述第三开始时间和所述第三结束时间转换为所述第一开始时间和所述第一结束时间。
第五方面,提供了一种数据管理系统,所述系统包括前端设备、服务器和终端,
所述前端设备用于采集数据,并将采集到的数据发送给所述服务器;
所述服务器用于采用标准时间,对所述前端设备采集的数据进行存储;
所述终端用于向服务器发送数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
所述服务器还用于当接收到终端的数据查询请求时,根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,并发送给所述终端,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
所述终端还用于当接收所述服务器发送的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间时,根据所述第一时差信息,将所述目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,所述第二开始时间和所述第二结束时间的时间类型为所述前端设备的时区时间,显示所述目标数据以及所述第二开始时间和所述第二结束时间。
第六方面,提供了一种服务器,包括处理器和存储器;所述存储器,用于存放至少一条指令;所述处理器,用于执行所述存储器上所存放的至少一条指令,实现第一方面任一种实现方式所述的方法步骤。
第七方面,提供了一种终端,包括处理器和存储器;所述存储器,用于存放至少一条指令;所述处理器,用于执行所述存储器上所存放的至少一条指令,实现第二方面任一种实现方式所述的方法步骤。
第八方面,提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有至少一条指令,所述至少一条指令被处理器执行时实现上述任一方面任一种实现方式所述的方法步骤。
本申请实施例提供的技术方案带来的有益效果至少包括:
通过在接收到终端的数据查询请求时,根据数据查询请求中携带的前端设备的标识、第一开始时间和第一结束时间,获取前端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间后返回给终端,由于第一时差信息用于指示前端设备在采集目标数据时的时区时间与标准时间的时差,使得终端可以根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种数据管理系统的示意图。
图2是本申请实施例提供的一种数据管理方法的流程图。
图3是本申请实施例提供的一种数据管理方法的流程图。
图4是本申请实施例提供的一种数据管理方法的流程图。
图5是本申请实施例提供的一种配置时区策略的流程图。
图6是本申请实施例提供的一种获取数据的流程图。
图7是本申请实施例提供的一种数据存储的结构图。
图8是本申请实施例提供的一种数据管理方法的流程图。
图9是本申请实施例提供的一种数据查询的流程图。
图10是本申请实施例提供的一种数据管理装置的结构示意图。
图11是本申请实施例提供的一种数据管理装置的结构示意图。
图12是本申请实施例提供的一种终端1200的结构示意图。
图13是本申请实施例提供的一种服务器1300的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例进行详细地解释说明之前,先对本申请实施例涉及到的一些关键术语进行解释说明:
Unix时间戳(Unix timestamp):或称Unix时间(Unix time)、POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1980年01月01日00时00分00秒起至现在的总秒数。
夏令时:夏令时又叫夏时制、日光节约时制、夏令时间,它是为了节约能源人为规定的地方时间制度,通常是在天亮比较早的夏季,人为将时间条快一小时,造成当地夏令时时间与冬令时时间相差一个小时。各个采纳夏时制的国家具体规定不同,目前全世界有近110个国家每年要实行夏令时。
UTC时间:协调世界时,又称世界统一时间、世界标准时间、国际协调时间。由于英文(CUT)和法文(TUC)的缩写不同,作为妥协,简称UTC。协调世界时是以原子时秒长为基础,在时刻上尽量接近于世界时的一种时间计量系统。
图1是本申请实施例提供的一种数据管理系统的示意图,该数据管理系统可以包括前端设备101、服务器102和终端103。
其中,前端设备101用于采集数据,如视频数据,并将采集到的数据发送给该服务器102进行存储。前端设备101可以是IPC(IP Camera,网络摄像机),也可以是其他具有数据采集功能的设备。
服务器102用于采用标准时间,对前端设备101采集的数据进行存储。服务器102还用于当接收到终端103的数据查询请求时,获取相应的数据,并将获取到的数据发送给终端103。
需要说明的是,服务器102可以是指一个服务器,也可以是指多个服务器组成的服务器集群,例如,该多个服务器可以包括数据管理服务器、数据采集计划管理服务器、视频接入服务器和视频存储服务器。服务器102可以是云存储系统中的服务器。
终端103用于向服务器102发送时差查询请求,终端103还用于接收服务器102发送的时差信息后,向服务器102发送数据查询请求,该数据查询请求用于获取前端设备101采集的数据。终端103可以是智能手机、平板电脑、笔记本电脑或台式电脑等用户设备。
图2是本申请实施例提供的一种数据管理方法的流程图。参见图2,该方法包括:
201、接收终端的数据查询请求,该数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,该第一开始时间和该第一结束时间的时间类型为标准时间,该标准时间为该服务器存储数据的开始时间和结束时间的时间类型。
202、根据该前端设备的标识、该第一开始时间和该第一结束时间,获取该前端设备采集的目标数据、第一时差信息以及该目标数据的开始时间和结束时间,该目标数据的开始时间和结束时间之间时间段为第一时间段,该第一时间段包含在该第一开始时间和该第一结束时间之间时间段内,该第一时差信息用于指示该前端设备在该第一时间段内的时区时间与该标准时间的时差。
203、将该目标数据、该第一时差信息以及该目标数据的开始时间和结束时间发送给该终端。
本申请实施例提供的方法,通过在接收到终端的数据查询请求时,根据数据查询请求中携带的前端设备的标识、第一开始时间和第一结束时间,获取前端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间后返回给终端,由于第一时差信息用于指示前端设备在采集目标数据时的时区时 间与标准时间的时差,使得终端可以根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
图3是本申请实施例提供的一种数据管理方法的流程图。参见图3,该方法包括:
301、向服务器发送数据查询请求,该数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,该第一开始时间和该第一结束时间的时间类型为标准时间,该标准时间为该服务器存储数据的开始时间和结束时间的时间类型;
302、接收该服务器发送的目标数据、第一时差信息以及该目标数据的开始时间和结束时间,该目标数据的开始时间和结束时间之间时间段为第一时间段,该第一时间段包含在该第一开始时间和该第一结束时间之间时间段内,该第一时差信息用于指示该前端设备在该第一时间段内的时区时间与该标准时间的时差;
303、根据该第一时差信息,将该目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,该第二开始时间和该第二结束时间的时间类型为该前端设备的时区时间;
304、显示该目标数据以及该第二开始时间和该第二结束时间。
本申请实施例提供的方法,通过向服务器发送数据查询请求,并在接收到服务器返回的目标数据、第一时差信息以及目标数据的开始时间和结束时间时,根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
图4是本申请实施例提供的一种数据管理方法的流程图。参见图4,该方法包括:
401、服务器获取服务器的时区策略和前端设备的时区策略。
本申请实施例中,服务器中可以配置有多个时区策略,这些时区策略可以分为两种,一种是服务器的时区策略,一种是前端设备的时区策略。时区策略包括策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,策略类型用于区分前端设备和服务器的时区策略。例如,时区可以是东二区、东八区等,如果设备所在的时区在每年的3月1日13:00至10月1日15:00是夏令时,则进入夏令时的时间为3月1日13:00,出夏令时的时间为10月1日15:00。
在一种可能实现方式中,上述时区策略的配置可以通过网页(web页面)来进行配置,也可以通过SDK(Software Development Kit,软件开发工具包)接口来进行配置。在一种可能实现方式中,配置时区策略的具体实现流程可以包括以下三个步骤a至c:
步骤a、通过网页配置服务器的时区策略。
例如,用户可以在终端上登录时区策略的配置网页,用户可以在该配置网页上输入服务器的时区策略并提交,触发终端将该服务器的时区策略发送给服务器,服务器对该时区策略进行存储,从而完成对服务器的时区策略的配置。服务器的时区策略为默认时区策略,如果前端设备没有指定其所使用的时区策略,则服务器可以默认前端设备采用服务器的时区策略。
步骤b、通过SDK接口配置前端设备的时区策略。
终端可以调用服务器SDK接口(云存储SDK接口),来连接服务器,添加前端设备的时区策略,操作成功后,SDK接口可以返回唯一的策略ID(Identification,标识)给终端,其中,策略ID是指时区策略的标识。
需要说明的是,服务器可以接入一个或多个前端设备,相应地,在该步骤b中,通过SDK接口可以配置至少一个前端设备的时区策略。
步骤c、服务器获取并保存时区策略表。
其中,该时区策略表包括该服务器和前端设备的时区策略以及对应的策略ID。每个时区策略包括策略ID、策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,其中,策略ID用于区分不同的时区策略,策略类型包括服务器的时区策略和前端设备的时区策略。
服务器通过上述步骤a和b获取到服务器和各个前端设备的时区策略之后,可以生成每个时区策略的标识;根据每个时区策略的标识、服务器的时区策略 和前端设备的时区策略,生成该时区策略表。
通过在服务器中配置服务器的时区策略和各个前端设备的时区策略,使得服务器可以根据各个前端设备的时区策略,对采集的数据进行存储,并提供给终端进行数据查询。
需要说明的是,上述方式仅以通过网页配置服务器的时区策略,通过SDK接口配置前端设备的时区策略为例进行说明,可以理解的是,服务器的时区策略也可以通过SDK接口配置,前端设备的时区策略也可以通过网页配置,本申请实施例对此不做限定。
参见图5,图5是本申请实施例提供的一种配置时区策略的流程图,如图5所示,以数据为视频数据为例,服务器可以包括视频管理服务模块、数据采集计划管理服务模块、视频接入服务模块以及视频存储服务模块。其中,视频管理服务模块用于管理时区策略的配置以及视频数据的存储;数据采集计划管理服务模块用于配置数据采集计划(录像计划);视频接入服务模块用于接收前端设备发送的视频数据;视频存储服务模块用于存储视频数据。
数据采集计划管理服务模块可以及时从视频管理服务模块同步时区策略表,包括服务器的时区策略和前端设备的时区策略。例如,视频管理服务模块可以定时或实时向数据采集计划管理服务模块发送时区策略表。另外,数据采集计划管理服务模块可以及时将时区策略表同步到视频接入服务模块,例如,数据采集计划管理服务模块可以定时或实时向视频接入服务模块发送时区策略表。
需要说明的是,图5是以视频管理服务模块、数据采集计划管理服务模块、视频接入服务模块以及视频存储服务模块等四个模块的功能集成在一个服务器上为例进行说明,上述四个模块的交互过程是同一个服务器内各个模块之间的交互过程。可以理解的是,上述每个模块的功能也可以分别由一个服务器提供,也即是,上述四个模块的交互过程实际上是四个服务器之间的交互过程,本申请实施例对此不做限定。
402、服务器从前端设备获取数据进行存储。
本申请实施例中,服务器可以根据数据采集计划,获取该前端设备所采集的数据进行存储。其中,数据采集计划包括该前端设备的标识、数据采集时间模板以及时区策略的标识,该数据采集时间模板用于指示前端设备进行数据采集的时间段,该时区策略包括前端设备的时区信息。该数据采集计划的配置过 程与时区策略的配置过程同理,终端可以通过SDK接口配置数据采集计划到服务器中,当然,数据采集计划也可以通过网页来配置,本申请实施例对此不做限定。
在一种可能实现方式中,服务器存储任一前端设备的数据的方式可以为:根据该数据采集计划中该前端设备的时区策略的标识,获取该前端设备的时区策略;根据该前端设备的时区策略,对该前端设备采集的数据进行分段存储,得到多段数据,该多段数据由该前端设备在多个时区采集得到,该多段数据对应多个时差信息,每段数据对应的时差信息用于指示该前端设备采集该每段数据的时区时间与标准时间的时差。
服务器在接收任一前端设备采集的数据时,可以根据该前端设备的时区策略标识,查询时区策略表,确定该前端设备的时区策略,从而得知该前端设备在各个时间段的时差信息,服务器可以根据前端设备在各个时间段的时差信息,将数据分段存储,将在同一时区采集的数据划分为一段,这样,一段数据对应一个时差信息。
通过将前端设备采集的数据进行分段存储,可以更好地区分前端设备在各个时间段各个时区采集到的数据,便于用户进行查询操作。
参见图6,图6是本申请实施例提供的一种获取数据的流程图。如图6所示,终端可以通过SDK接口配置数据采集计划到数据采集计划管理服务模块,数据采集计划管理服务模块用于将数据采集计划下发到视频接入服务模块中,视频接入服务模块根据数据采集计划中的信息,执行从前端设备获取实时数据流的任务。
视频接入服务模块在获取到数据后,可以将数据写入视频存储服务模块,视频接入服务模块需要先与视频管理服务模块进行通信,以申请存储资源,例如,视频接入服务模块可以向视频管理服务模块发送申请资源协议,该申请资源协议中包含前端设备的编码器ID、视频数据的开始时间,前端设备的时差信息(前端设备的时区时间与标准时间的时间差)。视频管理服务模块在接收到申请资源协议后,可以根据资源分配策略(负载均衡策略),返回申请到的存储资源给视频接入服务模块,同时,视频管理服务模块可以记录前端设备的时区信息。例如,视频管理服务模块可以在时区信息表中记录前端设备的时区信息。参见表1,提供了一种时区信息表,如表1所示,时区信息表中可以记录前端设备的编码器ID、前端设备在至少一个时间段内的时差信息。
表1
Figure PCTCN2019114426-appb-000001
如果前端设备的时区策略发生变更,导致前端设备的时区时间与标准时间的时差发生变更,则每次发生时差变更时,视频管理服务模块可以在时区信息表中增加一条记录。如表1所示,编码器ID为Test1的前端设备在2018年01月12日23:00至2018年04月12日23:00这个时间段内的时区为东3区,时差为3小时(hour),该前端设备在2018年4月12日23:00时区发生变更,从东3区变更为东二区,时差变更为2小时,则服务器可以在视频管理服务模块中新增一条记录。由于时差从3小时变为2小时,因此,2018年04月12日23:00变为2018年04月12日22:00,如果从发生变更起,直至当前时间,前端设备的时区策略均未发生变化,则新增记录的开始时间为2018年04月12日22:00,结束时间为当前。
当然,除了前端设备的时区策略发生变更会导致前端设备的时差信息发生变更以外,时差变更的原因还可能是夏令时和冬令时的变更,如前端设备从夏令时进入东令时,或,前端设备从东令时进入夏令时。
视频接入服务模块在将视频数据写入视频存储服务模块时,可以将视频数据的时差信息(发送该视频数据的前端设备的时差信息)提供给视频存储服务模块,视频存储服务模块会将该信息保存在存储块设备中进行备份。
视频数据由视频存储服务模块写入底层的块设备中进行存储。参见图7,图7是本申请实施例提供的一种数据存储的结构图,如图7所示,在存储视频数据时,视频存储服务模块可以将视频数据划分成若干视频段,如视频段1和视频段2。每个视频段对应的段信息包括段的开始时间、结束时间、与UTC时间的时差,视频管理服务模块可以采用标准时间进行数据的存储。
403、终端向服务器发送数据查询请求,该数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,该第一开始时间和该第一结束时间的时间类型为标准时间,该标准时间为该服务器存储数据的开始时间和结束时间的时间类型。
本申请实施例中,服务器从前端设备获取数据进行存储后,用户可以对某 个前端设备采集的数据进行查询、下载或回放等操作,其中,下载、回放之前都需要进行查询操作,也即是,需要先查询到该前端设备采集的数据。具体地,用户可以在终端上输入待查询的前端设备的标识以及查询时间段,包括开始时间和结束时间。由于服务器底层数据保存的时间均为标准时间,因此,在一种可能实现方式中,当终端获取到用户输入的该前端设备的标识、开始时间和结束时间且输入的开始时间和结束时间的时间类型为该标准时间时,终端可以将输入的开始时间和结束时间作为该第一开始时间和该第一结束时间,向该服务器发送该数据查询请求。
需要说明的是,标准时间可以有两种计量方式,一种是UTC时间,一种是Unix时间戳,而终端使用的时间均为X年X月X日X时X分X秒。如果服务器存储数据的开始时间和结束时间的时间类型为UTC时间,用户在终端上输入的开始时间和结束时间的时间类型也为UTC时间时,则终端可以直接将用户输入的开始时间和结束时间作为第一开始时间和第一结束时间,这样,该第一开始时间和第一结束时间的时间类型为UTC时间。
如果服务器存储数据的开始时间和结束时间的时间类型为Unix时间戳,用户在终端上输入的开始时间和结束时间的时间类型为UTC时间,则终端需要先将用户输入的开始时间和结束时间转换为Unix时间戳,例如,终端可以通过SDK接口将UTC时间转换为Unix时间戳,将转换后的开始时间和结束时间作为第一开始时间和第一结束时间,这样,该第一开始时间和第一结束时间的时间类型为Unix时间戳。
通过提供用户输入标准时间进行数据查询的方式,相比于相关技术中仅支持用户输入前端设备的时区时间进行数据查询,提高了数据查询的灵活性。
404、当接收到终端的数据查询请求时,服务器根据该前端设备的标识、该第一开始时间和该第一结束时间,获取该前端设备采集的目标数据、第一时差信息以及该目标数据的开始时间和结束时间。
其中,该目标数据的开始时间和结束时间之间时间段为第一时间段,该第一时间段包含在该第一开始时间和该第一结束时间之间时间段内,该第一时差信息用于指示该前端设备在该第一时间段内的时区时间与该标准时间的时差。
本申请实施例中,当服务器接收到终端的数据查询请求时,可以根据数据查询请求中携带的第一开始时间和第一结束时间,查询已存储的数据。由于服务器存储数据的开始时间和结束时间的时间类型为标准时间,而第一开始时间 和第一结束时间的时间类型也为标准时间,因此,在一种可能实现方式中,服务器获目标数据、第一时差信息以及该目标数据的开始时间和结束时间的过程包括:根据该前端设备的标识、该第一开始时间和该第一结束时间,查询已存储的数据段、每个数据段对应的时差信息以及每个数据段的开始时间和结束时间;当查询到任一数据段的开始时间和结束时间之间时间段包含在该第一开始时间和该第一结束时间之间时间段内时,将查询到的数据段作为该目标数据,将查询到的数据段对应的时差信息作为该第一时差信息,将查询到的数据段的开始时间和结束时间作为该目标数据的开始时间和结束时间。
针对步骤402中服务器将前端设备采集到的数据分段存储,在查询目标数据时,当任一数据段的开始时间和结束时间之间时间段包含在第一开始时间和第一结束时间之间时间段内时,服务器可以将该数据作为查询结果,返回给终端。另外,服务器在查询到目标数据时,还可以同时查询到目标数据的信息中记录的开始时间、结束时间以及第一时差信息。
405、服务器将该目标数据、该第一时差信息以及该目标数据的开始时间和结束时间发送给该终端。
本申请实施例中,服务器在将该目标数据作为查询结果返回给终端时,同时还可以将目标数据的开始时间和结束时间以及对应的第一时差信息返回给终端。
406、当接收到目标数据、第一时差信息以及该目标数据的开始时间和结束时间时,终端根据该第一时差信息,将该目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,该第二开始时间和该第二结束时间的时间类型为该前端设备的时区时间。
其中,该第二开始时间为该前端设备开始采集该目标数据的时间,该第二结束时间为该前端设备结束采集该目标数据的时间。
本申请实施例中,考虑到用户在查询数据时,往往希望看到的是前端设备在本地时区时间采集的数据,以得知不同时区在某个时间段发生的事件。由于服务器返回的目标数据的开始时间和结束时间的时间类型为标准时间,而为了告知用户前端设备在采集该目标数据时的本地时区时间,终端在接收到服务器返回的目标数据之后,还可以确定前端设备采集该目标数据时的本地时区时间。而第一时差信息指示了前端设备在采集该目标数据时的时区时间与标准时间的时差。因此,终端可以根据该目标数据对应的第一时差信息,将目标数据的开 始时间和结束时间转化为前端设备的本地时区时间。
如果服务器存储数据的开始时间和结束时间的时间类型为UTC时间,也即是该目标数据的开始时间和结束时间为UTC时间,则终端需要将UTC时间转换为前端设备的时区时间,例如,终端可以通过SDK接口将UTC时间转换为前端设备的时区时间,从而得到第二开始时间和第二结束时间。
如果服务器存储数据的开始时间和结束时间的时间类型为Unix时间戳,也即是该目标数据的开始时间和结束时间为Unix时间戳,则终端需要将Unix时间戳转换为前端设备的时区时间,例如,终端可以通过SDK接口将Unix时间戳转换为前端设备的时区时间,从而得到第二开始时间和第二结束时间。
407、终端显示该目标数据以及该第二开始时间和该第二结束时间。
本申请实施例中,终端在接收到服务器发送的目标数据后,可以对该目标数据进行显示。另外,终端还可以对前端设备采集该目标数据时的本地时区时间,也即是第二开始时间和第二结束时间进行显示,使得用户可以得知前端设备采集该数据的开始时间和结束时间,从而得知在该时间段内前端设备的采集范围内发生的事件。
可选地,终端在显示该目标数据以及该第二开始时间和该第二结束时间时,同时还可以显示该目标数据对应的第一时差信息,使得用户可以得知前端设备在采集该目标数据时的时区时间与标准时间的时差。
本申请实施例提供的技术方案同时支持终端、服务器和前端设备分别在不同时区策略下的数据管理。特别是支持多种时区的前端设备接入,如前端设备1的编码器1在东二区,前端设备2的编码器2在东八区。在进行数据控制操作时,系统内部自动识别针对前端设备1采用东二区的本地时间进行查询、回放、下载操作,针对前端设备2采用东八区的本地时间进行查询、回放、下载操作。
另外,上述技术方案还支持同一前端设备的多种时区策略的数据管理方法。比如前端设备1的编码器1在1月份的时区是东二区,在2月份的时候由于人为因素变更为东三区,则在进行数据控制操作时,系统内部自动识别不同时间段的时区差别,返回对应的查询、回放、下载结果。
该技术方案支持根据标准时间查询数据的方式,服务器除了返回数据以外,还返回数据对应的时区信息。
本申请实施例提供的方法,通过在接收到终端的数据查询请求时,根据数据查询请求中携带的前端设备的标识、第一开始时间和第一结束时间,获取前 端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间后返回给终端,由于第一时差信息用于指示前端设备在采集目标数据时的时区时间与标准时间的时差,使得终端可以根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
图4对应的实施例是针对输入的查询时间为标准时间(UTC时间)的情况下的数据查询过程,而用户在终端上输入的查询时间还可以是前端设备的时区时间,此情况下的数据查询过程将在图8对应的实施例中进行说明。
图8是本申请实施例提供的一种数据管理方法的流程图。参见图8,该方法包括:
801、服务器获取服务器的时区策略和前端设备的时区策略。
802、服务器从前端设备获取数据进行存储。
上述步骤801至802与步骤401至402同理,在此不做赘述。
803、当获取到输入的前端设备的标识、第三开始时间和第三结束时间时,终端向服务器发送时差查询请求,该第三开始时间和该第三结束时间的时间类型为该前端设备的时区时间。
其中,该时差查询请求携带该前端设备的标识、该第三开始时间和该第三结束时间,该时差查询请求用于获取前端设备在第三开始时间和第三结束时间对应时间段内的时差信息,该时差信息用于指示该前端设备在该时间段内的时区时间与标准时间的时间差。
本申请实施例中,用户可以在终端上输入待查询的前端设备的标识以及查询时间段,该查询时间段的开始时间和结束时间采用前端设备的本地时区时间,也即是,第三开始时间和第三结束时间。由于服务器底层数据保存的时间均为标准时间,因此,终端需要根据前端设备的时区时间与标准时间的时差进行时间转换,将该查询时间段的开始时间和结束时间转换为标准时间后,再进行数据查询操作。为此,终端可以在时差查询请求中携带该前端设备的标识、该第三开始时间和该第三结束时间并发送给该服务器,使得服务器可以返回待查询的前端设备在查询时间段内的时差信息。例如,终端可以调用SDK接口与服务 器进行通信,向服务器发送时差查询请求。
804、当接收到该终端的时差查询请求时,服务器获取该前端设备在第二时间段内的第二时差信息,将该第二时差信息发送给该终端,该第二时间段为该第三开始时间和该第三结束时间之间时间段,该第二时差信息用于指示该前端设备在该第二时间段内的时区时间与该标准时间的时差。
在一种可能实现方式中,服务器获取第二时差信息的过程可以包括:根据该第三开始时间和该第三结束时间,查询时区信息表,得到该时差信息,该时区信息表用于记录该前端设备在至少一个时间段内的时差信息。
其中,该时区信息表参见步骤402中的表1,服务器通过查询时区信息表,获取到第二时间段内的时差信息后,可以将获取到的时差信息返回给终端。
805、当接收到服务器发送的第二时差信息时,终端根据该时差信息,将该第三开始时间和该第三结束时间转换为第一开始时间和第一结束时间后,向服务器发送数据查询请求。
其中,该数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,该第一开始时间和该第一结束时间的时间类型为标准时间,该标准时间为该服务器存储数据的开始时间和结束时间的时间类型。
在一种可能实现方式中,当终端接收到服务器返回的时差信息后,可以根据该时差信息,将该第三开始时间和该第三结束时间转换为标准时间,也即是,第一开始时间和该第一结束时间。
如果服务器存储数据的开始时间和结束时间的时间类型为UTC时间,由于该第三开始时间和该第三结束时间的时间类型为前端设备的时区时间,则终端需要将用户输入的开始时间和结束时间转换为UTC时间,例如,终端可以通过SDK接口将前端设备的时区时间转换为UTC时间,将转换后的时间作为第一开始时间和第一结束时间。
如果服务器存储数据的开始时间和结束时间的时间类型为Unix时间戳,由于该第三开始时间和该第三结束时间的时间类型为前端设备的时区时间,则终端需要将用户输入的开始时间和结束时间转换为Unix时间戳,例如,终端可以通过SDK接口将前端设备的时区时间转换为Unix时间戳,将转换后的时间作为第一开始时间和第一结束时间。
进一步地,与步骤403同理,由于第一开始时间和该第一结束时间为标准时间,与服务器存储数据的时间类型相同,因此,终端可以在该数据查询请求 中携带该前端设备的标识、第一开始时间和该第一结束时间并发送给该服务器,以进行数据查询。
806、当接收到终端的数据查询请求时,服务器根据该前端设备的标识、该第一开始时间和该第一结束时间,获取该前端设备采集的目标数据、第一时差信息以及该目标数据的开始时间和结束时间。
807、服务器将该目标数据、该第一时差信息以及该目标数据的开始时间和结束时间发送给该终端。
808、当接收到目标数据、第一时差信息以及该目标数据的开始时间和结束时间时,终端根据该第一时差信息,将该目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,该第二开始时间和该第二结束时间的时间类型为该前端设备的时区时间。
809、终端显示该目标数据以及该第二开始时间和该第二结束时间。
上述步骤806至步骤809与步骤404至步骤407同理,在此不做赘述。
需要说明的是,上述步骤803至步骤809是针对输入的查询时间为前端设备的时区时间的情况下的数据查询过程。参见图9,图9是本申请实施例提供的一种数据查询的流程图,如图9所示,终端先从服务器获取前端设备在查询时间段的时差信息,服务器向终端返回时差信息后,终端再进行数据查询操作,服务器将数据查询结果返回给终端。
本申请实施例提供的技术方案中,服务器可以支持多个前端设备的接入,该多个前端设备可以在不同时区,同一个前端设备在不同时间段的时区也可以不同。通过在服务器预先存储各个前端设备在各个时间段的时差信息,使得终端在需要查询任一个前端设备的数据时,可以从服务器获取该前端设备在用户输入的时间段内的时差信息,进而根据服务器返回的时差信息,将前端设备的时区时间转换为标准时间后,再进行数据的查询操作。
上述技术方案同时支持终端、服务器和前端设备分别在不同时区策略下的数据管理。特别是支持多种时区的前端设备接入,如前端设备1的编码器1在东二区,前端设备2的编码器2在东八区。在进行数据控制操作时,系统内部自动识别针对前端设备1采用东二区的本地时间进行查询、回放、下载操作,针对前端设备2采用东八区的本地时间进行查询、回放、下载操作。
另外,上述技术方案还支持同一前端设备的多种时区策略的数据管理方法。比如前端设备1的编码器1在1月份时的时区是东二区,在2月份的时候由于 人为因素变更为东三区,则在进行数据控制操作时,系统内部自动识别不同时间段的时区差别,返回对应的查询、回放、下载结果。
可见,服务器可以支持两种数据查询方式,一种是用户在终端上输入标准时间(UTC时间),查询结果返回的数据的时间为前端设备的时区时间,具体过程为图4对应的实施例所示。另一种是用户在终端上输入前端设备的时区时间,查询结果返回的数据的时间为前端设备的时区时间,具体过程为图8对应的实施例所示。
本申请实施例提供的方法,通过在接收到终端的数据查询请求时,根据数据查询请求中携带的前端设备的标识、第一开始时间和第一结束时间,获取前端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间后返回给终端,由于第一时差信息用于指示前端设备在采集目标数据时的时区时间与标准时间的时差,使得终端可以根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
图10是本申请实施例提供的一种数据管理装置的结构示意图。参照图10,该装置包括:
接收模块1001,用于接收终端的数据查询请求,该数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,该第一开始时间和该第一结束时间的时间类型为标准时间,该标准时间为该服务器存储数据的开始时间和结束时间的时间类型;
获取模块1002,用于根据该前端设备的标识、该第一开始时间和该第一结束时间,获取该前端设备采集的目标数据、第一时差信息以及该目标数据的开始时间和结束时间,该目标数据的开始时间和结束时间之间时间段为第一时间段,该第一时间段包含在该第一开始时间和该第一结束时间之间时间段内,该第一时差信息用于指示该前端设备在该第一时间段内的时区时间与该标准时间的时差;
发送模块1003,用于将该目标数据、该第一时差信息以及该目标数据的开始时间和结束时间发送给该终端。
在一种可能实现方式中,该获取模块1002用于:
根据该前端设备的标识、该第一开始时间和该第一结束时间,查询已存储的数据段、每个数据段对应的时差信息以及每个数据段的开始时间和结束时间;
当查询到任一数据段的开始时间和结束时间之间时间段包含在该第一开始时间和该第一结束时间之间时间段内时,将查询到的数据段作为该目标数据,将查询到的数据段对应的时差信息作为该第一时差信息,将查询到的数据段的开始时间和结束时间作为该目标数据的开始时间和结束时间。
在一种可能实现方式中,该接收模块1001还用于接收该终端的时差查询请求,该时差查询请求携带该前端设备的标识、第三开始时间和第三结束时间,该第三开始时间和该第三结束时间的时间类型为该前端设备的时区时间;
该获取模块1002还用于获取该前端设备在第二时间段内的第二时差信息,该第二时间段为该第三开始时间和该第三结束时间之间时间段,该第二时差信息用于指示该前端设备在该第二时间段内的时区时间与该标准时间的时差;
该发送模块1003还用于将该第二时差信息发送给该终端。
在一种可能实现方式中,该获取模块1002用于根据该第三开始时间和该第三结束时间,查询时区信息表,得到该时差信息,该时区信息表用于记录该前端设备在至少一个时间段内的时差信息。
在一种可能实现方式中,该获取模块1002还用于根据数据采集计划,获取该前端设备所采集的数据进行存储,该数据采集计划包括该前端设备的标识、数据采集时间模板以及时区策略的标识,该数据采集时间模板用于指示前端设备进行数据采集的时间段,该时区策略包括前端设备的时区信息。
在一种可能实现方式中,该获取模块1002还用于获取时区策略表,该时区策略表包括该服务器和该前端设备的时区策略以及对应的策略标识,每个时区策略包括策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,该策略类型包括服务器的时区策略和前端设备的时区策略。
在一种可能实现方式中,该获取模块1002用于:
根据该数据采集计划中该前端设备的时区策略的标识,获取该前端设备的时区策略;
根据该前端设备的时区策略,对该前端设备采集的数据进行分段存储,得到多段数据,该多段数据由该前端设备在多个时区采集得到,该多段数据对应多个时差信息,每段数据对应的时差信息用于指示该前端设备采集该每段数据 的时区时间与该标准时间的时差。
本申请实施例提供的装置,通过在接收到终端的数据查询请求时,根据数据查询请求中携带的前端设备的标识、第一开始时间和第一结束时间,获取前端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间后返回给终端,由于第一时差信息用于指示前端设备在采集目标数据时的时区时间与标准时间的时差,使得终端可以根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
图11是本申请实施例提供的一种数据管理装置的结构示意图。参照图11,该装置包括:
发送模块1101,用于向服务器发送数据查询请求,该数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,该第一开始时间和该第一结束时间的时间类型为标准时间,该标准时间为该服务器存储数据的开始时间和结束时间的时间类型;
接收模块1102,用于接收该服务器发送的目标数据、第一时差信息以及该目标数据的开始时间和结束时间,该目标数据的开始时间和结束时间之间时间段为第一时间段,该第一时间段包含在该第一开始时间和该第一结束时间之间时间段内,该第一时差信息用于指示该前端设备在该第一时间段内的时区时间与该标准时间的时差;
转换模块1103,用于根据该第一时差信息,将该目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,该第二开始时间和该第二结束时间的时间类型为该前端设备的时区时间;
显示模块1104,用于显示该目标数据以及该第二开始时间和该第二结束时间。
在一种可能实现方式中,该发送模块1101用于当获取到输入的该前端设备的标识、开始时间和结束时间且输入的开始时间和结束时间的时间类型为该标准时间时,将该输入的开始时间和结束时间作为该第一开始时间和该第一结束时间,向该服务器发送该数据查询请求。
在一种可能实现方式中,该发送模块1101还用于当获取到输入的该前端设备的标识、第三开始时间和第三结束时间时,向服务器发送该时差查询请求,该第三开始时间和该第三结束时间的时间类型为该前端设备的时区时间,该时差查询请求携带该前端设备的标识、该第三开始时间和该第三结束时间;
该接收模块1102还用于接收服务器发送的第二时差信息,该第二时差信息用于指示该前端设备在第二时间段内的时区时间与该标准时间的时差,该第二时间段为该第三开始时间和该第三结束时间之间时间段;
该转换模块1103还用于根据该时差信息,将该第三开始时间和该第三结束时间转换为该第一开始时间和该第一结束时间。
本申请实施例提供的装置,通过在接收到终端的数据查询请求时,根据数据查询请求中携带的前端设备的标识、第一开始时间和第一结束时间,获取前端设备采集的目标数据、第一时差信息以及目标数据的开始时间和结束时间后返回给终端,由于第一时差信息用于指示前端设备在采集目标数据时的时区时间与标准时间的时差,使得终端可以根据第一时差信息,将目标数据的开始时间和结束时间转换为前端设备的时区时间后显示。上述方案支持不同时区的前端设备接入服务器,前端设备可以与服务器在不同时区,不同的前端设备可以在不同的时区,同一个前端设备在不同的时间段也可以在不同的时区,可以满足前端设备在多个时区的数据管理需求。
需要说明的是:上述实施例提供的数据管理装置在数据管理时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据管理装置与数据管理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图12是本申请实施例提供的一种终端1200的结构示意图。该终端1200可以是:智能手机、平板电脑、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、笔记本电脑或台式电脑。终端1200还可能被称为用户设备、便携式终端、膝上型终端、台 式终端等其他名称。
通常,终端1200包括有:处理器1201和存储器1202。
处理器1201可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1201可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1201也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1201可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1201还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器1202可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1202还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1202中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器1201所执行以实现本申请中方法实施例提供的数据管理方法。
在一些实施例中,终端1200还可选包括有:外围设备接口1203和至少一个外围设备。处理器1201、存储器1202和外围设备接口1203之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口1203相连。具体地,外围设备包括:射频电路1204、显示屏1205、摄像头1206、音频电路1207、定位组件1208和电源1209中的至少一种。
外围设备接口1203可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器1201和存储器1202。在一些实施例中,处理器1201、存储器1202和外围设备接口1203被集成在同一芯片或电路板上;在一些其他实施例中,处理器1201、存储器1202和外围设备接口1203中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路1204用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路1204通过电磁信号与通信网络以及其他通信设备进行通信。 射频电路1204将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路1204包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路1204可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:城域网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路1204还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏1205用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏1205是触摸显示屏时,显示屏1205还具有采集在显示屏1205的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器1201进行处理。此时,显示屏1205还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏1205可以为一个,设置终端1200的前面板;在另一些实施例中,显示屏1205可以为至少两个,分别设置在终端1200的不同表面或呈折叠设计;在再一些实施例中,显示屏1205可以是柔性显示屏,设置在终端1200的弯曲表面上或折叠面上。甚至,显示屏1205还可以设置成非矩形的不规则图形,也即异形屏。显示屏1205可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件1206用于采集图像或视频。可选地,摄像头组件1206包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件1206还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路1207可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器1201进行处理,或者输入至射频电路1204以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分 别设置在终端1200的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器1201或射频电路1204的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路1207还可以包括耳机插孔。
定位组件1208用于定位终端1200的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件1208可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统、俄罗斯的格雷纳斯系统或欧盟的伽利略系统的定位组件。
电源1209用于为终端1200中的各个组件进行供电。电源1209可以是交流电、直流电、一次性电池或可充电电池。当电源1209包括可充电电池时,该可充电电池可以支持有线充电或无线充电。该可充电电池还可以用于支持快充技术。
在一些实施例中,终端1200还包括有一个或多个传感器1210。该一个或多个传感器1210包括但不限于:加速度传感器1211、陀螺仪传感器1212、压力传感器1213、指纹传感器1214、光学传感器1215以及接近传感器1216。
加速度传感器1211可以检测以终端1200建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器1211可以用于检测重力加速度在三个坐标轴上的分量。处理器1201可以根据加速度传感器1211采集的重力加速度信号,控制触摸显示屏1205以横向视图或纵向视图进行用户界面的显示。加速度传感器1211还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器1212可以检测终端1200的机体方向及转动角度,陀螺仪传感器1212可以与加速度传感器1211协同采集用户对终端1200的3D动作。处理器1201根据陀螺仪传感器1212采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器1213可以设置在终端1200的侧边框和/或触摸显示屏1205的下层。当压力传感器1213设置在终端1200的侧边框时,可以检测用户对终端1200的握持信号,由处理器1201根据压力传感器1213采集的握持信号进行左右手识别或快捷操作。当压力传感器1213设置在触摸显示屏1205的下层时,由处 理器1201根据用户对触摸显示屏1205的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器1214用于采集用户的指纹,由处理器1201根据指纹传感器1214采集到的指纹识别用户的身份,或者,由指纹传感器1214根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器1201授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器1214可以被设置终端1200的正面、背面或侧面。当终端1200上设置有物理按键或厂商Logo时,指纹传感器1214可以与物理按键或厂商Logo集成在一起。
光学传感器1215用于采集环境光强度。在一个实施例中,处理器1201可以根据光学传感器1215采集的环境光强度,控制触摸显示屏1205的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏1205的显示亮度;当环境光强度较低时,调低触摸显示屏1205的显示亮度。在另一个实施例中,处理器1201还可以根据光学传感器1215采集的环境光强度,动态调整摄像头组件1206的拍摄参数。
接近传感器1216,也称距离传感器,通常设置在终端1200的前面板。接近传感器1216用于采集用户与终端1200的正面之间的距离。在一个实施例中,当接近传感器1216检测到用户与终端1200的正面之间的距离逐渐变小时,由处理器1201控制触摸显示屏1205从亮屏状态切换为息屏状态;当接近传感器1216检测到用户与终端1200的正面之间的距离逐渐变大时,由处理器1201控制触摸显示屏1205从息屏状态切换为亮屏状态。
本领域技术人员可以理解,图12中示出的结构并不构成对终端1200的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
图13是本申请实施例提供的一种服务器1300的结构示意图,该服务器1300可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(Central Processing Units,CPU)1301和一个或一个以上的存储器1302,其中,该存储器1302中存储有至少一条指令,该至少一条指令由该处理器1301加载并执行以实现上述各个方法实施例提供的方法。当然,该服务器还可以具有有 线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该服务器还可以包括其他用于实现设备功能的部件,在此不做赘述。
在示例性实施例中,还提供了一种存储有至少一条指令的计算机可读存储介质,例如存储有至少一条指令的存储器,上述至少一条指令被处理器执行时实现上述实施例中的数据管理方法。例如,该计算机可读存储介质可以是只读内存(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,上述程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
上述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (24)

  1. 一种数据管理方法,其特征在于,应用于服务器,所述方法包括:
    接收终端的数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
    根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
    将所述目标数据、所述第一时差信息以及所述目标数据的开始时间和结束时间发送给所述终端。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,包括:
    根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,查询已存储的数据段、每个数据段对应的时差信息以及每个数据段的开始时间和结束时间;
    当查询到任一数据段的开始时间和结束时间之间时间段包含在所述第一开始时间和所述第一结束时间之间时间段内时,将查询到的数据段作为所述目标数据,将查询到的数据段对应的时差信息作为所述第一时差信息,将查询到的数据段的开始时间和结束时间作为所述目标数据的开始时间和结束时间。
  3. 根据权利要求1所述的方法,其特征在于,所述接收终端的数据查询请求之前,所述方法还包括:
    接收所述终端的时差查询请求,所述时差查询请求携带所述前端设备的标识、第三开始时间和第三结束时间,所述第三开始时间和所述第三结束时间的 时间类型为所述前端设备的时区时间;
    获取所述前端设备在第二时间段内的第二时差信息,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段,所述第二时差信息用于指示所述前端设备在所述第二时间段内的时区时间与所述标准时间的时差;
    将所述第二时差信息发送给所述终端。
  4. 根据权利要求3所述的方法,其特征在于,所述获取所述前端设备在第二时间段内的时差信息,包括:
    根据所述第三开始时间和所述第三结束时间,查询时区信息表,得到所述时差信息,所述时区信息表用于记录所述前端设备在至少一个时间段内的时差信息。
  5. 根据权利要求1所述的方法,其特征在于,所述接收终端的数据查询请求之前,所述方法还包括:
    根据数据采集计划,获取所述前端设备所采集的数据进行存储,所述数据采集计划包括所述前端设备的标识、数据采集时间模板以及时区策略的标识,所述数据采集时间模板用于指示前端设备进行数据采集的时间段,所述时区策略包括前端设备的时区信息。
  6. 根据权利要求5所述的方法,其特征在于,所述根据数据采集计划,获取所述前端设备所采集的数据进行存储之前,所述方法还包括:
    获取时区策略表,所述时区策略表包括所述服务器和所述前端设备的时区策略以及对应的策略标识,每个时区策略包括策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,所述策略类型包括服务器的时区策略和前端设备的时区策略。
  7. 根据权利要求6所述的方法,其特征在于,所述根据数据采集计划,获取所述前端设备所采集的数据进行存储,包括:
    根据所述数据采集计划中所述前端设备的时区策略的标识,获取所述前端设备的时区策略;
    根据所述前端设备的时区策略,对所述前端设备采集的数据进行分段存储,得到多段数据,所述多段数据由所述前端设备在多个时区采集得到,所述多段数据对应多个时差信息,每段数据对应的时差信息用于指示所述前端设备采集所述每段数据的时区时间与所述标准时间的时差。
  8. 一种数据管理方法,其特征在于,应用于终端,所述方法包括:
    向服务器发送数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
    接收所述服务器发送的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
    根据所述第一时差信息,将所述目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,所述第二开始时间和所述第二结束时间的时间类型为所述前端设备的时区时间;
    显示所述目标数据以及所述第二开始时间和所述第二结束时间。
  9. 根据权利要求8所述的方法,其特征在于,所述向服务器发送数据查询请求,包括:
    当获取到输入的所述前端设备的标识、开始时间和结束时间且输入的开始时间和结束时间的时间类型为所述标准时间时,将所述输入的开始时间和结束时间作为所述第一开始时间和所述第一结束时间,向所述服务器发送所述数据查询请求。
  10. 根据权利要求8所述的方法,其特征在于,所述向服务器发送数据查询请求之前,所述方法还包括:
    当获取到输入的所述前端设备的标识、第三开始时间和第三结束时间时, 向服务器发送所述时差查询请求,所述第三开始时间和所述第三结束时间的时间类型为所述前端设备的时区时间,所述时差查询请求携带所述前端设备的标识、所述第三开始时间和所述第三结束时间;
    接收服务器发送的第二时差信息,所述第二时差信息用于指示所述前端设备在第二时间段内的时区时间与所述标准时间的时差,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段;
    根据所述时差信息,将所述第三开始时间和所述第三结束时间转换为所述第一开始时间和所述第一结束时间。
  11. 一种数据管理装置,其特征在于,应用于服务器,所述装置包括:
    接收模块,用于接收终端的数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
    获取模块,用于根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
    发送模块,用于将所述目标数据、所述第一时差信息以及所述目标数据的开始时间和结束时间发送给所述终端。
  12. 根据权利要求11所述的装置,其特征在于,所述获取模块用于:
    根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,查询已存储的数据段、每个数据段对应的时差信息以及每个数据段的开始时间和结束时间;
    当查询到任一数据段的开始时间和结束时间之间时间段包含在所述第一开始时间和所述第一结束时间之间时间段内时,将查询到的数据段作为所述目标数据,将查询到的数据段对应的时差信息作为所述第一时差信息,将查询到的 数据段的开始时间和结束时间作为所述目标数据的开始时间和结束时间。
  13. 根据权利要求11所述的装置,其特征在于,
    所述接收模块还用于接收所述终端的时差查询请求,所述时差查询请求携带所述前端设备的标识、第三开始时间和第三结束时间,所述第三开始时间和所述第三结束时间的时间类型为所述前端设备的时区时间;
    所述获取模块还用于获取所述前端设备在第二时间段内的第二时差信息,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段,所述第二时差信息用于指示所述前端设备在所述第二时间段内的时区时间与所述标准时间的时差;
    所述发送模块还用于将所述第二时差信息发送给所述终端。
  14. 根据权利要求13所述的装置,其特征在于,所述获取模块用于根据所述第三开始时间和所述第三结束时间,查询时区信息表,得到所述时差信息,所述时区信息表用于记录所述前端设备在至少一个时间段内的时差信息。
  15. 根据权利要求11所述的装置,其特征在于,所述获取模块还用于根据数据采集计划,获取所述前端设备所采集的数据进行存储,所述数据采集计划包括所述前端设备的标识、数据采集时间模板以及时区策略的标识,所述数据采集时间模板用于指示前端设备进行数据采集的时间段,所述时区策略包括前端设备的时区信息。
  16. 根据权利要求15所述的装置,其特征在于,所述获取模块还用于获取时区策略表,所述时区策略表包括所述服务器和所述前端设备的时区策略以及对应的策略标识,每个时区策略包括策略类型、时区、进入夏令时的时间、出夏令时的时间以及夏令时与冬令时的时差,所述策略类型包括服务器的时区策略和前端设备的时区策略。
  17. 根据权利要求16所述的装置,其特征在于,所述获取模块用于:
    根据所述数据采集计划中所述前端设备的时区策略的标识,获取所述前端 设备的时区策略;
    根据所述前端设备的时区策略,对所述前端设备采集的数据进行分段存储,得到多段数据,所述多段数据由所述前端设备在多个时区采集得到,所述多段数据对应多个时差信息,每段数据对应的时差信息用于指示所述前端设备采集所述每段数据的时区时间与所述标准时间的时差。
  18. 一种数据管理装置,其特征在于,应用于终端,所述装置包括:
    发送模块,用于向服务器发送数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
    接收模块,用于接收所述服务器发送的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
    转换模块,用于根据所述第一时差信息,将所述目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,所述第二开始时间和所述第二结束时间的时间类型为所述前端设备的时区时间;
    显示模块,用于显示所述目标数据以及所述第二开始时间和所述第二结束时间。
  19. 根据权利要求18所述的装置,其特征在于,所述发送模块用于当获取到输入的所述前端设备的标识、开始时间和结束时间且输入的开始时间和结束时间的时间类型为所述标准时间时,将所述输入的开始时间和结束时间作为所述第一开始时间和所述第一结束时间,向所述服务器发送所述数据查询请求。
  20. 根据权利要求18所述的装置,其特征在于,
    所述发送模块还用于当获取到输入的所述前端设备的标识、第三开始时间和第三结束时间时,向服务器发送所述时差查询请求,所述第三开始时间和所 述第三结束时间的时间类型为所述前端设备的时区时间,所述时差查询请求携带所述前端设备的标识、所述第三开始时间和所述第三结束时间;
    所述接收模块还用于接收服务器发送的第二时差信息,所述第二时差信息用于指示所述前端设备在第二时间段内的时区时间与所述标准时间的时差,所述第二时间段为所述第三开始时间和所述第三结束时间之间时间段;
    所述转换模块还用于根据所述时差信息,将所述第三开始时间和所述第三结束时间转换为所述第一开始时间和所述第一结束时间。
  21. 一种数据管理系统,其特征在于,所述系统包括前端设备、服务器和终端,
    所述前端设备用于采集数据,并将采集到的数据发送给所述服务器;
    所述服务器用于采用标准时间,对所述前端设备采集的数据进行存储;
    所述终端用于向服务器发送数据查询请求,所述数据查询请求携带前端设备的标识、第一开始时间和第一结束时间,所述第一开始时间和所述第一结束时间的时间类型为标准时间,所述标准时间为所述服务器存储数据的开始时间和结束时间的时间类型;
    所述服务器还用于当接收到终端的数据查询请求时,根据所述前端设备的标识、所述第一开始时间和所述第一结束时间,获取所述前端设备采集的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间,并发送给所述终端,所述目标数据的开始时间和结束时间之间时间段为第一时间段,所述第一时间段包含在所述第一开始时间和所述第一结束时间之间时间段内,所述第一时差信息用于指示所述前端设备在所述第一时间段内的时区时间与所述标准时间的时差;
    所述终端还用于当接收所述服务器发送的目标数据、第一时差信息以及所述目标数据的开始时间和结束时间时,根据所述第一时差信息,将所述目标数据的开始时间和结束时间转换为第二开始时间和第二结束时间,所述第二开始时间和所述第二结束时间的时间类型为所述前端设备的时区时间,显示所述目标数据以及所述第二开始时间和所述第二结束时间。
  22. 一种服务器,其特征在于,包括处理器和存储器;所述存储器,用于 存放至少一条指令;所述处理器,用于执行所述存储器上所存放的至少一条指令,实现权利要求1-7任一项所述的方法步骤。
  23. 一种终端,其特征在于,包括处理器和存储器;所述存储器,用于存放至少一条指令;所述处理器,用于执行所述存储器上所存放的至少一条指令,实现权利要求8-10任一项所述的方法步骤。
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有至少一条指令,所述至少一条指令被处理器执行时实现权利要求1-10任一项所述的方法步骤。
PCT/CN2019/114426 2018-10-31 2019-10-30 数据管理方法、装置、系统、服务器、终端及存储介质 WO2020088542A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811289487.4 2018-10-31
CN201811289487.4A CN111125436B (zh) 2018-10-31 2018-10-31 数据管理方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2020088542A1 true WO2020088542A1 (zh) 2020-05-07

Family

ID=70462990

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114426 WO2020088542A1 (zh) 2018-10-31 2019-10-30 数据管理方法、装置、系统、服务器、终端及存储介质

Country Status (2)

Country Link
CN (1) CN111125436B (zh)
WO (1) WO2020088542A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4164215A4 (en) * 2020-06-05 2023-11-22 Hangzhou Hikvision Digital Technology Co., Ltd. VIDEO PLAYBACK METHOD AND APPARATUS, ELECTRONIC DEVICE AND COMPUTER-READABLE STORAGE MEDIUM

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818029A (zh) * 2021-01-13 2021-05-18 远景智能国际私人投资有限公司 时序数据的查询方法、装置、设备及可读存储介质
CN117223339A (zh) * 2021-08-27 2023-12-12 Oppo广东移动通信有限公司 无线通信的方法、终端设备和网络设备
CN115174292B (zh) * 2022-05-25 2024-03-22 青岛海尔科技有限公司 设备数据管理平台

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174982A (zh) * 2007-11-16 2008-05-07 华为技术有限公司 一种实现多时区数据信息统一的方法、装置及系统
CN102244758A (zh) * 2011-07-08 2011-11-16 杭州华三通信技术有限公司 一种基于录像文件的数据获取方法和设备
CN103092959A (zh) * 2013-01-18 2013-05-08 中兴通讯股份有限公司 任务时区处理方法及装置

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7676288B2 (en) * 2006-06-23 2010-03-09 Invensys Systems, Inc. Presenting continuous timestamped time-series data values for observed supervisory control and manufacturing/production parameters
US9483615B2 (en) * 2007-08-10 2016-11-01 Smiths Medical Asd, Inc. Communication of original and updated pump parameters for a medical infusion pump
JP2010025729A (ja) * 2008-07-18 2010-02-04 Yamatake Corp プロセス監視システムおよび方法
JP5210216B2 (ja) * 2009-03-26 2013-06-12 みずほ情報総研株式会社 情報処理システム、制御方法及びプログラム、並びに、グローバルキャッシュマネージメントシステム
CN101873456B (zh) * 2009-04-24 2012-02-08 上海乐金广电电子有限公司 数字视频录像机上的录像数据再现装置及方法
US9361594B2 (en) * 2012-09-24 2016-06-07 Sap Se Generating time slot for managing time across multiple time zones
JP2015014515A (ja) * 2013-07-05 2015-01-22 キヤノン株式会社 ユーザーから現地時刻を取得した場合におけるタイムゾーンの設定方法
CN103986944B (zh) * 2014-06-05 2017-10-17 西安诺瓦电子科技有限公司 显示终端集群播控方法、显示终端及显示终端集群管理端
CN105338297B (zh) * 2014-08-11 2019-03-12 杭州海康威视系统技术有限公司 一种视频数据存储及回放系统、装置和方法
US10567557B2 (en) * 2014-10-31 2020-02-18 Splunk Inc. Automatically adjusting timestamps from remote systems based on time zone differences
CN105989048B (zh) * 2015-02-05 2019-12-24 浙江大华技术股份有限公司 一种数据记录处理方法、设备及系统
CN106487895A (zh) * 2016-10-14 2017-03-08 深圳市欧瑞博电子有限公司 定时控制方法和装置
CN108206933B (zh) * 2016-12-16 2020-05-15 杭州海康威视数字技术股份有限公司 一种基于视频云存储系统的视频数据获取方法及装置
CN107657058A (zh) * 2017-10-19 2018-02-02 上海大汉三通数据通信有限公司 一种数据的查询方法及相关装置
CN107919933A (zh) * 2017-11-17 2018-04-17 深圳市泉眼网络科技有限公司 一种时间更新的方法、装置、移动终端及存储介质
CN108495183B (zh) * 2018-04-09 2020-12-04 广州酷狗计算机科技有限公司 显示专辑信息的方法和装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174982A (zh) * 2007-11-16 2008-05-07 华为技术有限公司 一种实现多时区数据信息统一的方法、装置及系统
CN102244758A (zh) * 2011-07-08 2011-11-16 杭州华三通信技术有限公司 一种基于录像文件的数据获取方法和设备
CN103092959A (zh) * 2013-01-18 2013-05-08 中兴通讯股份有限公司 任务时区处理方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4164215A4 (en) * 2020-06-05 2023-11-22 Hangzhou Hikvision Digital Technology Co., Ltd. VIDEO PLAYBACK METHOD AND APPARATUS, ELECTRONIC DEVICE AND COMPUTER-READABLE STORAGE MEDIUM

Also Published As

Publication number Publication date
CN111125436A (zh) 2020-05-08
CN111125436B (zh) 2023-08-08

Similar Documents

Publication Publication Date Title
CN110674022B (zh) 行为数据获取方法、装置及存储介质
CN109874312B (zh) 播放音频数据的方法和装置
CN110278464B (zh) 显示榜单的方法和装置
CN110841285B (zh) 界面元素的显示方法、装置、计算机设备及存储介质
CN111190748B (zh) 数据共享方法、装置、设备及存储介质
WO2020088542A1 (zh) 数据管理方法、装置、系统、服务器、终端及存储介质
CN113204298B (zh) 显示发布进度的方法、装置、电子设备及存储介质
CN112751679B (zh) 即时通讯消息处理方法、终端及服务器
CN111510482B (zh) 失败网络请求的确定方法、装置及计算机存储介质
CN115378900A (zh) 歌单共享方法、装置、终端及存储介质
CN111385525B (zh) 视频监控方法、装置、终端及系统
CN110636144A (zh) 数据下载的方法和装置
CN112988254B (zh) 管理硬件设备的方法、装置和设备
CN110381155B (zh) 任务管理方法、装置、存储介质及终端
CN110471614B (zh) 一种存储数据的方法、检测终端的方法及装置
CN108401194B (zh) 时间戳确定方法、装置和计算机可读存储介质
CN112612539B (zh) 数据模型卸载方法、装置、电子设备及存储介质
CN116842047A (zh) 缓存更新方法、装置、设备及计算机可读存储介质
CN112181915B (zh) 执行业务的方法、装置、终端和存储介质
CN110825465B (zh) 日志数据处理方法、装置、电子设备及存储介质
CN111008083B (zh) 页面通信方法、装置、电子设备及存储介质
CN112597417B (zh) 页面更新方法、装置、电子设备及存储介质
CN110336881B (zh) 执行业务处理请求的方法和装置
CN111190751B (zh) 基于歌单的任务处理方法、装置、计算机设备及存储介质
CN110941458B (zh) 启动应用程序的方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19878390

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19878390

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19878390

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 221121)

122 Ep: pct application non-entry in european phase

Ref document number: 19878390

Country of ref document: EP

Kind code of ref document: A1