Data processing method and equipment

By converting the configuration data into first data including time nodes and node labels, and determining values ​​within the second interval, the problem of low data reading efficiency in the existing technology is solved, and more efficient data matching and Read.

CN119336403APending Publication Date: 2025-01-21MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411310933.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The prior art results in low data reading efficiency when reading configuration data, especially in the case where overlapping times exist for multiple first time intervals.

Method used

By converting the value in the first parameter in the first time, the value is converted into the first data, including the time node, value and node label, thereby determining the value of the first parameter within the second range. The starting points and the deadlines are the minimum and maximum time nodes of the multi -time interval, respectively.

Benefits of technology

It effectively reduces the matching time, improves data reading efficiency, and avoids the need to traverse all configuration data in multiple overlapping time intervals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336403A_ABST
    Figure CN119336403A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and equipment, which can be applied to the technical field of data processing. The method comprises the steps that configuration information of a first application is obtained, the configuration information comprises multiple pieces of configuration data, and the configuration data comprises the value of a first parameter in a first time interval; performing data conversion on each piece of configuration data to obtain a plurality of first data, the first data comprising a plurality of second data, the second data comprising: a time node of the first time interval, a value of the first parameter at the time node, and a node label, the node label being used for representing that the time node is a starting point or a cut-off point of the first time interval; based on the multiple pieces of first data, the value of the first parameter in a second interval range is determined, the starting point of the second interval range is the minimum time node included in the multiple first time intervals, and the cut-off point of the second interval range is the maximum time node included in the multiple first time intervals. By adopting the embodiment of the invention, the data reading efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data processing method and apparatus. Background Art

[0002] There are scenarios where electronic devices need to read data during operation. For example, when an electronic device is running an application, it needs to read configuration data to run the application. There can be one or more configuration data sets, each including the value of a first parameter within a first time interval. The first parameter can be any parameter for the application's operation, such as startup duration or displayed content information.

[0003] During the application's execution based on configuration data, it's necessary to obtain the current time and iterate through all of the application's configuration data. Upon encountering a configuration data point, the current time is matched against the first time interval specified in that data. If a match is found, the value of the first parameter in that configuration data is used as a candidate value for that first parameter. After iterating through all configuration data, based on one or more candidate values ​​of the first parameter obtained during the iteration, statistical information about the first parameter is calculated to control the application's operation.

[0004] However, the above approach leads to low data reading efficiency. Summary of the Invention

[0005] This application provides a data processing method and apparatus.

[0006] Firstly, this application provides a data processing method, including:

[0007] Obtain configuration information of a first application, the configuration information including multiple configuration data of a first parameter, the configuration data including the value of the first parameter within a first time interval, and different configuration data corresponding to different first time intervals;

[0008] Each of the configuration data is transformed to obtain multiple first data, which correspond one-to-one with the multiple configuration data. The first data includes multiple second data, which includes: time nodes of the first time interval, the value of the first parameter at the time node, and node labels. The node labels are used to indicate that the time node is the start or end point of the first time interval.

[0009] Based on the multiple first data, the value of the first parameter is determined within a second interval range, where the starting point of the second interval range is the smallest time node included in the multiple first time intervals, and the ending point of the second interval range is the largest time node included in the multiple first time intervals.

[0010] Secondly, this application provides a data processing apparatus, comprising:

[0011] The configuration information acquisition module is used to acquire the configuration information of the first application. The configuration information includes multiple configuration data of the first parameter. The configuration data includes the value of the first parameter in a first time interval. Different configuration data correspond to different first time intervals.

[0012] The data conversion module is used to convert each of the configuration data to obtain multiple first data, which correspond one-to-one with the multiple configuration data. The first data includes multiple second data, which includes: time nodes of the first time interval, the value of the first parameter at the time node, and node labels. The node labels are used to indicate that the time node is the start point or end point of the first time interval.

[0013] The configuration determination module is used to determine the value of the first parameter within a second interval range based on the plurality of first data, wherein the starting point of the second interval range is the smallest time node included in the plurality of first time intervals, and the ending point of the second interval range is the largest time node included in the plurality of first time intervals.

[0014] Thirdly, this application provides an electronic device, including a memory and at least one processor;

[0015] The memory stores the instructions executed by the computer.

[0016] At least one processor executes computer execution instructions stored in memory, causing the electronic device to implement the method of the first aspect mentioned above.

[0017] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.

[0018] Fifthly, this application provides a computer program product, including a computer program that, when executed by a calculator, is used to implement the method of the first aspect.

[0019] As can be seen, in this embodiment, the value of the first parameter within the first time interval can be converted into first data. The first data includes multiple second data items, each including a time node of the first time interval, the value of the first parameter at that time node, and a node label. The node label indicates that the time node is the start or end point of the first time interval. Thus, each second data item corresponds to the value of the first parameter at a given time node. Since the first time intervals may overlap, there may be multiple values ​​for the first parameter at a given time node. Therefore, the second data can be processed to obtain statistical information of the first parameter at each time node, serving as a unique value. These time nodes constitute the second interval range, ensuring that the value of the first parameter at any given time point within the second interval range is unique. Therefore, in scenarios where multiple first time intervals overlap, the values ​​of the first parameter within the second interval range are traversed. When a matching value of the first parameter is found, the matching process stops. This effectively reduces matching time and improves data reading efficiency. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0021] Figure 1 An example diagram of a data reading scenario;

