Data processing method and device, Internet of Things platform and storage medium
By filtering and accumulating user data based on the survival time of time series data in the Internet of Things platform, the inaccurate capacity measurement problem caused by relying on data cleaning tasks in the existing technology is solved, and more efficient and accurate capacity management is achieved.
Patent Information
- Application Number
- CN202310915217.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-02-07
AI Technical Summary
When calculating user usage capacity, existing IoT platforms rely on data cleaning tasks in timing databases, resulting in inaccurate measurement results.
By filtering and accumulating the user's timing data based on the survival time of timing data, the user's usage capacity is directly calculated to avoid relying on data cleaning tasks.
It improves the accuracy and effectiveness of capacity measurement, controls user usage more accurately, and reduces the delay in capacity calculation.
Smart Images

Figure CN119396894A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things, and more specifically, to a data processing method, device, Internet of Things platform and storage medium. Background Art
[0002] The IoT platform stores the time series data reported by IoT devices. Each user who uses the IoT platform needs to purchase a certain capacity of time series database storage space in the IoT platform in advance to store the time series data reported by the user's IoT devices. To this end, the IoT platform needs to measure the user's usage capacity to ensure that the user's usage capacity does not exceed the purchased capacity.
[0003] At present, the calculation of user usage capacity depends on the data cleaning task of the time series database. Since the data cleaning task is complex and is performed in a certain period, it is relatively delayed, resulting in inaccurate measurement results of usage capacity. Summary of the invention
[0004] The present application provides a data processing method, an apparatus, an Internet of Things platform, and a storage medium to improve the accuracy of capacity metering results in the Internet of Things platform.
[0005] In a first aspect, the present application provides a data processing method, comprising:
[0006] Receiving first initial data reported by a first Internet of Things device;
[0007] Filtering the first initial data based on a preset first survival time to obtain filtered first target data;
[0008] The size of the first target data and the size of the first stored data are accumulated to obtain a first usage capacity, where the first stored data is data stored in the time series database and does not exceed the first survival time, and the IoT device that reports the first stored data and the first IoT device both belong to the first user;
[0009] If the first usage capacity does not exceed a first capacity threshold corresponding to the first user, the first target data is stored in the time series database.
[0010] In a feasible implementation, the filtering of the first initial data based on the preset first survival time to obtain the filtered first target data includes:
[0011] If the difference between the current moment and the timestamp of the first data in the first initial data is less than the first survival time, the first data is determined as the first target data.
[0012] In a feasible implementation manner, storing the first target data in the time series database includes:
[0013] The first target data is stored in the metric corresponding to the first user in the time series database.
[0014] In a feasible implementation, the method further includes:
[0015] receiving a data query request, wherein the data query request includes a query time period;
[0016] If there is a target time period within the query time period that does not exceed the first survival time, the data query request is forwarded to the time series database to obtain a query result corresponding to the target time period from the time series database.
[0017] In a feasible implementation, the method further includes:
[0018] If the first usage capacity exceeds the first capacity threshold, the print data is written into a failure log.
[0019] In a feasible implementation, the method further includes:
[0020] If the first used capacity does not exceed a first capacity threshold corresponding to the first user, the first used capacity is sent to a first client of the first user, so that the first used capacity is displayed on a user interface of the first client.
[0021] In a feasible implementation, the method further includes:
[0022] The first capacity threshold sent by the first client is received, where the first capacity threshold is input through a user interface of the first client.
[0023] In a second aspect, the present application provides a data processing device, including:
[0024] A receiving module, used for receiving first initial data reported by a first IoT device;
[0025] A screening module, used for screening the first initial data based on a preset first survival time to obtain screened first target data;
[0026] an accumulation module, configured to accumulate the size of the first target data and the size of the first stored data to obtain a first usage capacity, wherein the first stored data is data stored in the time series database and does not exceed the first survival time, and the Internet of Things device that reports the first stored data and the first Internet of Things device both belong to the first user;
[0027] A storage module is used to store the first target data in the time series database if the first usage capacity does not exceed a first capacity threshold corresponding to the first user.
[0028] In a third aspect, the present application provides an Internet of Things platform, including: a memory and a processor;
[0029] The memory is used to store computer programs;
[0030] The processor is used to execute a computer program stored in the memory, and when the computer program is run, the processor is enabled to execute the method according to the first aspect.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the method described in the first aspect.
[0032] In the data processing method, device, Internet of Things platform and storage medium provided in the present application, the user's stored and to-be-stored time series data are screened and accumulated based on the survival time difference of the time series data. The capacity calculation is not dependent on the data cleaning task of the time series database. The capacity occupied by the data in the user's time series data that exceeds the survival time difference is no longer calculated in the capacity used by the user. The user's used capacity can be accurately measured, the effectiveness of capacity measurement is improved, and the user's usage can be controlled more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] Figure 1 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0035] Figure 2 This is a schematic diagram of the configuration of an Internet of Things platform provided in an embodiment of the present application;
[0036] Figure 3 This is a metering schematic diagram of an Internet of Things platform provided in an embodiment of the present application;
[0037] Figure 4 This is a schematic diagram of a data storage mode of an Internet of Things platform provided in an embodiment of the present application;
[0038] Figure 5 This is a schematic diagram of a data processing process of an Internet of Things platform provided in an embodiment of the present application;
[0039] Figure 6 This is a schematic diagram of a data query process of an Internet of Things platform provided by an embodiment of the present application;
[0040] Figure 7 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0041] Figure 8 It is a schematic block diagram of the Internet of Things platform provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] First, the terms involved in the embodiments of the present application are introduced.
[0044] Time series data: Time series data, time series data is a data column recorded in chronological order for the same indicator.
[0045] Time series database: a database used to store, query, and analyze time series data.
[0046] Time To Live (TTL): The survival time of time series data. Time series data that exceeds TTL can be deleted through data cleaning tasks.
[0047] In the current IoT platform, the calculation of the user's time series database usage capacity depends on the data cleaning task of the time series database. Since the data cleaning task is complex and is performed according to a certain period, it is relatively delayed, resulting in inaccurate measurement of the usage capacity. For example, the data cleaning task is executed once every 7 days, and the user's time series data TTL is 30 days, that is, the data on the first day exceeds the TTL after 30 days and should be cleaned up. However, since the data cleaning task is executed according to a fixed period, assuming that when the data on the first day exceeds the TTL, the data cleaning task has just been completed, then the data on the first day can only be cleaned up when the data cleaning task is executed next time, that is, the time series data on the first day will be cleaned up after 37 days. These time series data that exceed TTL but have not been cleaned up continue to occupy the storage space of the time series database. When measuring the user's usage capacity, the capacity occupied by these time series data that exceed TTL but have not been cleaned up will also be calculated. However, in fact, for users, these time series data that exceed TTL should be cleaned up by the IoT platform, and should not be calculated in the user's used capacity. In other words, this measurement method that relies on data cleaning tasks is inaccurate. In addition, since the time series database stores time series data that exceeds TTL, this data is searchable before being cleaned, which will lead to inaccurate data query results.
[0048] In addition, the current IoT platform has the following problems: When measuring IoT devices in the IoT platform, the IoT platform usually provides measurement from the perspective of connection and message. Users can set the following dimensions on the client: number of online devices, message reporting / downloading transaction per second (Transaction Per Second, TPS), rule engine message forwarding TPS. For the storage capacity of the time series data of IoT devices, there is usually no setting or measurement function provided on the client. The storage mode of time series data is to use the rule engine to store the time series data of different users in the user's respective time series database, and the utilization rate of the time series database is low.
[0049] In view of this, a data processing method for an Internet of Things platform is proposed in an embodiment of the present application. The user's time series data is screened and accumulated based on the TTL of the time series data. The capacity calculation is no longer dependent on the data cleaning task of the time series database. The capacity occupied by the data in the user's time series data that exceeds the TTL and needs to be cleaned is no longer calculated in the user's used capacity. The user's used capacity can be accurately measured in real time, the effectiveness of capacity metering can be improved, and user usage can be controlled more accurately.
[0050] Figure 1 1 is a flow chart of a data processing method provided in an embodiment of the present application. The method is applied to an Internet of Things platform, which may also be referred to as an Internet of Things server. Figure 1 As shown, the method includes:
[0051] S101. Receive first initial data reported by a first IoT device.
[0052] The first initial data is the time series data reported by the first IoT device. The first initial data may include one or more pieces of data, each piece of data carries a timestamp. For example, the timestamp of a piece of data may be the time when the first IoT device generates the data or the time when the data is acquired.
[0053] S102: Filter the first initial data based on a preset first survival time to obtain filtered first target data.
[0054] In the embodiment of the present application, the survival time of the time series data on the IoT platform is pre-set by the user, and each user can set the survival time of the time series data of the IoT device corresponding to the user. The first survival time is the survival time set by the first user for the time series data of his IoT device. The first user is the user to which the first IoT device belongs. In addition to the first IoT device, the processing process of the time series data reported to the IoT platform by other IoT devices belonging to the first user is similar to the embodiment of the present application.
[0055] The first initial data is screened based on the first survival time, and data that has not exceeded the TTL is retained, thereby obtaining the first target data. Optionally, in the application, the current moment can be compared with the timestamp of each data in the first initial data, and if the difference between the current moment and the timestamp of the first data in the first initial data is less than the first survival time, the first data is determined as the first target data.
[0056] For example, the first survival time is 30 days, which means that 30 days after the timestamp of a piece of data, the data exceeds the TTL. Data exceeding the TTL can be regarded as invalid data. Assuming that the timestamp of a piece of data in the first initial data is before 30 days, that is, the difference between the current moment and the timestamp of the data is greater than 30 days, the IoT platform determines that the survival time of the data exceeds 30 days and discards the data; assuming that the timestamp of another piece of data in the first initial data is within 30 days, that is, the difference between the current moment and the timestamp of the other data is less than 30 days, the IoT platform determines that the other data does not exceed the survival time of 30 days and determines the other data as the first target data. After screening each piece of data in the first initial data one by one, all the first target data are obtained.
[0057] S103. Add the size of the first target data and the size of the first stored data to obtain a first usage capacity, where the first stored data is data stored in the time series database that has not exceeded the first survival time, and the IoT device that reports the first stored data and the first IoT device both belong to the first user.
[0058] S104: If the first usage capacity does not exceed the first capacity threshold corresponding to the first user, the first target data is stored in a time series database.
[0059] After the Internet of Things platform screens out the first target data, if it wants to store the first target data in the time series database, it is also necessary to ensure that after the first target data is stored, the capacity of the time series database used by the first user will not exceed the first capacity threshold available to the first user. The first capacity threshold can be the capacity that the first user has purchased in advance on the Internet of Things platform. Therefore, the Internet of Things platform needs to accumulate the size of the first target data with the size of the first stored data of the first user. The first stored data is the data in the time series data of each Internet of Things device belonging to the first user that has been stored in the time series data and has not exceeded the first survival time at the current moment. If the accumulated first usage capacity does not exceed the first capacity threshold corresponding to the first user, the first target data will be stored in the time series database. If the first usage capacity exceeds the first capacity threshold, the print data write failure log will be written to indicate that the available capacity has been exceeded, thereby achieving accurate calculation and control of the user's usage capacity.
[0060] In the method of the embodiment of the present application, the user's stored and to-be-stored time series data is screened and accumulated based on the TTL of the time series data. The capacity calculation is not dependent on the data cleaning task of the time series database. The capacity occupied by the data in the user's time series data that exceeds the TTL is no longer calculated in the capacity used by the user. The user's used capacity can be accurately measured, the effectiveness of capacity measurement is improved, and user usage can be controlled more accurately.
[0061] On the basis of the above embodiments, in the embodiments of the present application, in order to improve the utilization rate of the time series database, the time series data of different users are stored in the same time series database, and the time series data of different users are stored in different metrics. For example, the first target data is stored in the metric corresponding to the first user in the time series database.
[0062] As for the time series data of other users, taking the second IoT device of the second user as an example, the IoT platform receives the second initial data reported by the second IoT device; filters the second initial data based on the pre-set second survival time to obtain the filtered second target data; adds the size of the second target data and the size of the second stored data to obtain the second usage capacity, the second stored data is the data stored in the time series database that has not exceeded the second survival time, and the IoT device that reports the second stored data and the second IoT device both belong to the second user; if the second usage capacity does not exceed the second capacity threshold corresponding to the second user, the second target data is stored in the metric corresponding to the second user in the time series database.
[0063] By storing the time series data of the first user and the second user in different metrics in the same time series database, the isolation between the data is ensured and the utilization rate of the time series database is improved, thus avoiding the problem of low utilization rate of the time series database when each user uses a time series database and avoiding waste of database resources.
[0064] After the time series data is stored in the IoT platform, users can also query the data through the IoT platform. The IoT platform receives the data query request, which includes the query time period. If there is a target time period in the query time period that does not exceed the first survival time, the data query request is forwarded to the time series database to obtain the query result corresponding to the target time period from the time series database.
[0065] Among them, the existence of a target time period that does not exceed the first survival time in the query time period may include: the query time period is all the target time period, or part of the time period in the query time period is the target time period. Still taking the first survival time of 30 days as an example, if the query time period is the 4 days from 3 days to 6 days before the current moment, then all the 4 days in the query time period are the target time period. If the query time period is the 4 days from 32 days to 29 days before the current moment, then in the query time period, the 32 days and 31 days before the current moment have exceeded the first survival time, and the 30 days and 29 days before the current moment have not exceeded the first survival time. The two days that have not exceeded the first survival time are the target time period. If the query time period is the 4 days from 35 days to 32 days before the current moment, then all the 4 days in the query time period exceed the first survival time, that is, there is no target time period. In the case of a target time period, the Internet of Things platform forwards the data query request to the time series database to query the query result corresponding to the target time period from the time series database.
[0066] The query requests are filtered by the survival time of the time series data. At the same time, when querying in the time series database, only the query results of the target time period that meets the data survival time are returned. This avoids returning data in the time series database that exceeds the survival time but has not been cleaned up when querying data, ensuring the accuracy of the query results.
[0067] In the embodiment of the present application, in addition to calculating the user's usage capacity, the Internet of Things platform can also provide capacity setting and metering functions to the client.
[0068] The Internet of Things platform receives a first capacity threshold sent by the first client, so that in subsequent capacity calculations, the first capacity threshold is used as the maximum capacity available to the first user, and the first capacity threshold is input through the user interface of the first client.
[0069] After the physical network platform calculates the first usage capacity, if the first usage capacity does not exceed the first capacity threshold corresponding to the first user, in addition to storing the first target data, the first usage capacity can also be sent to the first client of the first user to display the first usage capacity on the user interface of the first client, thereby intuitively displaying the metering to the user.
[0070] The following is an explanation with examples.
[0071] like Figure 2 As shown in , the IoT platform supports the unified exposure of hot data storage specifications and traditional IoT specifications when the client sets the instance specifications, including the number of simultaneously online devices, message uplink and downlink TPS, rule engine TPS, hot data storage IOPS and hot data storage space, where the hot data storage space is the maximum storage space available for the instance. In addition, the client also provides Figure 3 The metering function shown displays the number of read and write operations per second (Input / Output Operations Per Second, IOPS) of the real-time hot data storage and the real-time hot data storage space, that is, the first used capacity.
[0072] When IoT devices report time series data, such as Figure 4 As shown in FIG. 1 , the time series data of IoT device 1 and IoT device 2 belonging to different users are stored in the same time series database. The processing process after the time series data of each IoT device is reported is as follows: Figure 5As shown, the metering task data submission module in the Internet of Things platform submits the timestamp and size of the time series data reported this time to the capacity metering task module. The capacity metering task module screens the time series data reported this time based on the TTL of the user device, discards the data that exceeds the TTL, and accumulates the size of the data that does not exceed the TTL and the data that does not exceed the TTL stored in the time series database to obtain the user capacity. The user capacity verification module compares the user capacity with the purchased capacity. If it exceeds the purchased capacity, a failure log is printed. If it does not exceed the purchased capacity, the data reported this time that does not exceed the TTL is written into the time series database through the time series data submission module.
[0073] When querying data, Figure 6 As shown, the user calls the Application Programming Interface (API) of the IoT platform to pass in business information and query time periods, which include the start time (StartTime) and the end time (EndTime). Based on the query time period passed in by the user, the IoT platform verifies whether there is a target time period that meets the TTL set by the user. If so, the query request is forwarded to the time series database. If not, it is intercepted and returned.
[0074] The embodiments of the present application are summarized to provide various instance specification settings. In the Internet of Things platform, connections, messages, and storage can be completely set. In terms of metering, specification metering of all instance dimensions is performed to facilitate users to perform analysis and alarm rule settings. By storing the data of IoT devices of different users in the same time series database, the storage utilization rate of the time series database is greatly improved. The capacity metering solution based on survival time no longer relies on the data cleaning tasks of the time series database, and can measure the user's capacity usage in quasi-real time, improve the effectiveness of capacity metering, and more accurately control user usage. In addition, based on the survival time, the user's query request can be analyzed or intercepted in real time to prevent the user from querying invalid data and improve the accuracy of data query.
[0075] Figure 7 Schematic diagram of a data processing device provided in an embodiment of the present application. Figure 7 As shown, the data processing device 700 includes:
[0076] The receiving module 701 is used to receive the first initial data reported by the first IoT device;
[0077] A screening module 702, configured to screen the first initial data based on a preset first survival time to obtain screened first target data;
[0078] An accumulation module 703 is used to accumulate the size of the first target data and the size of the first stored data to obtain a first usage capacity, where the first stored data is data stored in the time series database and does not exceed the first survival time, and the IoT device that reports the first stored data and the first IoT device both belong to the first user;
[0079] The storage module 704 is configured to store the first target data in a time series database if the first usage capacity does not exceed a first capacity threshold corresponding to the first user.
[0080] In a feasible implementation, the screening module 702 is used to:
[0081] If the difference between the current moment and the timestamp of the first data in the first initial data is less than the first survival time, the first data is determined as the first target data.
[0082] In a feasible implementation, the storage module 704 is used to:
[0083] The first target data is stored in a metric corresponding to the first user in a time series database.
[0084] In a feasible implementation, the receiving module 701 is further configured to:
[0085] receiving a data query request, wherein the data query request includes a query time period;
[0086] The forwarding module is used to forward the data query request to the time series database if there is a target time period that does not exceed the first survival time in the query time period, so as to obtain the query result corresponding to the target time period from the time series database.
[0087] In a feasible implementation, the storage module 704 is further configured to:
[0088] If the first used capacity exceeds the first capacity threshold, the print data is written into the failure log.
[0089] In a feasible implementation, the present invention further includes:
[0090] The sending module is used to send the first used capacity to the first client of the first user if the first used capacity does not exceed the first capacity threshold corresponding to the first user, so as to display the first used capacity on the user interface of the first client.
[0091] In a feasible implementation, the receiving module 701 is further configured to:
[0092] A first capacity threshold sent by a first client is received, where the first capacity threshold is input through a user interface of the first client.
[0093] The device of the embodiment of the present application can be used to execute the data processing method of the Internet of Things platform in the aforementioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0094] Figure 8 is a schematic block diagram of the Internet of Things platform provided in the embodiment of the present application. Figure 8 As shown, the Internet of Things platform 800 may include at least one processor 801 for implementing the data processing method provided in the embodiment of the present application.
[0095] Optionally, the Internet of Things platform 800 also includes at least one memory 802 for storing program instructions and / or data. The memory 802 is coupled to the processor 801. The coupling in the embodiment of the present application is an indirect coupling or communication connection between devices, units or modules, which can be electrical, mechanical or other forms, for information exchange between devices, units or modules. The processor 801 may operate in conjunction with the memory 802. The processor 801 may execute program instructions stored in the memory 802. At least one of the at least one memory may be included in the processor.
[0096] Optionally, the Internet of Things platform 800 also includes a communication interface 803 for communicating with other devices through a transmission medium, so that the Internet of Things platform 800 can communicate with other devices. The communication interface 803 can be, for example, a transceiver, an interface, a bus, a circuit, or a device capable of implementing a transceiver function. The processor 801 can use the communication interface 803 to send and receive data and / or information, and is used to implement the method provided in the embodiment of the present application. Please refer to the detailed description in the previous embodiment for details, which will not be repeated here.
[0097] The specific connection medium between the processor 801, the memory 802 and the communication interface 803 is not limited in the embodiment of the present application. Figure 8 In the embodiment, the processor 801, the memory 802 and the communication interface 803 are connected via a bus 804. The bus 804 is Figure 8 The connection between other components is only for illustration and is not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0098] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0099] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0100] The present application also provides a computer-readable storage medium, which stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method in any of the above embodiments.
[0101] The terms "unit", "module" and the like used in this specification may be used to represent a computer-related entity, hardware, firmware, a combination of hardware and software, software, or software in execution.
[0102] It will be appreciated by those skilled in the art that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in combination with 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 to be beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed devices, equipment and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the unit is only a logical function division, and there may be other division methods in actual implementation, 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, 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.
[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0105] In the above-described embodiments, the functions of each functional unit can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, the flow or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0106] If this function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0107] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0108] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: include: Receiving first initial data reported by a first Internet of Things device; Filtering the first initial data based on a preset first survival time to obtain filtered first target data; The size of the first target data and the size of the first stored data are accumulated to obtain a first usage capacity, where the first stored data is data stored in the time series database and does not exceed the first survival time, and the IoT device that reports the first stored data and the first IoT device both belong to the first user; If the first usage capacity does not exceed a first capacity threshold corresponding to the first user, the first target data is stored in the time series database.
2. The method according to claim 1, characterized in that The filtering of the first initial data based on the preset first survival time to obtain the filtered first target data includes: If the difference between the current moment and the timestamp of the first data in the first initial data is less than the first survival time, the first data is determined as the first target data.
3. The method according to claim 1, characterized in that The storing the first target data into the time series database includes: The first target data is stored in the metric corresponding to the first user in the time series database.
4. The method according to any one of claims 1 to 3, characterized in that Also includes: receiving a data query request, wherein the data query request includes a query time period; If there is a target time period within the query time period that does not exceed the first survival time, the data query request is forwarded to the time series database to obtain a query result corresponding to the target time period from the time series database.
5. The method according to any one of claims 1 to 3, characterized in that: Also includes: If the first usage capacity exceeds the first capacity threshold, the print data is written into a failure log.
6. The method according to any one of claims 1 to 3, characterized in that Also includes: If the first used capacity does not exceed a first capacity threshold corresponding to the first user, the first used capacity is sent to a first client of the first user, so that the first used capacity is displayed on a user interface of the first client.
7. The method according to claim 6, characterized in that Also includes: The first capacity threshold sent by the first client is received, where the first capacity threshold is input through a user interface of the first client.
8. A data processing device, characterized in that: include: A receiving module, used for receiving first initial data reported by a first IoT device; A screening module, used for screening the first initial data based on a preset first survival time to obtain screened first target data; an accumulation module, configured to accumulate the size of the first target data and the size of the first stored data to obtain a first usage capacity, wherein the first stored data is data stored in the time series database and does not exceed the first survival time, and the Internet of Things device that reports the first stored data and the first Internet of Things device both belong to the first user; A storage module is used to store the first target data in the time series database if the first usage capacity does not exceed a first capacity threshold corresponding to the first user.
9. An Internet of Things platform, characterized in that: include: Memory and processor; The memory is used to store computer programs; The processor is configured to execute a computer program stored in the memory, and when the computer program is executed, the processor is enabled to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the method according to any one of claims 1 to 7.