Data management method and device, terminal equipment and computer program product
Through the cloud platform's time information conversion and time zone configuration management of device requests, the problems of low data management efficiency and high error rate for users in different time zones are solved, and efficient multi-time zone data management is achieved.
Patent Information
- Application Number
- CN202510510436.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, users in different time zones have low efficiency and high error rates in data management, which cannot meet the data management needs in multi-time zone scenarios.
The cloud platform receives requests from the device, converts time information based on the device's time zone configuration and platform time zone, and obtains the device's time zone configuration through the time zone database to achieve unified time information conversion and management.
It improves the data management efficiency of users in different time zones, reduces the data management error rate, and meets the data management needs in multi-time zone scenarios.
Smart Images

Figure CN120499267A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a data management method, apparatus, terminal equipment and computer program product. Background Art
[0002] Multi-time zone scenarios may occur in IoT systems. For example, terminal devices used by users in different time zones are connected to the same cloud platform, or terminal devices providing services to users in different time zones are connected to the same cloud platform. Regardless of the multi-time zone scenario, data management requirements will arise in multi-time zone scenarios.
[0003] At present, in related technologies, cloud platforms use a unified fixed time zone (for example, the zero time zone (GMT+0)), and the terminal devices providing services are in the same time zone as the cloud platform. When the terminal devices used by users in different time zones interact with the cloud platform, it is necessary to convert the time information involved in each data based on the user's time zone and the fixed time zone of the cloud platform. This will reduce the efficiency of data management for users and increase the error rate of data management (for example, business anomalies caused by time conversion errors). Therefore, this method cannot meet the data management needs of users in different time zones.
[0004] Currently, no effective solution has been proposed to address the problem that related technologies cannot meet the data management needs of users in different time zones. Summary of the Invention
[0005] The embodiments of the present application provide a data management method, apparatus, terminal device, and computer program product to at least solve the problem in related technologies that the data management needs of users in different time zones cannot be met.
[0006] In a first aspect, an embodiment of the present application provides a data management method, which is applied to a cloud platform, and the method includes: receiving a first request from a first device, wherein the first request includes first time information and a first time zone configuration; based on the first time zone configuration and the platform time zone of the cloud platform, converting the first time information in the first request into first platform time information to obtain a second request; parsing the second request, determining the second device to which the second request points, and obtaining the second time zone configuration corresponding to the second device from a time zone database; based on the second time zone configuration and the platform time zone, converting the first platform time information in the second request into second time information to obtain a third request; and sending the third request to the second device.
[0007] In some embodiments, the first time zone configuration includes the first time zone of the first device and the first daylight saving time configuration of the first device, wherein the first daylight saving time configuration includes the activation status of the first device for daylight saving time and the first time period when the first device enters daylight saving time; based on the first time zone configuration and the platform time zone of the cloud platform, the first time information in the first request is converted into the first platform time information, and the second request includes: when the first device has daylight saving time enabled and the first time information falls within the first time period, the first time zone is corrected according to daylight saving time to obtain a third time zone; based on the third time zone and the platform time zone, the first time information is converted into the first platform time information to obtain the second request; when the first device has not enabled daylight saving time, or the first device has enabled daylight saving time but the first time information does not fall within the first time period, based on the first time zone and the platform time zone, the first time information is converted into the first platform time information to obtain the second request.
[0008] In some embodiments, the second time zone configuration includes the second time zone of the second device and the second daylight saving time configuration of the second device, wherein the second daylight saving time configuration includes the activation status of the second device for daylight saving time and the second time period when the second device enters daylight saving time; based on the second time zone configuration and the platform time zone, the first platform time information in the second request is converted into the second time information, and the third request includes: based on the second time zone configuration and the platform time zone, the first platform time information is converted into the second time information; when the second device has daylight saving time enabled and the second time information falls into the second time period, the second time information is corrected according to daylight saving time to obtain corrected time information; and based on the corrected time information, the third request is generated; when the second device has not enabled daylight saving time, or the second device has enabled daylight saving time but the second time information does not fall into the second time period, the third request is generated based on the second time information.
[0009] In some embodiments, after sending the third request to the second device, the method further includes: receiving a first response from the second device, wherein the first response includes third time information; obtaining the second time zone configuration corresponding to the second device from the time zone database; based on the second time zone configuration and the platform time zone, converting the third time information in the first response into second platform time information to obtain a second response; parsing the second response to determine the first device to which the second response points; based on the first time zone configuration and the platform time zone, converting the second platform time information in the second response into fourth time information to obtain a third response; and sending the third response to the first device.
[0010] In some embodiments, before receiving the first request from the first device, the method further includes: after the first device is connected to the cloud platform, obtaining the time zone configuration of the region where the first device is located, and using the time zone configuration of the region where the first device is located as the first time zone configuration; or after the first device is connected to the cloud platform, obtaining the first time zone configuration reported by the first device, and storing the second time zone configuration in the time zone database.
[0011] In some embodiments, before receiving the first request from the first device, the method further includes: after the second device connects to the cloud platform, receiving the second time zone configuration reported by the second device, and storing the second time zone configuration in the time zone database.
[0012] In some embodiments, the method also includes: receiving a fourth request from the first device, wherein the fourth request includes the first time information and the first time zone configuration; based on the first time zone configuration and the platform time zone, converting the fifth time information in the fourth request into the third platform time information to obtain a fifth request; parsing the fifth request to generate a fourth response corresponding to the fifth request; based on the first time zone configuration and the platform time zone, converting the third platform time information in the fourth response into the fifth time information to obtain a fifth response; and sending the fifth response to the first device.
[0013] In second aspect, an embodiment of the present application provides a data management device, which is applied to a cloud platform, and the device includes: a receiving module, which is used to receive a first request from a first device, wherein the first request includes first time information and a first time zone configuration; a first conversion module, which is used to convert the first time information in the first request into first platform time information based on the first time zone configuration and the platform time zone of the cloud platform, to obtain a second request; a parsing module, which is used to parse the second request, determine the second device to which the second request points, and obtain the second time zone configuration corresponding to the second device from the time zone database; a second conversion module, which is used to convert the first platform time information in the second request into second time information based on the second time zone configuration and the platform time zone, to obtain a third request; and a sending module, which is used to send the third request to the second device.
[0014] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data management method of any one of the above-mentioned first aspects is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is run, the data management method described in any one of the above-mentioned first aspects is executed.
[0016] Compared to the related art, the data management method, apparatus, terminal device and computer program product provided in the embodiments of the present application are as follows: the cloud platform can receive a first request from a first device, and based on the first time zone configuration contained in the first request and the platform time zone of the cloud platform, convert the first time information contained in the first request into the first platform time information to obtain a second request; then, the cloud platform can parse the second request, determine the second device to which the second request points, and obtain the second time zone configuration of the second device from the time zone database of the cloud platform; the cloud platform can convert the first platform time information into the second time information based on the second time zone configuration and the platform time zone to obtain a third request; finally, the cloud platform sends the third request to the second device. The cloud platform adopts a fixed platform time zone, which can distinguish the time zone of the first device and the time zone of the second device, and uniformly convert the time information involved in the interaction data of each device, which enables users in different time zones to use the same cloud platform to manage devices in different time zones, thereby improving the data management efficiency of users in different time zones. Through this application, the problem in related technologies that the data management needs of users in different time zones cannot be met is solved, the data management needs of users in different time zones are met, and the technical effect of improving the efficiency of data management is achieved.
[0017] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 is an architecture diagram of a communication system according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a data management method according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a time zone configuration interface according to an embodiment of the present application;
[0022] Figure 4 is a flow chart of a data management method according to another embodiment of the present application;
[0023] Figure 5 is a structural diagram of a data management device according to an embodiment of the present application;
[0024] Figure 6 It is a structural diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0026] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0027] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0028] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0029] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0030] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0031] Multi-time zone scenarios may occur in IoT systems. For example, terminal devices used by users in different time zones are connected to the same cloud platform, or terminal devices providing services to users in different time zones are connected to the same cloud platform. Regardless of the multi-time zone scenario, data management requirements will arise in multi-time zone scenarios.
[0032] At present, in related technologies, cloud platforms use a unified fixed time zone (for example, the zero time zone (GMT+0)), and the terminal devices providing services are in the same time zone as the cloud platform. When the terminal devices used by users in different time zones interact with the cloud platform, it is necessary to convert the time information involved in each data based on the user's time zone and the fixed time zone of the cloud platform. This will reduce the efficiency of data management for users and increase the error rate of data management (for example, business anomalies caused by time conversion errors). Therefore, this method cannot meet the data management needs of users in different time zones.
[0033] Currently, no effective solution has been proposed to address the problem that related technologies cannot meet the data management needs of users in different time zones.
[0034] In view of this, an embodiment of the present application provides a data management method, in which a cloud platform can receive a first request from a first device and, based on the first time zone configuration contained in the first request and the platform time zone of the cloud platform, convert the first time information contained in the first request into the first platform time information to obtain a second request; then, the cloud platform can parse the second request, determine the second device to which the second request points, and obtain the second time zone configuration of the second device from the time zone database of the cloud platform; the cloud platform can convert the first platform time information into the second time information based on the second time zone configuration and the platform time zone to obtain a third request; finally, the cloud platform sends the third request to the second device. The cloud platform uses a fixed platform time zone, which can distinguish the time zone of the first device and the time zone of the second device, and uniformly convert the time information involved in the interaction data of each device, so that users in different time zones can use the same cloud platform to manage devices in different time zones, thereby improving the data management efficiency of users in different time zones. Through this application, the problem that the related art cannot meet the data management needs of users in different time zones is solved, the data management needs of users in different time zones are met, and the technical effect of improving the efficiency of data management is achieved.
[0035] The technical solution in this application will be described below with reference to the accompanying drawings.
[0036] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as wireless fidelity (WiFi) systems, vehicle-to-everything (V2X) communication systems, device-to-device (D2D) communication systems, Internet of Vehicles communication systems, 4th generation (4G) mobile communication systems, such as long term evolution (LTE) systems, world-wide interoperability for microwave access (WiMAX) communication systems, 5th generation (5G) mobile communication systems, such as new radio (NR) systems, and future communication systems, such as 6th generation (6G) mobile communication systems.
[0037] The data management method provided in the embodiment of the present application can be applied to Figure 1 The communication system shown. Figure 1 , Figure 1 1 is a schematic diagram of a communication system 10 according to an embodiment of the present application, wherein the communication system 10 includes a first device 100, a second device 110, and a cloud platform 120. The first device 100, the second device 110, and the cloud platform 120 can communicate with each other via a wired network or a wireless network.
[0038] The cloud platform 120 may include a server cluster, which may be a single server or a server cluster composed of multiple servers (or microservers). For example, the multiple servers may include a data management server, a data acquisition plan management server, an access server, and a storage server. The server may also be a server in a cloud storage system. The embodiments of the present application do not limit the specific implementation of the cloud platform 120.
[0039] The cloud platform 120 can be divided into multiple layers. For example, the cloud platform 120 may include a view layer, a service layer, and an access layer. A user can use the first device 100 to interact with the view layer. The access layer of the cloud platform 120 is used to interact with the second device 110, which may be a terminal device providing various services to the user. The service layer of the cloud platform 120 is used to analyze and process service requests or responses generated by the first device 100 or the second device 110.
[0040] The first device 100 may be a terminal device with a data management function. For example, the first device 100 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook computer, wearable device, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, and other devices capable of installing application software. The embodiment of the present application does not impose any special restrictions on the specific form of the first device 100.
[0041] The second device 110 can be a terminal device with a data acquisition function. For example, the second device 110 can be an IP camera (IP Camera, IPC), a sensor or other device with a data acquisition function. The embodiment of the present application does not impose any special restrictions on the specific form of the second device 110.
[0042] The user can use the first device 100 to interact with the cloud platform 120 for data management of the second device 110 connected to the cloud platform 120. The cloud platform 120 can receive a first request from the first device 100, wherein the first request includes first time information and a first time zone configuration; based on the first time zone configuration and the platform time zone of the cloud platform 120, convert the first time information in the first request into first platform time information to obtain a second request; parse the second request, determine the second device 110 to which the second request points, and obtain the second time zone configuration corresponding to the second device 110 from the time zone database; based on the second time zone configuration and the platform time zone, convert the first platform time information in the second request into second time information to obtain a third request; and send the third request to the second device 110.
[0043] The second device 110 may generate a first response in response to the third request sent by the cloud platform 120. The cloud platform 120 may receive the first response from the second device 110, wherein the first response includes the third time information; obtain the second time zone configuration corresponding to the second device 110 from the time zone database; convert the third time information in the first response into second platform time information based on the second time zone configuration and the platform time zone to obtain a second response; parse the second response to determine the first device 100 to which the second response is directed; convert the second platform time information in the second response into fourth time information based on the first time zone configuration and the platform time zone to obtain a third response; and send the third response to the first device 100.
[0044] In addition, the user may also use the first device 100 to directly manage data on the cloud platform 120. The cloud platform 120 may receive a fourth request from the first device 100, wherein the fourth request includes the first time information and the first time zone configuration; based on the first time zone configuration and the platform time zone, convert the fifth time information in the fourth request into the third platform time information to obtain a fifth request; parse the fifth request to generate a fourth response corresponding to the fifth request; based on the first time zone configuration and the platform time zone, convert the third platform time information in the fourth response into the fifth time information to obtain a fifth response; and send the fifth response to the first device 100.
[0045] In specific implementation, the first device 100, the second device 110 and the cloud platform 120 can all adopt Figure 6 The composition results shown or include Figure 6 Parts shown. Figure 6It is a structural diagram of a terminal device according to an embodiment of the present application. When the terminal device 6 has the function of the first device 100 described in the embodiment of the present application, the terminal device 6 can be the first device 100 or the chip or system on chip in the first device 100; when the terminal device 6 has the function of the second device 110 described in the embodiment of the present application, the terminal device 6 can be the second device 110 or the chip or system on chip in the second device 110; when the terminal device 6 has the function of the cloud platform 120 described in the embodiment of the present application, the terminal device 6 can be the cloud platform 120 or the chip or system on chip in the cloud platform 120.
[0046] In some embodiments, the cloud platform 120 provided in the embodiments of the present application can be implemented in a software manner. For example, it can be installed on Figure 6 In the memory 61 of the terminal device 6 shown, the cloud platform 120 can be software in the form of a program or plug-in, including a receiving module 50, a first conversion module 51, a parsing module 52, a second conversion module 53, and a sending module 54. These modules are logical and can be arbitrarily combined or further divided according to the functions implemented.
[0047] The functions of each module will be described below.
[0048] The data management method provided in the embodiment of the present application will be described in conjunction with the exemplary application architecture of the communication system 10 provided in the embodiment of the present application.
[0049] The following will be combined Figure 2 For an explanation of the data management method provided by one embodiment of the present application, please refer to Figure 2 , Figure 2 This is a flow chart of a data management method according to an embodiment of the present application, which is applied to a cloud platform, such as Figure 2 As shown, the method includes:
[0050] Step S201: Receive a first request from a first device, where the first request includes first time information and a first time zone configuration.
[0051] The user can use the first device to interact with the cloud platform's view layer. The cloud platform can convert the time information in the data sent by the first device into the platform's time zone at the view layer. The cloud platform can also convert the time information in the data to be sent to the first device into the time zone of the first device at the view layer.
[0052] The platform time zone is the time zone where the server where the cloud platform is deployed is located. Generally, the time zone where the server is located is selected as the platform time zone. Before the cloud platform is deployed, the platform time zone can be any time zone, such as the zero time zone; alternatively, the proportion of time zones where the devices (including the first device and the second device) that will be connected to the cloud platform are located can be counted, and the time zone with the highest proportion can be used as the platform time zone. Due to the existence of winter and summer time systems in some areas, this will cause the platform time zone to jump twice a year, causing server program time confusion. For example, in the Chicago area of the United States (America / Chicago), there are two time zones in a year: GMT-6 (non-daylight saving time) and GMT-5 (daylight saving time). Therefore, the cloud platform needs to turn off the daylight saving time function and uniformly adopt a fixed time zone in the GMT format (for example, the zero time zone (GMT+0)).
[0053] Daylight Saving Time (DST) is a system of artificially set local time to conserve energy. Generally, during the early summer months, the clocks are set forward one hour. This allows people to wake up earlier and go to bed earlier, reducing the amount of light used, thereby making full use of sunlight and saving electricity. The specific regulations vary among countries that adopt DST. Nearly 110 countries worldwide implement DST annually. For example, the Chicago time zone in the United States (America / Chicago) observes DST from 2:00 AM on the second Sunday in March to 2:00 AM on the first Sunday in November. During this time, the standard time zone for the region is GMT-5. All other times are not DST, and the standard time zone is GMT-6.
[0054] In this embodiment, the first time zone configuration includes the first time zone of the first device and the first daylight saving time configuration of the first device, wherein the first daylight saving time configuration includes the activation of daylight saving time by the first device and the first time period when the first device enters daylight saving time.
[0055] Since the area where the first device is located or the geographical location of the second device may also be in an area that adopts the winter and summer time systems, in order to avoid the problem of server program time confusion caused by daylight saving time jumps in the cloud platform, the daylight saving time activation status of the first device or the second device also needs to be configured.
[0056] In one embodiment, before receiving the first request from the first device, the method also includes: after the first device is connected to the cloud platform, obtaining the time zone configuration of the region where the first device is located, and using the time zone configuration of the region where the first device is located as the first time zone configuration; or after the first device is connected to the cloud platform, obtaining the first time zone configuration reported by the first device.
[0057] In this embodiment, the cloud platform can directly obtain the time zone configuration of the region where the first device is located. Taking the time zone of the Chicago area of the United States as an example, if the region where the first device is located is the Chicago area of the United States, the first time zone configuration of the first device can be directly determined based on the first time information. For example, if the first time information is 11:00:00 on May 16, 2025, the time zone configuration of the Chicago area of the United States is GMT-5, and the first time zone configuration of the first device can include the first time zone of the first device - GMT-5; if the timestamp corresponding to the first time information is 11:00:00 on January 16, 2025, the time zone configuration of the Chicago area of the United States is GMT-6, and the first time zone configuration of the first device can include the first time zone of the first device - GMT-6.
[0058] It should be noted that the above embodiment only introduces that the cloud platform obtains the time zone configuration of the region where the first device is located, and directly determines the time zone corresponding to the first device based on the time zone configuration of the region where the first device is located. However, the first time zone configuration of the first device can also be configured by the user.
[0059] Specifically, the first device can display a time zone configuration interface, wherein the time zone configuration interface includes multiple time zone options, a daylight saving time enable option, and a daylight saving time period option; the first device can generate a first time zone configuration in response to the user's selection operation of the first time zone option among the multiple time zone options, the selection operation of the daylight saving time enable option, and the selection operation of the daylight saving time period option on the first device; and the first device can report the first time zone configuration to the cloud platform.
[0060] Figure 3 is a schematic diagram of a time zone configuration interface according to an embodiment of the present application, such as Figure 3 As shown, after the first device is initialized, the time zone configuration interface can be displayed.
[0061] The user can use the first device to select the first time zone option from multiple time zone options by clicking the mouse, touching or pressing, or in other forms; the user can also select the daylight saving time activation option to determine whether to enable daylight saving time; when the user enables daylight saving time, the user can also select the daylight saving time period option, wherein the daylight saving time period option includes a start time and an end time, and the start time and the end time include "month", "week", "day", "hour" and "minute" respectively.
[0062] The first device can generate a first time zone configuration in response to the user's selection operation of the first time zone option among multiple time zone options, the selection operation of the daylight saving time enable option, and the selection operation of the daylight saving time period option on the first device, and report the first time zone configuration to the cloud platform.
[0063] Each time the first device interacts with the cloud platform for data (for example, requests data in the cloud platform or interacts with data in the cloud platform), it needs to carry the configured first time zone configuration in the request.
[0064] Step S202: Based on the first time zone configuration and the platform time zone of the cloud platform, the first time information in the first request is converted into first platform time information to obtain a second request.
[0065] Because the cloud platform uses a fixed platform time zone, which may be different from the time zone of the first device, the cloud platform can convert the first time information in the first request sent by the first device into the first platform time information in the platform time zone. In this way, the cloud platform can simultaneously access first devices in different time zones, thereby meeting the data management needs of users in different time zones.
[0066] In one embodiment, based on the first time zone configuration and the platform time zone of the cloud platform, the first time information in the first request is converted into the first platform time information to obtain the second request, including: when the first device has enabled daylight saving time and the first time information falls within the first time period, the first time zone is corrected according to the daylight saving time to obtain the third time zone; based on the third time zone and the platform time zone, the first time information is converted into the first platform time information to obtain the second request; when the first device has not enabled daylight saving time, or the first device has enabled daylight saving time but the first time information does not fall within the first time period, based on the first time zone and the platform time zone, the first time information is converted into the first platform time information to obtain the second request.
[0067] In this embodiment, if Figure 3 As shown, the user can enable daylight saving time through the time zone configuration interface displayed by the first device. In this case, in order to avoid server program time confusion on the cloud platform, the cloud platform needs to correct the first time zone of the first device that enables daylight saving time.
[0068] Specifically, if the first device has daylight saving time enabled and the first time information of the first device falls within the first time period, the first time zone configured by the user can be processed as -1. For example, if the first time zone configured by the user is GMT-6, and the first device has daylight saving time enabled, the first time period is from 2:00 on March 1 to 2:00 on November 1, and the timestamp corresponding to the first time information of the first device is 11:00:00 on May 1, 2025, because the first device has daylight saving time enabled and the first time information of the first device falls within the first time period, the cloud platform needs to process the first time zone configured by the user, GMT-6, as -1, to obtain the third time zone, GMT-5. Then, the cloud platform can convert the first time information into the first platform time information based on the third time zone, GMT-5, and the platform time zone.
[0069] It should be noted that in the above scenario, the timestamp corresponding to the first time information of the first device is equivalent to the local time of the first device. However, in some scenarios, the local time of the first device may not be the same as the first time information. In this case, it is also necessary to obtain the local time of the first device and use the local time of the first device as the basis for determining whether to perform daylight saving time correction. For example, when the second device connected to the cloud platform is a terminal device with a data acquisition function (for example, a network camera), the user can send a first request to the cloud platform through the first device. The first request is used to request the second device (for example, a network camera) to collect the target video during the target time period, and the first time information included in the first request corresponds to the target time period under the first time zone. However, the local time of the user (that is, the local time of the first device) is not necessarily the same as the first time information. Therefore, it is also necessary to obtain the local time of the first device and use the local time of the first device as the basis for determining whether to perform daylight saving time correction.
[0070] Step S203: parse the second request, determine the second device to which the second request points, and obtain a second time zone configuration corresponding to the second device from a time zone database.
[0071] In this embodiment, the cloud platform's business layer can be used to parse the first request sent by the first device. Within the cloud platform's business layer, all time-related data is uniformly transferred using the platform's time zone, shielding against time differences caused by the different time zones in which the first and second devices are located, and normalizing the time data. Thus, the same cloud platform supports access from both first and second devices in different time zones, thus meeting the data management needs of users in different time zones.
[0072] In one embodiment, before receiving the first request from the first device, the method further includes: after the second device connects to the cloud platform, receiving a second time zone configuration reported by the second device, and storing the second time zone configuration in the time zone database.
[0073] In this embodiment, the cloud platform can connect to one or more second devices, and the time zone of each second device can be different from the platform time zone of the cloud platform. The time zones of multiple second devices can also be different. Therefore, the second device can support users (e.g., operation and maintenance personnel) to configure the time zone of the second device. Users can customize the second time zone configuration of the second device through web pages, commands, programs, or other methods.
[0074] After the second time zone configuration is completed on the second device, the global time of the second device is automatically adjusted to correspond to the second time zone configuration, and all data generated or received by the second device is also uniformly adjusted to correspond to the second time zone configuration. Each time the second device connects to the cloud platform, it can automatically report the second time zone configuration of the second device. After receiving the second time zone configuration, the cloud platform stores the second time zone configuration in the time zone database.
[0075] Step S204: Based on the second time zone configuration and the platform time zone, the first platform time information in the second request is converted into second time information to obtain a third request.
[0076] For similar reasons as the first device, the second time zone configuration may also include the second time zone of the second device and the second daylight saving time configuration of the second device, wherein the second daylight saving time configuration includes the activation of daylight saving time by the second device and the second period during which the second device enters daylight saving time.
[0077] In one embodiment, the second time zone configuration may include a time offset (in seconds) for converting the second time zone to the platform time zone. For example, if the second time zone is GMT+8 and the platform time zone is GMT+0, the time offset is 8*60*60=28800 seconds. The cloud platform can convert the first platform time information in the second request into the second time information based on the time offset.
[0078] The access layer of the cloud platform may be responsible for the time conversion of the data related to the second device.
[0079] In one embodiment, based on the second time zone configuration and the platform time zone, converting the first platform time information in the second request into the second time information to obtain the third request includes the following steps:
[0080] Step 1: Convert the first platform time information into the second time information based on the second time zone configuration and the platform time zone.
[0081] Step 2: When daylight saving time is enabled on the second device and the second time information falls within the second time period, the second time information is corrected according to daylight saving time to obtain corrected time information; and based on the corrected time information, a third request is generated; when daylight saving time is not enabled on the second device, or when daylight saving time is enabled on the second device but the second time information does not fall within the second time period, a third request is generated based on the second time information.
[0082] In this embodiment, the data sent down by the cloud platform to the second device (downlink data or signaling, such as the second request in the above step S204) involves time data (for example, first platform time information) that can be converted by the access layer of the cloud platform. The access layer converts the first platform time information into second time information through the second time zone configuration (for example, time offset) stored in the time zone database, and then forwards it to the corresponding second device.
[0083] In addition, when the cloud platform sends data to the second device, if the second device has enabled daylight saving time and the second time information falls within the daylight saving time period (i.e., the second time period), the second time information needs to be corrected according to daylight saving time. For example, if the second device has enabled daylight saving time and the second time period is from 2:00 on March 1 to 2:00 on November 1, if the timestamp corresponding to the second time information is 11:00:00 on May 1, 2025, then since the second time information has fallen into the second time period, the second time information needs to be corrected according to daylight saving time, and the corrected time information is -12:00:00 on May 1, 2025. Then, the cloud platform can generate a third request based on the corrected time information.
[0084] It should be noted that in the above scenario, the timestamp corresponding to the second time information is equivalent to the local time of the second device. However, in some scenarios, the local time of the second device may not be the same as the second time information. In this case, it is also necessary to obtain the local time of the second device and use the local time of the second device as the basis for determining whether to perform daylight saving time correction on the second time information.
[0085] Step S205: Send the third request to the second device.
[0086] In this embodiment, through the above steps S201 to S205, the relevant data of the first device or the second device in different time zones can be correctly stored on the same cloud platform; at the same time, the user can manage the data of the second device in a different time zone by switching their own time zone configuration. In this way, the cloud platform can access the first device and the second device in different time zones, and users in different time zones can view and operate the second device in different time zones by switching their own time zone configuration, thereby enabling users in different time zones to manage the data of the second device in different time zones, which can improve the accuracy and efficiency of data management.
[0087] In one embodiment, after sending the third request to the second device, the method further includes the following steps:
[0088] Step 1: Receive a first response from the second device, where the first response includes third time information.
[0089] Step 2: Obtain a second time zone configuration corresponding to the second device from a time zone database.
[0090] Step 3: Based on the second time zone configuration and the platform time zone, convert the third time information in the first response into the second platform time information to obtain a second response.
[0091] Step 4: parse the second response to determine the first device to which the second response points.
[0092] Step 5: Based on the first time zone configuration and the platform time zone, convert the second platform time information in the second response into fourth time information to obtain a third response.
[0093] Step 6: Send the third response to the first device.
[0094] In this embodiment, the cloud platform's access layer can uniformly perform time conversion on the uplink data (i.e., the first response) reported by the second device to the cloud platform. The cloud platform's access layer uses the stored second time zone configuration to convert the third time information in the first response into the second platform time information for storage.
[0095] Through the above processing, the cloud platform can realize the time conversion of relevant data of the first device and the second device in different time zones, that is, the relevant data of the first device or the second device in different time zones can be correctly stored in the cloud platform, and users accessing the cloud platform can manage the data of the second device in different time zones by switching their own time zone configuration.
[0096] In one embodiment, in addition to initiating a request to the second device connected to the cloud platform, the first device may also directly send a request to the cloud platform (for example, requesting data interaction, etc.). Specifically, the method further includes the following steps:
[0097] Step 1: Receive a fourth request from a first device, where the fourth request includes first time information and a first time zone configuration.
[0098] Step 2: Based on the first time zone configuration and the platform time zone, convert the fifth time information in the fourth request into the third platform time information to obtain the fifth request.
[0099] Step 3: parse the fifth request and generate a fourth response corresponding to the fifth request.
[0100] Step 4: Based on the first time zone configuration and the platform time zone, convert the third platform time information in the fourth response into fifth time information to obtain a fifth response.
[0101] Step 5: Send a fifth response to the first device.
[0102] In this embodiment, the steps of receiving requests and time conversion can be completed by the view layer of the cloud platform, the steps of request parsing and response generation can be completed by the business layer of the cloud platform, and then the steps of time conversion and response sending can be completed by the view layer of the cloud platform.
[0103] As an example, the cloud platform can receive data from the second device, convert the time information involved in the data of the second device into platform time information, and then store it in the storage server of the cloud platform. The user can send a fourth request directly to the cloud platform through the first device, and the fourth request is used to request the data of the second device. The cloud platform converts the fifth time information in the fifth request into the third platform time information to obtain the fifth request; then, the cloud platform parses the fifth request and generates a fourth response. For example, the cloud platform can search the storage server for the data uploaded by the second device corresponding to the third platform time information (i.e., the fourth response), and then convert the third platform time information in the fourth response into the fifth time information to obtain the fifth response, and finally, send the fifth response to the first device.
[0104] In this way, the first device not only interacts with the second device connected to the cloud platform, but can also interact with the cloud platform directly, thereby enabling users in different time zones to manage the data of the second device in different time zones, and enabling users in different time zones to manage the data of the cloud platform.
[0105] Figure 4 is a flow chart of a data management method according to another embodiment of the present application. Figure 4 As shown, the method includes:
[0106] Step S401: The first device sends a first request to the cloud platform.
[0107] In step S402 , the cloud platform converts the first time information in the first request into first platform time information to obtain a second request.
[0108] In step S403 , the cloud platform analyzes the second request and determines the second device to which the second request points.
[0109] In step S404, the cloud platform converts the first platform time information in the second request into second time information to obtain a third request.
[0110] Step S405: The cloud platform sends a third request to the second device.
[0111] Step S406: The second device sends a first response to the cloud platform.
[0112] In step S407, the cloud platform converts the third time information in the first response into second platform time information to obtain a second response.
[0113] In step S408 , the cloud platform parses the second response and determines the first device to which the second response points.
[0114] In step S409, the cloud platform converts the second platform time information in the second response into fourth time information to obtain a third response.
[0115] Step S410: The cloud platform sends a third response to the first device.
[0116] Through the above steps S401 to S410, the cloud platform can receive the first request from the first device and, based on the first time zone configuration contained in the first request and the platform time zone of the cloud platform, convert the first time information contained in the first request into the first platform time information to obtain the second request; then, the cloud platform can parse the second request, determine the second device to which the second request points, and obtain the second time zone configuration of the second device from the time zone database of the cloud platform; the cloud platform can convert the first platform time information into the second time information based on the second time zone configuration and the platform time zone to obtain the third request; finally, the cloud platform sends the third request to the second device. The cloud platform uses a fixed platform time zone, which can distinguish the time zone of the first device and the time zone of the second device, and uniformly convert the time information involved in the interaction data of each device. This allows users in different time zones to use the same cloud platform to manage devices in different time zones, thereby improving the data management efficiency of users in different time zones. Through this application, the problem that the related art cannot meet the data management needs of users in different time zones is solved, the data management needs of users in different time zones are met, and the technical effect of improving the efficiency of data management is achieved.
[0117] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0118] Corresponding to the data management method described in the above embodiment, Figure 5 The following is a schematic diagram of the structure of a data management device according to an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0119] See Figure 5, the data management device 5 is applied to the cloud platform, and the data management device 5 includes: a receiving module 50, used to receive a first request from a first device, wherein the first request includes first time information and a first time zone configuration; a first conversion module 51, used to convert the first time information in the first request into first platform time information based on the first time zone configuration and the platform time zone of the cloud platform, to obtain a second request; a parsing module 52, used to parse the second request, determine the second device pointed to by the second request, and obtain the second time zone configuration corresponding to the second device from the time zone database; a second conversion module 53, used to convert the first platform time information in the second request into second time information based on the second time zone configuration and the platform time zone, to obtain a third request; a sending module 54, used to send the third request to the second device.
[0120] In one embodiment, the first time zone configuration includes the first time zone of the first device and the first daylight saving time configuration of the first device, wherein the first daylight saving time configuration includes the activation status of the first device for daylight saving time and the first time period when the first device enters daylight saving time; the first conversion module 51 is also used to correct the first time zone according to daylight saving time to obtain a third time zone when the first device has daylight saving time enabled and the first time information falls within the first time period; based on the third time zone and the platform time zone, convert the first time information into first platform time information to obtain a second request; when the first device has not daylight saving time enabled, or the first device has daylight saving time enabled but the first time information does not fall within the first time period, based on the first time zone and the platform time zone, convert the first time information into first platform time information to obtain a second request.
[0121] In one embodiment, the second time zone configuration includes the second time zone of the second device and the second daylight saving time configuration of the second device, wherein the second daylight saving time configuration includes the activation status of the second device for daylight saving time and the second time period when the second device enters daylight saving time; the second conversion module 53 is also used to convert the first platform time information into the second time information based on the second time zone configuration and the platform time zone; when the second device has daylight saving time enabled and the second time information falls into the second time period, the second time information is corrected according to daylight saving time to obtain corrected time information; and based on the corrected time information, a third request is generated; when the second device has not enabled daylight saving time, or when the second device has enabled daylight saving time but the second time information does not fall into the second time period, a third request is generated based on the second time information.
[0122] In one embodiment, the receiving module 50 is also used to receive a first response from the second device, wherein the first response includes third time information; the parsing module 52 is also used to obtain a second time zone configuration corresponding to the second device from the time zone database; the first conversion module 51 is also used to convert the third time information in the first response into second platform time information based on the second time zone configuration and the platform time zone, to obtain a second response; the parsing module 52 parses the second response to determine the first device to which the second response points; the second conversion module 53 is also used to convert the second platform time information in the second response into fourth time information based on the first time zone configuration and the platform time zone, to obtain a third response; the sending module 54 is also used to send the third response to the first device.
[0123] In one embodiment, the receiving module 50 is also used to obtain the time zone configuration of the region where the first device is located after the first device is connected to the cloud platform, and use the time zone configuration of the region where the first device is located as the first time zone configuration; or to obtain the first time zone configuration reported by the first device after the first device is connected to the cloud platform.
[0124] In one embodiment, the receiving module 50 is further configured to receive the second time zone configuration reported by the second device after the second device is connected to the cloud platform, and store the second time zone configuration in the time zone database.
[0125] In one embodiment, the receiving module 50 is also used to receive a fourth request from the first device, wherein the fourth request includes first time information and a first time zone configuration; the first conversion module 51 is also used to convert the fifth time information in the fourth request into third platform time information based on the first time zone configuration and the platform time zone, to obtain a fifth request; the parsing module 52 is also used to parse the fifth request and generate a fourth response corresponding to the fifth request; the first conversion module 51 is also used to convert the third platform time information in the fourth response into fifth time information based on the first time zone configuration and the platform time zone, to obtain a fifth response; the sending module 54 is also used to send the fifth response to the first device.
[0126] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0127] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0128] Figure 6 FIG. 1 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application. Figure 6 As shown, the terminal device 6 includes: at least one processor 60 ( Figure 6 Only one is shown in the figure) a processor, a memory 61, and a computer program 62 stored in the memory 61 and executable on at least one processor 60. When the processor 60 executes the computer program 62, the steps of any of the above-mentioned data management method embodiments are implemented.
[0129] The terminal device 6 can be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 6 can include but is not limited to a processor 60 and a memory 61. It is understood by those skilled in the art that Figure 6 It is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0130] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0131] In some embodiments, the memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. In other embodiments, the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the terminal device 6. In other embodiments, the memory 61 may include both an internal storage unit of the terminal device 6 and an external storage device. The memory 61 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program 62. The memory 61 may also be used to temporarily store data that has been output or is about to be output.
[0132] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the steps in the above-mentioned various data management method embodiments.
[0133] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various data management method embodiments when executing the computer program product.
[0134] The present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to a data management device or terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
[0135] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0136] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0137] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0138] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0139] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A data management method, characterized in that: Applied to a cloud platform, the method includes: receiving a first request from a first device, wherein the first request includes first time information and a first time zone configuration; Based on the first time zone configuration and the platform time zone of the cloud platform, convert the first time information in the first request into first platform time information to obtain a second request; Parsing the second request, determining the second device to which the second request points, and obtaining a second time zone configuration corresponding to the second device from a time zone database; converting the first platform time information in the second request into second time information based on the second time zone configuration and the platform time zone to obtain a third request; The third request is sent to the second device.
2. The method according to claim 1, characterized in that The first time zone configuration includes a first time zone of the first device and a first daylight saving time configuration of the first device, wherein the first daylight saving time configuration includes activation of daylight saving time by the first device and a first period during which the first device enters daylight saving time; based on the first time zone configuration and the platform time zone of the cloud platform, converting the first time information in the first request into first platform time information to obtain the second request includes: If daylight saving time is enabled on the first device and the first time information falls within the first time period, correct the first time zone according to daylight saving time to obtain a third time zone; and convert the first time information into the first platform time information based on the third time zone and the platform time zone to obtain the second request; When daylight saving time is not enabled for the first device, or when daylight saving time is enabled for the first device but the first time information does not fall within the first time period, the first time information is converted into the first platform time information based on the first time zone and the platform time zone to obtain the second request.
3. The method according to claim 1, characterized in that The second time zone configuration includes a second time zone of the second device and a second daylight saving time configuration of the second device, wherein the second daylight saving time configuration includes activation of daylight saving time by the second device and a second time period during which the second device enters daylight saving time. Based on the second time zone configuration and the platform time zone, converting the first platform time information in the second request into second time information to obtain the third request includes: converting the first platform time information into the second time information based on the second time zone configuration and the platform time zone; If daylight saving time is enabled on the second device and the second time information falls within the second time period, correct the second time information according to daylight saving time to obtain corrected time information; and generate the third request based on the corrected time information; In a case where the second device does not enable daylight saving time, or the second device has enabled daylight saving time but the second time information does not fall within the second time period, the third request is generated based on the second time information.
4. The method according to any one of claims 1 to 3, characterized in that After sending the third request to the second device, the method further includes: receiving a first response from the second device, wherein the first response includes third time information; Acquire the second time zone configuration corresponding to the second device from the time zone database; Converting the third time information in the first response to second platform time information based on the second time zone configuration and the platform time zone to obtain a second response; parsing the second response to determine the first device to which the second response points; converting the second platform time information in the second response into fourth time information based on the first time zone configuration and the platform time zone to obtain a third response; The third response is sent to the first device.
5. The method according to any one of claims 1 to 3, characterized in that Before receiving the first request from the first device, the method further includes: After the first device is connected to the cloud platform, obtaining the time zone configuration of the region where the first device is located, and using the time zone configuration of the region where the first device is located as the first time zone configuration; or After the first device is connected to the cloud platform, the first time zone configuration reported by the first device is obtained, and the second time zone configuration is stored in the time zone database.
6. The method according to any one of claims 1 to 3, characterized in that Before receiving the first request from the first device, the method further includes: After the second device is connected to the cloud platform, the second time zone configuration reported by the second device is received, and the second time zone configuration is stored in the time zone database.
7. The method according to any one of claims 1 to 3, characterized in that The method further comprises: receiving a fourth request from the first device, wherein the fourth request includes the first time information and the first time zone configuration; converting the fifth time information in the fourth request into the third platform time information based on the first time zone configuration and the platform time zone to obtain a fifth request; Parsing the fifth request to generate a fourth response corresponding to the fifth request; converting the third platform time information in the fourth response into the fifth time information based on the first time zone configuration and the platform time zone to obtain a fifth response; The fifth response is sent to the first device.
8. A data management device, characterized in that: Applied to a cloud platform, the device includes: A receiving module, configured to receive a first request from a first device, wherein the first request includes first time information and a first time zone configuration; a first conversion module, configured to convert the first time information in the first request into first platform time information based on the first time zone configuration and the platform time zone of the cloud platform, to obtain a second request; a parsing module, configured to parse the second request, determine the second device to which the second request points, and obtain a second time zone configuration corresponding to the second device from a time zone database; a second conversion module, configured to convert the first platform time information in the second request into second time information based on the second time zone configuration and the platform time zone, to obtain a third request; A sending module is configured to send the third request to the second device.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the data management method according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which enables the data management method according to any one of claims 1 to 7 to be executed when the computer program is executed.