[0022] Figure 2 This is a schematic diagram illustrating the relationship between a first time interval and a first parameter provided in an embodiment of this disclosure;

[0023] Figure 3 This is a schematic diagram illustrating another relationship between a first time interval and a first parameter provided in an embodiment of this disclosure;

[0024] Figure 4 This is a flowchart of the steps of a data processing method provided in an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of the traversal process provided in the embodiments of this disclosure;

[0026] Figure 6 This is a schematic diagram illustrating one way of representing statistical information of the first parameter provided in an embodiment of this disclosure;

[0027] Figure 7 This is a flowchart of another data processing method provided in an embodiment of this application;

[0028] Figure 8 This is a structural block diagram of a data processing apparatus provided in an embodiment of this application;

[0029] Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of this application.

[0030] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. DETAILED DESCRIPTION

[0031] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0032] It should be noted that 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0033] It should be noted that the data processing method and equipment of this application can be used in the field of data processing technology, or in any field other than the field of data processing technology. The application field of the data processing method and equipment of this application is not limited.

[0034] Data reading is frequently involved in the use of various types of electronic devices. For example, when running an application on an electronic device, it is necessary to read the application's configuration data to control its operation. This configuration data may be used throughout or part of the application's lifecycle.

[0035] In some common scenarios, configuration data is centrally managed by a configuration center to decouple configuration data management from applications, effectively improving configuration data security and management efficiency. Common configuration centers include NACOS (Dynamic Naming and Configuration Service) and APOLLO.

[0036] Figure 1 This is an example diagram of a data reading scenario. (Refer to...) Figure 1As shown, the configuration center contains configuration data, which applications can read to start and run. In some examples, users can perform configuration operations through the configuration interface, and the background of the configuration interface can then generate configuration data based on these operations and store it in the configuration center. In other examples, users can directly write configuration data to the configuration center according to its preset format.

[0037] Of course, the data read in this embodiment is not limited to the configuration data described above.

[0038] In some data reading schemes, the configuration data includes the value of a first parameter within a first time interval. The first parameter is an arbitrary parameter used to control the operation of the application, and the first time interval is any time interval. That is to say, the value of the first parameter can be different in different first time intervals. Figure 2 This is a schematic diagram illustrating the relationship between a first time interval and the value of a first parameter, provided in an embodiment of this disclosure. (Refer to...) Figure 2 As shown, the unit for the first time interval is months, and the first parameter is the price, with the unit being yuan. Therefore, the configuration information can include the following configuration data: [first time interval March to April, price 50 yuan], [May to June, price 40 yuan].

[0039] above Figure 2 The first time intervals shown do not overlap; therefore, the price value at any given time is unique. In other words, the price will differ at different times. To determine the price at the current time, the current time can be matched against multiple first time intervals one by one. When the current time successfully matches a first time interval, the matching process stops, and the price corresponding to the first time interval that matches the current time is taken as the price for the current time.

[0040] As can be seen, the time required for the data reading process described above is random. When the first time interval successfully matches the current time, the data reading time is short and the data reading efficiency is high. However, when the last time interval successfully matches the current time, the data reading time is long and the data reading efficiency is low.

[0041] However, in practical applications, there are situations where the first time intervals overlap, therefore, within such overlapping time periods, the price may have multiple values. For example, refer to... Figure 3 As shown, the price for the first time interval (March to May) is 50 yuan, and the price for the first time interval (April to June) is 40 yuan. Therefore, the overlapping time interval (April to May) will have two prices: 50 yuan and 40 yuan. In this case, it is necessary to iterate through all the first time intervals to accurately determine the price for the current time period.

[0042] Specifically, to determine the value of the first parameter in the current time period, it is necessary to traverse all first time intervals. Specifically, for each first time interval, first determine whether the current time falls within that interval. If the current time is within the interval, then the value of the first parameter corresponding to that interval is considered a candidate value for the first parameter at the current time. If the current time is outside the interval, then the value of the first parameter corresponding to that interval is not considered a candidate value for the first parameter at the current time. Then, the value of the first parameter at the current time can be determined based on all candidate values. For example, the average, maximum, or minimum value of all candidate values ​​can be used as the value of the first parameter at the current time.

[0043] Figure 3 This is a schematic diagram illustrating another relationship between a first time interval and a first parameter provided in an embodiment of this disclosure. (Refer to...) Figure 3 As shown, the unit for the first time interval is months, and the first parameter is the price, in yuan. The configuration information can include the following configuration data: [first time interval March to May, price 50], [first time interval April to June, price 40].

