Data query method, device and equipment based on Internet of Things card and medium
By predicting the customer historical call data of the IoT connection management platform, loading the IoT card data with high activity into the cache in advance, solving the problem of large resource overhead and low query efficiency of the platform under high frequency and high concurrent query requests. Achieve more efficient resource utilization and query speed improvement.
Patent Information
- Application Number
- CN202411514697.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-29
AI Technical Summary
When processing IoT card query requests from a large number of customers, the IoT connection management platform faces high-frequency and high-concurrency interface access pressure, resulting in large resource overhead and low query efficiency.
By predicting the data of the customer's historical call interface, dynamically predict the change trend of the number of interfaces in the number of target customer accounts inquiry of IoT card data, loading high-active IoT card data into the cache in advance, and setting a valid period of one cycle.
It reduces the resource overhead of the IoT connection management platform, improves the efficiency of querying IoT card data, and can meet customers' needs for IoT card query within limited resources.
Smart Images

Figure CN119396882A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a data query method, device, equipment and medium based on an Internet of Things card. Background Art
[0002] The IoT connection management platform is mainly used to monitor, analyze, configure and manage the network connection status of IoT devices. It aims to help users efficiently manage the connection status of massive IoT devices at the network level, ensure the secure transmission of data between devices, and respond to device changes and network conditions in real time. Customers need to query the real-time information of the IoT cards that have been activated through the query interface provided by CMP to complete autonomous monitoring and autonomous management. CMP needs to carry a large number of customers' interface access within limited service resources and provide accurate and real-time query results, which puts enormous pressure on the platform's services. For such scenarios, CMP needs to continuously optimize the efficiency of the query interface to meet customers' needs for IoT card queries within limited resources. For such scenarios, CMP needs to continuously optimize the efficiency of the query interface to meet customers' needs for IoT card queries within limited resources. Summary of the invention
[0003] To solve the above problems, the present invention aims to propose a data query method, device, equipment and medium based on the Internet of Things card. The next cycle is predicted by the data of the customer's historical call interface. After the number of times the query interface is called, the data of the highly active Internet of Things cards with the same number of calls is loaded into the cache in advance, and a validity period of one cycle is set. In this way, the resource overhead of the CMP platform can be reduced to a certain extent, and the query efficiency of the Internet of Things card data can be provided more efficiently.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0005] A data query method based on an Internet of Things card, the method comprising:
[0006] Obtain the activity of IoT cards of customer accounts in a period and perform analysis and calculation to form an ordered list of highly active cards;
[0007] The cubic exponential smoothing prediction algorithm is used to dynamically predict the changing trend of the number of times each target customer account calls the interface for querying IoT card information, and the number of times the interface is accessed is predicted;
[0008] Based on the prediction results, the data of the most active cards managed under the customer account with an equal number of access times are loaded into the cache in advance.
[0009] Furthermore, the IoT card stores data information associated with activity, including the IoT card's voice, text message, and traffic bills, records of changes in the IoT card's life cycle, records of the IoT card's autonomous disconnection and reconnection operations, records of card package changes, records of card function product changes, and card positioning records.
[0010] Furthermore, the data information is weighted, and each time a record appears, the activity of the card increases.
[0011] Furthermore, the activity calculation formula is as follows:
[0012]
[0013] Among them, totalTime is the time difference between the start time of the earliest defined period and the current statistical time point, timeInterval is the time difference between the time of the current behavior record and the current statistical time point, M represents the activity weight of the defined record, i represents the sequence number of each activity record in the defined period, and n represents the total number of records in the latest T defined periods. When (h-1)≥T, the value T is taken, indicating that the activity calculation of records before the defined time period is no longer performed; then the operation activity of the records in the statistical period is calculated and summed;
[0014] From the formula, we can see that the farther the behavior occurs from the current statistical time point, the lower the impact of the operation activity;
[0015]
[0016] i represents the serial number of each activity record within the defined period, n T N will represent the total number of records in the last T periods defined. h Represents the number of records in each period of h, normalized by the sigmoid function. C is an integer constant greater than 1, which is used to represent the influence coefficient of stability on activity. The closer the number of occurrences of a behavior in the statistical period is to the average number of occurrences, the less the change is, and the higher the stability is.
[0017] Card activity = ∑ operation activity * behavior stability
[0018]
[0019] Furthermore, the dynamic prediction of the changing trend of the number of times each target customer account calls the interface for querying the IoT card data according to the cubic exponential smoothing prediction algorithm, and predicting the number of times the interface is accessed means:
[0020] First, the behavior of users querying the data interface is predictable in the time dimension. The triple exponential smoothing algorithm predicts the time series with both trend and seasonality, and predicts x in the next time period T. t+T as follows:
[0021] x t+T =A T +B T T+C T T 2
[0022]
[0023]
[0024]
[0025] The calculation formula for triple exponential smoothing is:
[0026]
[0027] In the exponential smoothing method, all previous observations have an impact on the current smoothed value. However, if there are outliers in the historical data, it will directly affect the accuracy of the prediction; therefore, it is necessary to clean the abnormal data before prediction.
[0028] If the operation abnormality is the largest or smallest within a certain period of time, it will be regarded as abnormal data. The measurement indicators are:
[0029]
[0030] When the above conditions are met, the data is abnormal data;
[0031] Method for outlier correction: After removing outliers, perform cubic spline interpolation on the data of the period and build a cubic spline interpolation model:
[0032] Assume f(x) is a continuous differentiable function on the interval [a, b]. Given a set of base points on the interval [a, b], the number of load data after removing abnormal points is (n+1):
[0033] a=x 0 <x 1 <x 2 <… <x n = b;
[0034] Assume that the function S(x) satisfies the following conditions:
[0035] S(x) is in each subinterval [x i-1 ,x i ] has the expression: S i(x) = a i x 3 +b i x 2 +c i x+d i ;
[0036] S(x) has a second-order continuous derivative on the interval [a,b];
[0037] Solve S for each subinterval according to the following known conditions i (x):
[0038] S(x i )=f(x i )
[0039] S(x i -0) = S(x i +0)
[0040] S′(x i -0) = S′(x i +0)
[0041] S″(x i -0)=S″(x i +0)
[0042] S″(x 0 )=f″(x 0 )=0
[0043] S″(x n )=f″(x n )=0;(i=0,1,…,n)
[0044] S i After (x) is obtained, the corresponding S can be substituted into the corresponding time t of the abnormal value i (x),(x i-1 <t<x i+1 ) to obtain the replacement points for the outliers.
[0045] Furthermore, it also includes the preheating of the card information cache, which specifically means: after removing outliers, predicting the historical data of existing user accounts calling the query interface, dynamically predicting the changes in the number of times each account calls to query card information, and predicting the number of queries n in the next cycle; by default, within a cycle, an account calls the interface for querying card information once, and the customer will not query the information of IoT cards with low activity; after calculating the activity, a list of high-activity cards is selected, and the information of the top n IoT cards in terms of activity is queried, and then added to the cache, and the timeout period is one cycle.
[0046] Furthermore, the preheating of the card data cache includes the following specific steps:
[0047] CMP first sets activity impact weights for the five types of behaviors under the IoT card: SMS, voice, and traffic history, life cycle change history, autonomous network disconnection and reconnection history, package change order history, and functional product change history, and sets the card activity filtering threshold. Then, the number of cycles and cycle time for historical record collection are specified;
[0048] Then, at the end of a CMP cycle, a scheduled task trigger triggers the task of predictively loading the card data cache;
[0049] Use multi-threading and concurrent means to calculate the activity of five types of behaviors, including SMS, voice, and traffic history, life cycle change history, autonomous network disconnection and network restoration history, package change order history, and functional product change history, under the IoT cards managed by key customers using the activity calculation method in this patent. After each thread completes the calculation, merge and filter the calculation results of each card to form a high-activity card list of IoT cards managed by the key customer.
[0050] In another task thread, the interface call records of the key customer's card information query in the past specified period are obtained, and after removing abnormal data, the number of calls by the customer in the next period is predicted using the cubic exponential smoothing algorithm;
[0051] When the predicted call count and activity calculation tasks are completed, the data of the n IoT cards with the highest activity are queried in the corresponding data table of the database through the card access number, and the query results are loaded into the redis cache. The key in redis is the card access number, and the value is the card data structured data. The validity period of this cache is a specified period. The main query results of the IoT card's main product instance, functional product instance, package instance, and ICCID instance information are loaded into redis;
[0052] This completes the cache prediction process of predicting a key customer's card information query in the next cycle.
[0053] In order to achieve the above object, the present invention also provides a data query device based on an Internet of Things card, comprising:
[0054] Activity calculation module: used to obtain the activity of IoT cards of customer accounts in a period and perform analysis and calculation to form an ordered list of highly active cards;
[0055] Prediction module: used to dynamically predict the changing trend of the number of times each target customer account calls the interface for querying IoT card information based on the cubic exponential smoothing prediction algorithm, and predict the number of times the interface is accessed;
[0056] Loading module: used to load the data of the most active cards managed under the customer account with an equal number of access times into the cache in advance according to the prediction results.
[0057] In order to achieve the above-mentioned purpose, the present invention also provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the data query method based on the Internet of Things card as mentioned above is implemented.
[0058] In order to achieve the above-mentioned purpose, the present invention also provides a storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, they can implement the above-mentioned data query method based on the Internet of Things card.
[0059] Beneficial effect: The present invention predicts the next cycle based on the data of the customer's historical interface calls. After predicting the number of times the query interface is called, the information of highly active IoT cards with the same number of calls is loaded into the cache in advance, and a validity period of one cycle is set. This can reduce the resource overhead of the CMP platform to a certain extent and provide more efficient query efficiency for IoT card information. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0061] Figure 1 This is a flow chart of a data query method based on an Internet of Things card according to an embodiment of the present invention;
[0062] Figure 2 A flowchart of specific steps for preheating the card data cache of the data query method based on the Internet of Things card according to an embodiment of the present invention;
[0063] Figure 3 A schematic diagram of a customer querying Internet of Things card information by the Internet of Things card-based information query method according to an embodiment of the present invention;
[0064] Figure 4 It is a schematic diagram of the structure of the data query device based on the Internet of Things card according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0066] Glossary
[0067] CMP: Connection Management Platform
[0068] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0069] At present, some IoT connection management platforms have the following problems: Since customers have a large number of queries on IoT card data carried by CMP puzzles, CMP needs to carry a large number of high-frequency and high-concurrency requests for card data queries. Since the underlying database resources of CMP and the back-end service resources provided by the business are limited, the success rate and execution efficiency of such high-frequency and high-concurrency interface requests for querying IoT card data need to be improved, and resources must not be occupied in large quantities. Therefore, it is necessary to load IoT card data into the cache in advance to deal with interface query access. However, the cache is also a resource, and it is not possible to load all IoT card data. Therefore, it is necessary to predict customer query behavior and then cache and load IoT card data with high activity, thereby increasing query speed and reducing resource consumption.
[0070] Example 1
[0071] Based on the above defects of the existing technology and design ideas, see Figure 1 :A data query method based on an Internet of Things card in this embodiment includes:
[0072] Obtain the activity of IoT cards of customer accounts in a period and perform analysis and calculation to form an ordered list of highly active cards;
[0073] The cubic exponential smoothing prediction algorithm is used to dynamically predict the changing trend of the number of times each target customer account calls the interface for querying IoT card information, and the number of times the interface is accessed is predicted;
[0074] Based on the prediction results, the data of the most active cards managed under the customer account with an equal number of access times are loaded into the cache in advance.
[0075] This embodiment predicts the next cycle through the data of the customer's historical interface calls. After predicting the number of times the query interface is called, the information of highly active IoT cards with the same number of calls is loaded into the cache in advance, and a validity period of one cycle is set. This can reduce the resource overhead of the CMP platform to a certain extent and provide more efficient query efficiency for IoT card information.
[0076] In a specific example, the IoT card stores data information associated with activity, including the IoT card's voice, text message, and traffic bills, records of changes in the IoT card's life cycle, records of the IoT card's autonomous disconnection and reconnection operations, records of card package changes, records of card function product changes, and card positioning records.
[0077] In a specific example, the profile information is weighted, and each time a record appears, the activity of the card increases.
[0078] It should be noted that the activity of a card is calculated based on the activity-related records defined within a certain number of periods. The activity of a card is affected by two factors: one is the weight of the operation at that time, and the other is the stability of the behavior of the card during this period. The longer the time of the operation is from the current statistical time point, the lower the impact on the activity. Records older than a certain number of periods have no effect on the activity calculation of the card, so they are not included in the calculation. The more stable the behavior within the statistical period, the better the activity.
[0079] In a specific example, the activity calculation formula is as follows:
[0080]
[0081] Among them, totalTime is the time difference between the start time of the earliest defined period and the current statistical time point, timeInterval is the time difference between the time of the current behavior record and the current statistical time point, M represents the activity weight of the defined record, i represents the sequence number of each activity record in the defined period, and n represents the total number of records in the latest T defined periods. When (h-1)≥T, the value T is taken, indicating that the activity calculation of records before the defined time period is no longer performed; then the operation activity of the records in the statistical period is calculated and summed;
[0082] From the formula, we can see that the farther the behavior occurs from the current statistical time point, the lower the impact of the operation activity;
[0083]
[0084] i represents the serial number of each activity record within the defined period, n T N will represent the total number of records in the last T periods defined. h Represents the number of records in each period of h, normalized by the sigmoid function. C is an integer constant greater than 1, which is used to represent the influence coefficient of stability on activity. The closer the number of occurrences of a behavior in the statistical period is to the average number of occurrences, the less the change is, and the higher the stability is.
[0085] Card activity = ∑ operation activity * behavior stability
[0086]
[0087] It should be noted that the closer the behavior is to the current statistical time point, the greater the impact on the card activity, and the more times it occurs, the greater the impact. In addition, the historical habits of the card behavior should also be considered. The closer it is to the normal mean, the more normal the behavior is, which also means that the behavior is stable and has a higher impact on the card activity.
[0088] By calculating the activity, after removing those with activity levels below the set threshold, the cards under key customers are sorted from high to low according to activity levels, and used for cache prediction loading of card information in the next cycle.
[0089] In a specific example, the dynamic prediction of the changing trend of the number of times each target customer account calls the interface for querying the IoT card data according to the cubic exponential smoothing prediction algorithm, predicting the number of times the interface is accessed means:
[0090] First, the behavior of users querying the data interface is predictable in the time dimension. The triple exponential smoothing algorithm predicts the time series with both trend and seasonality, and predicts x in the next time period T. t+T as follows:
[0091] x t+T =A T +B T T+C T T 2
[0092]
[0093]
[0094]
[0095] The calculation formula for triple exponential smoothing is:
[0096]
[0097] In the exponential smoothing method, all previous observations have an impact on the current smoothed value. However, if there are outliers in the historical data, it will directly affect the accuracy of the prediction; therefore, it is necessary to clean the abnormal data before prediction.
[0098] If the operation abnormality is the largest or smallest within a certain period of time, it will be regarded as abnormal data. The measurement indicators are:
[0099]
[0100] When the above conditions are met, the data is abnormal data;
[0101] Method for outlier correction: After removing outliers, perform cubic spline interpolation on the data of the period and build a cubic spline interpolation model:
[0102] Assume f(x) is a continuous differentiable function on the interval [a, b]. Given a set of base points on the interval [a, b], the number of load data after removing abnormal points is (n+1):
[0103] a=x 0 <x 1 <x 2 <… <x n = b;
[0104] Assume that the function S(x) satisfies the following conditions:
[0105] S(x) is in each subinterval [x i-1 ,x i ] has the expression: S i (x) = a i x 3 +b i x 2 +c i x+d i ;
[0106] S(x) has a second-order continuous derivative on the interval [a,b];
[0107] Solve S for each subinterval according to the following known conditions i (x):
[0108] S(x i )=f(x i )
[0109] S(x i -0) = S(x i +0)
[0110] S′(x i -0) = S′(x i +0)
[0111] S″(x i -0)=S″(x i +0)
[0112] S″(x 0 )=f″(x 0 )=0
[0113] S″(x n )=f″(x n)=0;(i=0,1,…,n)
[0114] S i After (x) is obtained, the corresponding S can be substituted into the corresponding time t of the abnormal value i (x),(x i-1 <t<x i+1 ) to obtain the replacement points for the outliers.
[0115] It should be noted that the current CMP platform carries data on hundreds of millions of IoT cards, including the card life cycle status, card opening time, activation time, card opening location, ordered functional products, ordered packages, traffic pool information, etc. CMP provides a query interface for various card data. Customers on CMP can make large-scale calls through HTTP / HTTPS; however, CMP needs to carry a large number of customers' interface access within limited service resources and provide accurate and real-time query results, which puts a lot of pressure on the platform service. Therefore, by dynamically predicting the changing trend of the number of times each target customer account calls the interface to query the IoT card data based on the triple exponential smoothing prediction algorithm, the number of times the interface is accessed is accurately predicted, and the data of IoT cards with high activity and the same number of calls are loaded into the cache in advance according to the prediction results, and a period of validity is set. This can reduce the resource overhead of the CMP platform to a certain extent and provide more efficient query efficiency for IoT card data.
[0116] In a specific instance, it also includes preheating of the card information cache, which specifically means: after removing outliers, predicting the historical data of existing user accounts calling the query interface, dynamically predicting the changes in the number of times each account calls to query card information, and predicting the number of queries n in the next cycle; by default, within a cycle, an account calls the interface for querying card information once, and the customer will not query the information of IoT cards with low activity; after calculating the activity, a list of high-activity cards is selected, and the information of the top n IoT cards in terms of activity is queried, and then added to the cache, and the timeout period is one cycle.
[0117] This embodiment completes the cache loading of predicted data for querying card information of the customer account in the next cycle by preheating the card information cache; the customer account's query access to card information in one cycle will fall into the information cache of the card with high activity, which greatly speeds up the query speed of the interface and the consumption of database resources.
[0118] In a specific example, see Figure 2 : The preheating of the card data cache includes the following specific steps:
[0119] CMP first sets activity impact weights for the five types of behaviors under the IoT card: SMS, voice, and traffic history, life cycle change history, autonomous network disconnection and reconnection history, package change order history, and functional product change history, and sets the card activity filtering threshold. Then, the number of cycles and cycle time for historical record collection are specified;
[0120] Then, at the end of a CMP cycle, a scheduled task trigger triggers the task of predictively loading the card data cache;
[0121] Use multi-threading and concurrent means to calculate the activity of five types of behaviors, including SMS, voice, and traffic history, life cycle change history, autonomous network disconnection and network restoration history, package change order history, and functional product change history, under the IoT cards managed by key customers using the activity calculation method in this patent. After each thread completes the calculation, merge and filter the calculation results of each card to form a high-activity card list of IoT cards managed by the key customer.
[0122] In another task thread, the interface call records of the key customer's card information query in the past specified period are obtained, and after removing abnormal data, the number of calls by the customer in the next period is predicted using the cubic exponential smoothing algorithm;
[0123] When the predicted call count and activity calculation tasks are completed, the data of the n IoT cards with the highest activity are queried in the corresponding data table of the database through the card access number, and the query results are loaded into the redis cache. The key in redis is the card access number, and the value is the card data structured data. The validity period of this cache is a specified period. The main query results of the IoT card's main product instance, functional product instance, package instance, and ICCID instance information are loaded into redis;
[0124] This completes the cache prediction process of predicting a key customer's card information query in the next cycle.
[0125] It should be noted that see Figure 3 : When the customer queries the IoT card data API managed by it in the next cycle, if the card cache is loaded in advance and it is determined that the card has a cache, the data cache corresponding to the card number will be structured and output and returned to the customer.
[0126] If it does not exist, the SQL query statement will be executed to retrieve the card information data from the database and return it to the customer in a structured manner.
[0127] The efficiency of querying through cache is much higher than that of querying database. Therefore, the efficiency of customers querying the managed card information in the next cycle will be greatly improved, with a response speed increase of about 20%.
[0128] In the specific implementation, the Internet of Things card information query solution based on China Telecom's 5G Internet of Things connection management platform adds the engine of this embodiment.
[0129] Example 2
[0130] See also Figure 4 :A data query device based on an Internet of Things card, comprising:
[0131] Activity calculation module: used to obtain the activity of IoT cards of customer accounts in a period and perform analysis and calculation to form an ordered list of highly active cards;
[0132] Prediction module: used to dynamically predict the changing trend of the number of times each target customer account calls the interface for querying IoT card information based on the cubic exponential smoothing prediction algorithm, and predict the number of times the interface is accessed;
[0133] Loading module: used to load the data of the most active cards managed under the customer account with an equal number of access times into the cache in advance according to the prediction results.
[0134] The advantages of the Internet of Things card-based data query device of this embodiment and the Internet of Things card-based data query method described above over the prior art are the same, and will not be repeated here.
[0135] Example 3
[0136] A computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the data query method based on the Internet of Things card as described above is implemented.
[0137] It should be noted that the computer device can be a terminal or a server, wherein the terminal can be an electronic device with communication functions such as a smart phone, tablet computer, laptop computer, desktop computer, personal digital assistant and wearable device. The server can be an independent server or a server cluster composed of multiple servers.
[0138] Example 4
[0139] A storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method for querying information based on an Internet of Things card as described above can be implemented.
[0140] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0141] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0142] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data query method based on an Internet of Things card, characterized in that: The method comprises: Obtain the activity of the IoT cards of the customer account in a period and perform analysis and calculation to form an ordered list of highly active cards; The cubic exponential smoothing prediction algorithm is used to dynamically predict the changing trend of the number of times each target customer account calls the interface for querying IoT card information, and the number of times the interface is accessed is predicted; Based on the prediction results, the data of the most active cards managed under the customer account with an equal number of access times are loaded into the cache in advance.
2. The data query method based on the Internet of Things card according to claim 1 is characterized in that: The IoT card stores data information associated with activity, including the IoT card's voice, text message, and traffic bills, records of changes in the IoT card's life cycle, records of the IoT card's autonomous disconnection and reconnection operations, records of card package changes, records of card function product changes, and card positioning records.
3. The data query method based on the Internet of Things card according to claim 2 is characterized in that: The data information is weighted, and each time a record appears, the activity of the card increases.
4. The data query method based on the Internet of Things card according to claim 3 is characterized in that: The activity calculation formula is as follows: Among them, totalTime is the time difference between the start time of the earliest defined period and the current statistical time point, timeInterval is the time difference between the time of the current behavior record and the current statistical time point, M represents the activity weight of the defined record, i represents the sequence number of each activity record in the defined period, and n represents the total number of records in the latest T defined periods. When (h-1)≥T, the value T is taken, indicating that the activity calculation of records before the defined time period is no longer performed; then the operation activity of the records in the statistical period is calculated and summed; From the formula, we can see that the farther the behavior occurs from the current statistical time point, the lower the impact of the operation activity; i represents the serial number of each activity record within the defined period, n T Will represent the total number of records in the most recent T periods defined, N h Represents the number of records in each period of h, normalized by the sigmoid function. C is an integer constant greater than 1, which is used to represent the influence coefficient of stability on activity. The closer the number of occurrences of a behavior in the statistical period is to the average number of occurrences, the less the change is, and the higher the stability is. Card activity = ∑ operation activity * behavior stability 5. The data query method based on the Internet of Things card according to claim 1 is characterized in that: The dynamic prediction of the changing trend of the number of times each target customer account calls the interface for querying the IoT card data according to the cubic exponential smoothing prediction algorithm and predicting the number of times the interface is accessed refers to: First, the behavior of users querying the data interface is predictable in the time dimension. The triple exponential smoothing algorithm predicts the time series with both trend and seasonality, and predicts x in the next time period T. t+T as follows: x t+T =A T +B T T+C T T 2 The calculation formula for triple exponential smoothing is: In the exponential smoothing method, all previous observations have an impact on the current smoothed value. However, if there are outliers in the historical data, it will directly affect the accuracy of the prediction; therefore, it is necessary to clean the abnormal data before prediction. If the operation abnormality is the largest or smallest within a certain period of time, it will be regarded as abnormal data. The measurement indicators are: When the above conditions are met, the data is abnormal data; Method for outlier correction: After removing outliers, perform cubic spline interpolation on the data of the period and build a cubic spline interpolation model: Assume f(x) is a continuous differentiable function on the interval [a, b]. Given a set of base points on the interval [a, b], the number of load data after removing abnormal points is (n+1): a=x0 <x1<x2<…<x n =b; Assume that the function S(x) satisfies the following conditions: S(x) is in each subinterval [x i-1 ,x i ] has the expression: S i (x) = a i x 3 +b i x 2 +c i x+d i ; S(x) has a second-order continuous derivative on the interval [a,b]; Solve S for each subinterval according to the following known conditions i (x): S(x i )=f(x i ) S(x i -0)=S(x i +0) S′(x i -0)=S′(x i +0) S″(x i -0)=S″(x i +0) S″(x0)=f″(x0)=0 S″(x n )=f″(x n )=0;(i=0,1,…,n) S i After (x) is obtained, the corresponding S can be substituted into the corresponding time t of the abnormal value i (x),(x i-1 <t<x i+1 ) to obtain the replacement points for the outliers.
6. The data query method based on the Internet of Things card according to claim 5 is characterized in that: It also includes the preheating of the card information cache, which specifically means: after removing outliers, predict the historical data of existing user accounts calling the query interface, dynamically predict the changes in the number of times each account calls to query card information, and predict the number of queries n in the next cycle; by default, within a cycle, an account calls the interface for querying card information once, and customers will not query the information of IoT cards with low activity; after calculating the activity, a list of high-activity cards is selected, and the information of the top n IoT cards in terms of activity is queried, and then added to the cache, and the timeout period is one cycle.
7. The data query method based on the Internet of Things card according to claim 6 is characterized in that: The preheating of the card data cache includes the following specific steps: CMP first sets activity impact weights for the five types of behaviors under the IoT card: SMS, voice, and traffic history, life cycle change history, autonomous network disconnection and reconnection history, package change order history, and functional product change history, and sets the card activity filtering threshold. Then, the number of cycles and cycle time for historical record collection are specified; Then, at the end of a CMP cycle, a scheduled task trigger triggers the task of predictively loading the card data cache; Use multi-threading and concurrent means to calculate the activity of five types of behaviors, including SMS, voice, and traffic history, life cycle change history, autonomous network disconnection and network restoration history, package change order history, and functional product change history, under the IoT cards managed by key customers using the activity calculation method in this patent. After each thread completes the calculation, merge and filter the calculation results of each card to form a high-activity card list of IoT cards managed by the key customer. In another task thread, the interface call records of the key customer's card information query in the past specified period are obtained, and after removing abnormal data, the number of calls by the customer in the next period is predicted using the cubic exponential smoothing algorithm; When the predicted call count and activity calculation tasks are completed, the data of the n IoT cards with the highest activity are queried in the corresponding data table of the database through the card access number, and the query results are loaded into the redis cache. The key in redis is the card access number, and the value is the card data structured data. The validity period of this cache is a specified period. The main query results of the IoT card's main product instance, functional product instance, package instance, and ICCID instance information are loaded into redis; This completes the cache prediction process of predicting a key customer's card information query in the next cycle.
8. A data query device based on an Internet of Things card, characterized in that: include: Activity calculation module: used to obtain the activity of IoT cards of customer accounts in a period and perform analysis and calculation to form an ordered list of highly active cards; Prediction module: used to dynamically predict the changing trend of the number of times each target customer account calls the interface for querying IoT card information based on the cubic exponential smoothing prediction algorithm, and predict the number of times the interface is accessed; Loading module: used to load the data of the most active cards managed under the customer account with an equal number of access times into the cache in advance according to the prediction results.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the Internet of Things card-based data query method as described in any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the method for querying information based on an Internet of Things card as described in any one of claims 1 to 7 can be implemented.
Citation Information
Patent Citations
Enterprise customer batch card opening package recommendation method, device, platform and medium
CN118590526A
Storing session information in network devices
US8937942B1