[0044] Figure 3 The first time intervals shown (March to May and April to June) overlap with the fourth and fifth time intervals (April to May). Therefore, it is necessary to iterate through all the first time intervals and eventually determine that there are two prices, 40 and 50. In this case, the statistical information of these two prices needs to be used as the prices for April and May. For example, the minimum value of 40, the maximum value of 50, or the average value of 45 can be used as the prices for April and May.

[0045] As can be seen, the above process requires traversing all first time intervals and calculating statistical information each time data is read. When there are a large number of first time intervals, this leads to longer data reading times and lower data reading efficiency.

[0046] To improve data reading efficiency, the configuration data consisting of the first time interval and the first parameter is pre-converted into first data. Based on this first data, the value of the first parameter within a second interval is determined. The value of the first parameter within the second interval is statistical information, and the value of the first parameter at any given time within the second interval is unique. Therefore, each time data needs to be read, the current time can be matched with each second time interval within the second interval. Upon successful matching, the matching stops, and the value of the first parameter at the current time is obtained. This reduces data reading time and improves data reading efficiency.

[0047] The aforementioned first data includes multiple second data items, each of which includes: a time node of the first time interval, the value of the first parameter at the time node, and a node label. The node label is used to indicate whether the time node is the start or end point of the first time interval.

[0048] A typical application scenario of this disclosure is a configuration scenario, in which the value of a first parameter in the current time is obtained, and then the application is run based on the value of the first parameter. The data reading method of this disclosure can be executed by a configuration center, by an application, or in a device independent of the configuration center and the application.

[0049] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0050] Figure 4 This is a flowchart illustrating the steps of a data processing method provided in an embodiment of this application. (Refer to...) Figure 4 As shown, the data processing method of this application may include:

[0051] S101: Obtain the configuration information of the first application. The configuration information includes multiple configuration data of the first parameter. The configuration data includes the value of the first parameter in a first time interval. Different configuration data correspond to different first time intervals.

[0052] Here, the first application is any application, and the first parameter is any parameter used to control the operation of the first application, such as price, startup time, timeout time, etc.

[0053] The data format for configuration data is: [first time interval, value of the first parameter]. For example, one configuration data could be [first time interval March to May, price 50 yuan], indicating that the first parameter "price" is 50 yuan within the first time interval "March to May"; another configuration data could be [first time interval April to June, price 40 yuan], indicating that the first parameter "price" is 40 yuan within the first time interval "April to June". These two configuration data can constitute the configuration information: {[first time interval March to May, price 50 yuan], [first time interval April to June, price 40 yuan]}. Of course, in practical applications, the number of configuration data included in the configuration information is not limited to 2.

[0054] It is understandable that one configuration information corresponds to one first parameter; that is, multiple configuration data within a single configuration information refer to the same first parameter. Within a single configuration information, the first time intervals corresponding to different configuration data may partially overlap but not completely overlap.

[0055] S102: Perform data transformation on each configuration data to obtain multiple first data. The multiple first data correspond one-to-one with the multiple configuration data. The first data includes multiple second data. The second data includes: the time node of the first time interval, the value of the first parameter at the time node, and the node label. The node label is used to indicate that the time node is the start point or end point of the first time interval.

[0056] The second data is formatted as: [time node of the first time interval, value of the first parameter at the time node, node label]. It can be seen that the second data and the first data have different formats. Therefore, one set of configuration data can be converted into one set of first data. One set of first data includes two sets of second data: one set of second data corresponds to the start point of the first time interval in the configuration data, and the other set of second data corresponds to the end point of the first time interval in the configuration data.

[0057] In some implementations, multiple configuration data can be converted into multiple first data through the following steps: For each configuration data, firstly, it is determined whether there is a start point in the first time interval of the configuration data. If there is a start point in the first time interval of the configuration data, a second data is generated based on the start point and the value of the first parameter in the configuration data within the first time interval. Then, it is determined whether there is an end point in the first time interval of the configuration data. If there is an end point in the first time interval of the configuration data, a first data is generated based on the end point and the value of the first parameter in the configuration data within the first time interval.

[0058] It can be seen that the number of second data points corresponding to each configuration data point is related to whether the first time interval in the configuration data has a start point and / or an end point. When the first time interval in the configuration data has a start point or an end point, one second data point can be generated based on each configuration data point; when the first time interval in the configuration data has both a start point and an end point, two second data points can be generated based on each configuration data point. Therefore, the time nodes in the second data point originate from the first value interval in the configuration data, the values ​​of the first parameters in the second data point at the time nodes originate from the values ​​of the first parameters in the configuration data, and the node labels in the second data point originate from the method of extracting time nodes from the first time interval.

[0059] When the first time interval has a starting point, generating second data based on the starting point and the value of the first parameter in the configuration data within the first time interval may include: first, using the starting point as the time node in the second data; then, using the value of the first parameter in the configuration data within the first time interval as the value of the first parameter at the time node in the second data; finally, setting the node label in the second data as the first label to indicate that the time node in the second data is the starting point of the first time interval.

[0060] When the first time interval has an end point, generating second data based on the end point and the value of the first parameter in the configuration data within the first time interval may include: using the end point as the time node in the second data; then, using the value of the first parameter in the configuration data within the first time interval as the value of the first parameter at the time node in the second data; finally, setting the node label in the second data as a second label to indicate that the time node in the second data is the end point of the first time interval.

[0061] For example, given the configuration data [First time interval March to May, price 50 yuan], the first time interval "March to May" has a starting point "March". Therefore, this starting point "March" can be used as the time node in the second data. The price "50 yuan" from the configuration data [First time interval March to May, price 50 yuan] is used as the value of the first parameter "price" in the second data. Since the time node "March" is the starting point of the first time interval, the node label in the second data is set to the first label TRUE. Thus, by transforming the configuration data [First time interval March to May, 50 yuan], we can obtain a second data [First time interval time node March, price 50 yuan, node label TRUE].

[0062] Additionally, for the configuration data [first time interval March to May, price 50 yuan], the first time interval "March to May" has an end point "May". Therefore, this end point "May" can be used as the time node in the second data. The price "50 yuan" in the configuration data [first time interval March to May, price 50 yuan] is used as the value of the first parameter "price" in the second data. Since the time node "May" is the end point of the first time interval, the node label in the second data is set to the second label FALSE. Thus, by transforming the configuration data [first time interval March to May, 50 yuan], we can obtain another set of second data [first time interval time node May, price 50 yuan, node label FALSE].

[0063] As can be seen from the above explanation, a second data point [March to May, 50 yuan] is converted into two second data points [the time node of the first time interval in March, the price in 50 yuan, the node label TRUE] and [the time node of the first time interval in May, the price in 50 yuan, the node label FALSE]. These two second data points constitute a first data point.

[0064] Similarly, the aforementioned second data [first time interval April to June, price 40 yuan] is converted into two second data [first time interval time node April, price 40 yuan, node label TRUE] and [first time interval time node June, price 40 yuan, node label FALSE]. These two second data constitute one first data.

[0065] S103: Based on multiple first data, determine the value of the first parameter within a second interval range. The starting point of the second interval range is the smallest time node included in the multiple first time intervals, and the ending point of the second interval range is the largest time node included in the multiple first time intervals.

[0066] As can be seen, the second interval is the total time interval composed of multiple first time intervals, and the second interval may include one or more second time intervals. The second time interval can be the time interval obtained by de-overlapping the first time intervals. For example, when multiple first time intervals are March to May and April to June, the second interval is March to June, which includes multiple second time intervals of March to April, April to May, and May to June.

[0067] In some implementations, determining the value of the first parameter within a second interval range based on multiple first data includes: first, sorting the multiple second data based on the time nodes and node labels included in the second data to obtain a first data sequence; then, traversing the first data sequence to determine the statistical information of the first parameter at the time nodes; and finally, determining the value of the first parameter within a second interval range based on the statistical information.

[0068] The first data sequence is obtained by sorting all the second data, which are included in the first data sequence. Specifically, the sorting strategy for multiple second data is to first sort them by time node. For multiple second data with the same time node, they can be sorted by node label. In this way, the order of the second data in the first data sequence can be accurately determined, which helps to improve the accuracy of subsequent traversal of the first data sequence.

[0069] It should be noted that the node labels include the first label corresponding to the starting point and the second label corresponding to the ending point. The traversal method of the first data sequence is related to the sorting method of the second data based on the time nodes.

[0070] Accordingly, the multiple second data include first target data and second target data. The node labels included in the first target data are used to indicate that the time nodes included in the first target data are the start points of the first time interval. The node labels included in the second target data are used to indicate that the time nodes included in the second target data are the end points of the first time interval. That is, the first target data is the second data containing the first label, and the second target data is the second data containing the second label. The position of the first target data in the first data sequence is earlier than the position of the second target data in the first data sequence.

[0071] In the first sorting method, the data is arranged in ascending order of time nodes. This means that the second data corresponding to a smaller time node precedes the second data corresponding to a larger time node, and the second data corresponding to the first label is sorted first, followed by the second data corresponding to the second label. In this case, the traversal method can be to start from the first second data in the first data sequence and proceed to the last second data.

[0072] In the second sorting method, the data is arranged in descending order of time. This means that the second data corresponding to a smaller time node follows the second data corresponding to a larger time node, and the second data corresponding to the second label is sorted first, followed by the second data corresponding to the first label. In this case, the traversal method can be to start from the last second data in the first data sequence and proceed towards the first second data.

[0073] For example, multiple second data points are: [Time node March of the first time interval, price 50 yuan, node label TRUE], [Time node May of the first time interval, price 50 yuan, node label FALSE], [Time node April of the first time interval, price 40 yuan, node label TRUE], and [Time node June of the first time interval, price 40 yuan, node label FALSE], where TRUE is the first label and FALSE is the second label.

[0074] According to the first sorting method, the above multiple second data are sorted to obtain: [Time node March of the first time interval, price 50 yuan, node label TRUE], [Time node April of the first time interval, price 40 yuan, node label TRUE], [Time node May of the first time interval, price 50 yuan, node label FALSE], and [Time node June of the first time interval, price 40 yuan, node label FALSE].

[0075] According to the second sorting method, the above multiple second data are sorted to obtain: [Time node of the first time interval June, price 40 yuan, node label FALSE], [Time node of the first time interval May, price 50 yuan, node label FALSE], [Time node of the first time interval April, price 40 yuan, node label TRUE] and [Time node of the first time interval March, price 50 yuan, node label TRUE].

[0076] The first data sequence obtained by the first sorting method can be traversed from front to back, while the first data sequence obtained by the second sorting method can be traversed from back to front. It can be seen that the traversal results obtained by these two methods are the same.

[0077] For convenience, the first sorting method described above is usually used.

[0078] During the process of traversing the first data sequence, statistical information is continuously updated. This statistical information can be the maximum, minimum, or average of multiple values. Traversal involves visiting each second data point in the order it is arranged in the first data sequence. Each time a second data point is visited, it signifies that the traversal has reached that second data point, and the statistical information of the first parameter is updated accordingly.

[0079] In some implementations, traversing the first data sequence to determine the statistical information of the first parameter at a time node includes: firstly, when traversing to the i-th second data included in the first data sequence, calculating the occurrence count of the value of the first parameter included in the i-th second data based on the node label included in the i-th second data, and calculating the statistical information of the first parameter at the time node included in the i-th second data based on the values ​​and occurrence counts of the first parameters included in all traversed second data; then, after traversing the first data sequence, multiple statistical information is obtained.

[0080] When the first data sequence includes N second data items, i is an integer greater than or equal to 1 and less than or equal to N. In some implementations, a first mapping table can be used to store the values ​​of the first parameters included in all traversed second data items and their corresponding occurrence counts. Therefore, when traversing to the i-th second data item, if the value of the first parameter included in the i-th second data item does not exist in the first mapping table, the occurrence count of the first parameter included in the i-th second data item is set to 1, and the value of the first parameter included in the i-th second data item and the occurrence count 1 are stored correspondingly in the first mapping table; if the value of the first parameter included in the i-th second data item exists in the first mapping table, the occurrence count of the first parameter included in the i-th second data item is updated in the first mapping table according to the node label. Updating the occurrence count includes: incrementing the occurrence count by 1, or decrementing the occurrence count by 1.

[0081] Specifically, based on the node labels included in the i-th second data, the frequency of occurrence of the first parameter values ​​included in the i-th second data is calculated, including:

[0082] If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the starting point of the first time interval, then the value of the first parameter included in the i-th second data and the corresponding number of occurrences are found from the first mapping table, and the number of occurrences is increased by a preset threshold.

[0083] If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the end point of the first time interval, then the value of the first parameter included in the i-th second data and its corresponding occurrence count are found from the first mapping table, and the occurrence count is reduced by a preset threshold.

[0084] The preset threshold can be, for example, 1, 2, or other positive integers. Typically, the preset threshold is 1.

[0085] The embodiments of this disclosure can accurately update the occurrence count by node labels, thereby accurately updating the statistical information of the first parameter.

[0086] In some implementations, a second mapping table stores the statistical information of the first parameter at each time node. Therefore, when traversing to the i-th second data point, after updating the occurrence count in the first mapping table based on the node labels included in the i-th second data point, firstly, the values ​​and occurrence counts of the first parameter included in all traversed second data points are extracted from the first mapping table; then, statistical calculations are performed on the values ​​of all first parameters with an occurrence count greater than or equal to 1, and this is used as the statistical information corresponding to the time node included in the i-th second data point; finally, the time node included in the i-th second data point and the corresponding statistical information are stored in the second mapping table.

[0087] The statistical operations here can be flexibly set according to the actual application scenario. They can be to find the maximum value, minimum value, or average value. Correspondingly, the statistical information is to find the maximum value, minimum value, or average value of the first parameter, which is included in all the traversed second data and has appeared more than or equal to 1 time.

[0088] After obtaining the statistical information of the first parameter at multiple time points, the value of the first parameter within the second interval can be determined based on this statistical information. Specifically, firstly, the multiple time points are sorted in ascending order to obtain a time series; then, the time series is traversed, and for the i-th time point, the i-th time point and the (i+1)-th time point constitute a second time interval, and the statistical information of the first parameter corresponding to the i-th time point is used as the value of the first parameter in that second time interval. In this way, after traversing the second-to-last time point, the values ​​of the first parameter in all second time intervals can be obtained, and multiple second time intervals constitute the second interval range.

[0089] The first parameter mentioned above is a parameter for controlling the operation of the first application. After obtaining the value of the first parameter within the second interval, the value of the first parameter at the current time can be determined based on the value of the first parameter within the second interval, so as to control the operation of the first application based on the value of the first parameter at the current time.

[0090] Specifically, the system can match the current time with each of the second time intervals within the range of the second interval. When a second time interval is matched, the matching stops. At this point, the unique value of the first parameter at the current time can be obtained, and the operation of the first application can be controlled.

[0091] It is understandable that different types of the first parameter will have different effects on the operation of the first application. For example, the first parameter may be the application's startup timeout duration, thereby controlling whether the application restarts; or, the first parameter may be the price required in the display interface of the first application, thereby controlling the display of the first application. This disclosure does not limit the type of the first parameter or its impact on the operation of the application.

[0092] The following example illustrates the specific process of the data processing method. Using the second data as an example... Figure 3 As shown in the example, there are two sets of configuration data: [first time interval March to May, price 50 yuan] and [first time interval April to June, price 40 yuan].

[0093] First, the above configuration data is converted into first data. Then, based on the configuration data [first time interval March to May, price 50], two second data are generated: [time node 3, price 50, node label TRUE] and [time node 5, price 50, node label FALSE]. Based on the configuration data [first time interval April to June, price 40], two second data are generated: [time node 4, price 40, node label TRUE] and [time node 6, price 40, node label FALSE].

[0094] Then, the four sets of second data are sorted according to time node and node label to obtain the first data sequence: {[Time node 3, Price 50, Node label TRUE], [Time node 4, Price 40, Node label TRUE], [Time node 5, Price 50, Node label FALSE], [Time node 6, Price 40, Node label FALSE]}.

[0095] Finally, by traversing the first data sequence described above, we obtain the statistical information for the first parameter, "price". Figure 5 This is a schematic diagram of the traversal process provided in an embodiment of this disclosure. (Refer to...) Figure 5 As shown, the first mapping table Ymap = {y: frequency of occurrence} stores the frequency of price occurrences, where y is the price. The second mapping table Xmap = {x: average y value} stores the statistical information of the first parameter y at time node x. Here, the statistical information is the average value. Ymap and Xmap are initially empty.

[0096] Reference Figure 5 As shown, when iterating through the first second data point [time node 3, price 50, node label TRUE], the Ymap is updated to {50:1}, indicating that the price 50 appears once. Therefore, the price statistics for time node 3 are updated to 50, and "3:50" is added to the Xmap.

[0097] When iterating to the second data point [Time Node 4, Price 40, Node Label TRUE], the Ymap is updated to {50:1, 40:1}, indicating that price 50 appears once and price 40 appears once. Therefore, the price statistics for time node 4 are updated to 45, and "4:45" is added to the Xmap.

[0098] When iterating to the third second data point [time node 5, price 50, node label FALSE], the Ymap is updated to {40:1}, indicating that price 40 appears once and price 50 appears zero times. Therefore, the price statistics for time node 5 are updated to 40, and "5:40" is added to the Xmap.

[0099] When iterating to the fourth second data point [time node 6, price 40, node label FALSE], the Ymap is updated to empty, indicating that the occurrence counts of prices 50 and 40 are both 0. Therefore, the price statistics for time node 6 are updated to 0, and "6:0" is added to the Xmap.

[0100] As can be seen from the above process, records with a count of 0 are deleted after each Ymap update. However, in practical applications, records with a count of 0 can be left undeleted, and only records with a non-zero count can be considered when updating the Xmap. Nevertheless, to conserve Ymap storage space as much as possible, deleting records with a count of 0 is advisable.

[0101] After obtaining the Xmap using the above method, the Xmap can be converted into a representation of the second time interval. Figure 6 This is a schematic diagram of one way of representing the statistical information of the first parameter provided in this embodiment of the present disclosure, which is used to represent the statistical information of the first parameter based on a second time interval. Figure 6 Used to represent Figure 5 The statistics for the first parameter "price" in the Xmap corresponding to the end of the traversal are shown.

[0102] In some implementations, the above Figure 5 The Xmap is converted to a representation based on the second time interval. (See reference...) Figure 5 As shown, for the first record "3:50" in Xmap, a second time interval [3, 4] is formed by time node 3 in the first record "3:50" and time node 4 in the next record "4:45". The statistical information 50 in the first record "3:50" is used as the price value within this second time interval [3, 4]. Figure 6 As shown, the price was 50 yuan in March and April.

[0103] For the second record "4:45" in Xmap, a second time interval [4, 5] is constructed using time node 4 in the second record "4:45" and time node 5 in the next record "5:40". The statistical information 45 in the second record "4:45" is used as the price value in this second time interval [4, 5]. Figure 6 As shown, the price was 45 yuan in April and May.

[0104] For the third record "5:40" in Xmap, a second time interval [5, 6] is constructed using time node 5 in the record "5:0" and time node 6 in the next record "6:0". The statistical information 40 from the third record "5:40" is then used as the price value within the second time interval [5, 6]. Figure 6 As shown, the price was 40 yuan in May and June.

[0105] The price is 0 at other times.

[0106] In summary, the embodiments of this disclosure can generate first data based on pre-configured configuration data, and generate statistical information of the first parameter at each time point based on the first data, which serves as the unique value of the first parameter at that time point. Thus, when reading data, matching can stop when a match is successfully achieved between the current time and the second time interval, without needing to continue matching subsequent second time intervals, effectively saving matching time and improving data reading efficiency.

[0107] Furthermore, the embodiments of this disclosure can avoid repeatedly calculating the statistical information corresponding to the same time interval each time data is read, and instead only need to perform the statistical information corresponding to the time interval once in advance.

[0108] Figure 7 This is a flowchart illustrating the steps of another data processing method provided in this embodiment. (Refer to...) Figure 7 As shown, the data processing method may include:

[0109] S301: Obtain the configuration information of the first application. The configuration information includes multiple configuration data of the first parameter. The configuration data includes the value of the first parameter within a first time interval. Different configuration data correspond to different first time intervals.

[0110] S302: Perform data transformation on each configuration data to obtain multiple first data. The multiple first data correspond one-to-one with the multiple configuration data. The first data includes multiple second data. The second data includes: the time node of the first time interval, the value of the first parameter at the time node, and the node label. The node label is used to indicate that the time node is the start point or end point of the first time interval.

[0111] S303: Based on the time nodes and node labels included in the second data, sort the second data included in multiple first data to obtain a first data sequence, wherein the number of second data included in the first data sequence is N.

[0112] S304: Initialize i to 1.

[0113] S305: Extract the i-th second data from the first data sequence.

[0114] S306: If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the starting point of the first time interval, then the occurrence frequency of the first parameter included in the i-th second data is increased by a preset threshold.

[0115] S307: If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the end point of the first time interval, then the occurrence frequency of the first parameter included in the i-th second data is reduced by a preset threshold.

[0116] S308: Based on the values ​​and occurrence counts of the first parameter included in all the traversed second data, calculate the statistical information of the first parameter at the time node included in the i-th second data.

[0117] S309: Update i to i+1.

[0118] S310: Determine whether i is less than or equal to N.

[0119] If yes, return to S305; otherwise, proceed to S311.

[0120] S311: After traversing the first data sequence, multiple statistical information is obtained.

[0121] S312: Based on multiple statistical information, determine the value of the first parameter within the range of the second interval. The starting point of the second interval is the smallest time node included in the multiple first time intervals, and the ending point of the second interval is the largest time node included in the multiple first time intervals.

[0122] S313: Based on the value of the first parameter within the second interval, determine the value of the first parameter at the current time, and control the operation of the first application based on the value of the first parameter at the current time.

[0123] The steps in the above data processing method can be flexibly adjusted in order without depending on each other, and the order is not limited in the embodiments disclosed herein. Furthermore, the above steps can be referred to the foregoing... Figure 4 The explanations of the corresponding steps in the data processing method shown will not be repeated here.

[0124] Figure 8 This is a structural block diagram of a data processing apparatus provided in an embodiment of this application, referring to... Figure 8 As shown, the data processing apparatus 400 includes:

[0125] The configuration information acquisition module 401 is used to acquire the configuration information of the first application. The configuration information includes multiple configuration data of the first parameter. The configuration data includes the value of the first parameter in a first time interval. Different configuration data correspond to different first time intervals.

[0126] The data conversion module 402 is used to convert each of the configuration data to obtain multiple first data, each of which corresponds to one of the configuration data. The first data includes multiple second data, each of which includes: a time node of the first time interval, the value of the first parameter at the time node, and a node label. The node label is used to indicate that the time node is the start or end point of the first time interval.

[0127] The configuration determination module 403 is used to determine the value of the first parameter within a second interval range based on the plurality of first data, wherein the starting point of the second interval range is the smallest time node included in the plurality of first time intervals, and the ending point of the second interval range is the largest time node included in the plurality of first time intervals.

[0128] Optionally, the parameters controlling the operation of the first application include the first parameter; the device further includes:

[0129] The value determination module is used to determine the value of the first parameter at the current time based on the value of the first parameter within the second interval range.

[0130] The application running module is used to control the running of the first application based on the value of the first parameter at the current time.

[0131] Optionally, the configuration determination module 403 is further configured to:

[0132] Based on the time nodes and node labels included in the second data, the second data in the plurality of first data are sorted to obtain a first data sequence; the first data sequence is traversed to determine the statistical information of the first parameter at the time node; based on the statistical information, the value of the first parameter in the second interval range is determined.

[0133] Optionally, the plurality of second data includes first target data and second target data; the node labels included in the first target data are used to indicate that the time nodes included in the first target data are the starting point of the first time interval; the node labels included in the second target data are used to indicate that the time nodes included in the second target data are the ending point of the first time interval; the position of the first target data in the first data sequence is earlier than the position of the second target data in the first data sequence.

[0134] Optionally, the configuration determination module 403 is further configured to:

[0135] When traversing the i-th second data included in the first data sequence, based on the node label included in the i-th second data, the occurrence frequency of the value of the first parameter included in the i-th second data is calculated, and based on the values ​​and occurrence frequencies of the first parameter included in all traversed second data, the statistical information of the first parameter at the time node included in the i-th second data is calculated; after traversing the first data sequence, multiple statistical information are obtained.

[0136] Optionally, the configuration determination module 403 is further configured to:

[0137] If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the start point of the first time interval, then the occurrence frequency of the value of the first parameter included in the i-th second data is increased by a preset threshold; if the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the end point of the first time interval, then the occurrence frequency of the value of the first parameter included in the i-th second data is decreased by the preset threshold.

[0138] The above-described device embodiments correspond to the aforementioned data processing method embodiments. For detailed descriptions, please refer to the descriptions in the aforementioned method embodiments. The embodiments in this application will not be repeated here.

[0139] Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of this application. The electronic device 600 includes a memory 602 and at least one processor 601.

[0140] Among them, memory 602 stores computer-executed instructions.

[0141] At least one processor 601 executes computer execution instructions stored in memory 602, causing electronic device 600 to implement the aforementioned method.

[0142] In addition, the electronic device 600 may also include a receiver 603 and a transmitter 604, wherein the receiver 603 is used to receive information from other devices or equipment and forward it to the processor 601, and the transmitter 604 is used to send information to other devices or equipment.

[0143] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, which stores computer-executable instructions that, when executed by a processor, are used to implement the aforementioned method.

[0144] In an exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a calculator, implements the aforementioned method.

[0145] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0146] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire configuration information of the first application, the configuration information including multiple configuration data of a first parameter, the configuration data including a value of the first parameter within a first time interval, and different configuration data correspond to different first time intervals; Performing data conversion on each of the configuration data to obtain a plurality of first data, wherein the plurality of first data corresponds to the plurality of configuration data one by one, the first data includes a plurality of second data, and the second data includes: a time node of the first time interval, a value of the first parameter at the time node, and a node label, wherein the node label is used to indicate that the time node is a starting point or an ending point of the first time interval; Based on the multiple first data, the value of the first parameter within a second interval is determined, the starting point of the second interval is the minimum time node included in the multiple first time intervals, and the end point of the second interval is the maximum time node included in the multiple first time intervals.

2. The method according to claim 1, characterized in that The parameter for controlling the running of the first application includes the first parameter; and the method further includes: Determine the value of the first parameter at the current time based on the value of the first parameter within the second interval; Based on the value of the first parameter at the current time, the execution of the first application is controlled.

3. The method according to claim 1, characterized in that The determining, based on the plurality of first data, a value of the first parameter within a second interval includes: Sort the second data in the plurality of first data based on the time nodes and node labels included in the second data to obtain a first data sequence; Traversing the first data sequence, and determining statistical information of the first parameter at the time node; Based on the statistical information, a value of the first parameter within the second interval is determined.

4. The method according to claim 3, characterized in that The plurality of second data include first target data and second target data; The node label included in the first target data is used to indicate that the time node included in the first target data is the starting point of the first time interval; The node label included in the second target data is used to indicate that the time node included in the second target data is the cutoff point of the first time interval; The position of the first target data in the first data sequence is earlier than the position of the second target data in the first data sequence.

5. The method according to claim 3, characterized in that: The traversing the first data sequence to determine statistical information of the first parameter at the time node includes: When traversing the i-th second data included in the first data sequence, based on the node label included in the i-th second data, the number of occurrences of the value of the first parameter included in the i-th second data is calculated, and based on the values ​​and the number of occurrences of the first parameter included in all traversed second data, the statistical information of the first parameter at the time node included in the i-th second data is calculated; After traversing the first data sequence, a plurality of statistical information are obtained.

6. The method according to claim 5, characterized in that The calculating, based on the node label included in the i-th second data, the number of occurrences of the value of the first parameter included in the i-th second data comprises: If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the starting point of the first time interval, the number of occurrences of the value of the first parameter included in the i-th second data is increased by a preset threshold; If the node label included in the i-th second data is used to indicate that the time node included in the i-th second data is the end point of the first time interval, the number of occurrences of the value of the first parameter included in the i-th second data is reduced by the preset threshold.

7. A data processing device, characterized in that: include: a configuration information acquisition module, configured to acquire configuration information of a first application, wherein the configuration information includes a plurality of configuration data of a first parameter, wherein the configuration data includes a value of the first parameter within a first time interval, and different configuration data correspond to different first time intervals; a data conversion module, configured to perform data conversion on each of the configuration data to obtain a plurality of first data, wherein the plurality of first data corresponds to the plurality of configuration data one by one, the first data includes a plurality of second data, and the second data includes: a time node of the first time interval, a value of the first parameter at the time node, and a node label, wherein the node label is used to indicate that the time node is a starting point or an ending point of the first time interval; A configuration determination module is used to determine the value of the first parameter within a second interval range based on the multiple first data, the starting point of the second interval range is the minimum time node included in the multiple first time intervals, and the end point of the second interval range is the maximum time node included in the multiple first time intervals.

8. An electronic device comprising a memory and at least one processor; in, The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device implements the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which is used to implement the method according to any one of claims 1 to 6 when being executed by a processor.