Curve Image Generation Method, Apparatus, Device, and Storage Medium
By performing a series of processing on business data, such as data cleaning, grouping, derivative screening, sampling screening, discretization and image compression, the lag problem when displaying curve images on mobile devices is solved, and efficient curve image display is achieved.
Patent Information
- Application Number
- CN202111546587.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2041-12-16
AI Technical Summary
When displaying curved images on mobile devices, it is prone to lag, mainly due to performance bottlenecks caused by excessive data volume.
By performing data cleaning, data grouping, derivative screening, sampling screening, discretization processing and image compression on business data, standard business curve charts are generated to reduce data processing volume and storage requirements.
It effectively reduces the lag when displaying curved images on mobile devices, improves the display quality and performance of curved images, and ensures efficient display of curved images on mobile devices.
Smart Images

Figure CN114241085B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a curve image generation method, device, electronic device and computer-readable storage medium. Background Art
[0002] Various curve images are very common in our daily life, such as our stock market trend chart, a region's productivity trend chart, etc. To draw these curves, it is necessary to process a huge amount of data. It is OK to process it on high-performance products such as computers, but it seems to be unable to cope with it on mobile devices. Due to the large amount of data, it will cause freezes and other phenomena. Therefore, there is an urgent need for an efficient curve image generation method to support the display of curves on mobile devices. Summary of the invention
[0003] The present invention provides a curve image generation method, device, equipment and storage medium, the main purpose of which is to solve the problem of freeze when displaying curves on mobile devices.
[0004] To achieve the above object, the present invention provides a curve image generation method, comprising:
[0005] Acquire a business data set, and perform data cleaning on the business data in the business data set to obtain a standard business data set;
[0006] Performing data grouping processing on the standard service data set to obtain service grouping data;
[0007] Performing derivative screening on the business group data to obtain an original screening data set;
[0008] Sampling and screening the data in the original screening data set to obtain a standard screening data set;
[0009] The standard screening data set is discretized, and an original business curve graph is generated based on the discretized data. The original business curve graph is image compressed to obtain a standard business curve graph.
[0010] Optionally, the performing data cleaning on the business data in the business data set to obtain a standard business data set includes:
[0011] Sorting the business data in the business data set in chronological order to obtain a first sorted data set;
[0012] Data anomaly detection and data missing value detection are performed on the business data in the first sorted data set, and business data with abnormal detection data or missing values are eliminated to obtain the standard business data set.
[0013] Optionally, performing data grouping processing on the standard service data set to obtain service grouping data includes:
[0014] Calculate the grouping interval of the data in the standard service data set according to the preset number of groups;
[0015] The standard service data set is grouped using the grouping interval to obtain the service grouping data.
[0016] Optionally, the calculating the grouping interval of the data in the standard service data set according to a preset number of groups includes:
[0017] The grouping interval of the data in the standard business data set is calculated using a preset grouping formula:
[0018]
[0019] Wherein, Width is the grouping interval, n is the preset number of groups, x max is the last data in the standard business data set sorted in chronological order, x min It is the data that is first sorted in chronological order in the standard business data set.
[0020] Optionally, the performing derivative screening on the service group data to obtain an original screening data set includes:
[0021] Performing secondary derivation on each group data in the service group data to obtain a plurality of derived group data;
[0022] An absolute value process is performed on the data in the plurality of derivative grouped data, and data with an absolute value less than a preset absolute threshold is removed, so as to obtain an original filtered data set including the plurality of filtered grouped data.
[0023] Optionally, the discretizing the standard screening data set and generating an original business curve chart based on the discretized data includes:
[0024] Sorting the business data in the standard screening data set by size to obtain a second sorted data set;
[0025] removing duplicate data in the second sorted data set, and adding indexes to the data in the second sorted data set;
[0026] A coordinate system is constructed according to the time and the index, and the business data in the standard screening data set is mapped to the coordinate system to obtain the original business curve graph.
[0027] Optionally, the sampling and screening of the data in the original screening data set to obtain the standard screening data set includes:
[0028] Based on a preset sampling rate, each screening group data in the original screening data set is sampled in a random sampling manner to obtain a standard screening data set including a plurality of sampled group data.
[0029] In order to solve the above problem, the present invention further provides a curve image generating device, the device comprising:
[0030] A data cleaning module is used to obtain a business data set, clean the business data in the business data set, and obtain a standard business data set;
[0031] A data grouping module, used for performing data grouping processing on the standard service data set to obtain service grouping data;
[0032] A data screening module, used for performing derivative screening on the service group data to obtain an original screening data set, and performing sampling screening on the data in the original screening data set to obtain a standard screening data set;
[0033] The curve image generation module is used to discretize the standard screening data set, generate an original business curve chart based on the discretized data, and perform image compression on the original business curve chart to obtain a standard business curve chart.
[0034] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0035] a memory storing at least one computer program; and
[0036] The processor executes the computer program stored in the memory to implement the curve image generation method described above.
[0037] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned curve image generation method.
[0038] The present invention refines a large amount of data by performing data cleaning and data grouping processing on the business data in the business data set, thereby improving data processing efficiency. At the same time, by adopting a derivation method, the change in the slope of the curve is determined, and a large number of non-critical points are deleted, so that the curve still conforms to the original trend after a large amount of compression. Finally, through sampling screening and image compression processing, the original trend chart is highly restored when the sampling rate is greatly reduced, the usage rate of memory and CPU is reduced, and there will be no phenomenon such as jamming due to excessive data volume, thereby improving the display quality of the curve image in the mobile device. Therefore, the curve image generation method, device, electronic device and computer-readable storage medium proposed in the present invention can solve the problem of jamming when displaying curves on mobile devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of a flow chart of a curve image generating method provided by an embodiment of the present invention;
[0040] Figure 2 A functional module diagram of a curve image generating device provided by an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of the structure of an electronic device for implementing the curve image generation method provided by an embodiment of the present invention.
[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0044] The embodiment of the present application provides a method for generating a curved image. The execution subject of the curved image generation method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the curved image generation method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0045] Reference Figure 1FIG. 1 is a flow chart of a curve image generation method provided by an embodiment of the present invention. In this embodiment, the curve image generation method includes:
[0046] S1. Obtain a business data set, and perform data cleaning on the business data in the business data set to obtain a standard business data set.
[0047] In the embodiment of the present invention, the business data set may be business data that changes with time (or other dimensions), such as stock market data, regional productivity data, and the like.
[0048] Specifically, the data cleaning of the business data in the business data set to obtain a standard business data set includes:
[0049] Sorting the business data in the business data set in chronological order to obtain a first sorted data set;
[0050] Data anomaly detection and data missing value detection are performed on the business data in the first sorted data set, and business data with abnormal detection data or missing values are eliminated to obtain the standard business data set.
[0051] In the embodiment of the present invention, since outliers or missing values do not have a particularly large impact on the overall curve trend when drawing a curve image, they can be directly eliminated. The missmap function can be used to detect whether there are missing values in the business data. If there are no missing values, no processing is performed. If there are missing values, they are eliminated. At the same time, the unilateral test method and the bilateral test method can be used to perform data anomaly detection on the business data. If there are no outliers, no processing is performed. If there are outliers, they are eliminated.
[0052] In an optional embodiment of the present invention, the one-sided test elimination includes minimum value one-sided test elimination and maximum value one-sided test elimination.
[0053] The calculation method for eliminating the minimum value single-side test elimination includes:
[0054]
[0055] Among them, G represents the test value, represents the average value of the data in the business data set, Y min Indicates the smallest data in the historical business data set. When G is greater than a preset test threshold, the smallest data is determined to be abnormal data.
[0056] The calculation method of the maximum value single-side test elimination includes:
[0057]
[0058] Among them, G represents the test value, represents the average value of the data in the historical business data set, Y max Indicates the largest data in the historical business data set. When G is greater than a preset test threshold, the largest data is determined to be abnormal data.
[0059] In the embodiment of the present invention, by performing data cleaning on business data, the data processing volume is reduced to a certain extent, and the data quality and data processing speed are improved.
[0060] S2. Perform data grouping processing on the standard service data set to obtain service grouping data.
[0061] In the embodiment of the present invention, since the amount of data for drawing the curve is large, the processing speed will be reduced during data processing. The data processing speed can be increased by grouping.
[0062] Specifically, the step of performing data grouping processing on the standard service data set to obtain service grouping data includes:
[0063] Calculate the grouping interval of the data in the standard service data set according to the preset number of groups;
[0064] The standard service data set is grouped using the grouping interval to obtain the service grouping data.
[0065] In an optional embodiment of the present invention, the step of calculating the grouping interval of data in the standard service data set according to a preset number of groups includes:
[0066] The grouping interval of the data in the standard business data set is calculated using a preset grouping formula:
[0067]
[0068] Wherein, Width is the grouping interval, n is the preset number of groups, x max is the last data in the standard business data set sorted in chronological order, x min It is the data that is first sorted in chronological order in the standard business data set.
[0069] In an optional embodiment of the present invention, taking the financial field as an example, assuming that there are 10,000 stock data, which are sorted by time and divided into 100 groups, the grouping interval is (10000-0) / 100.
[0070] S3. Perform derivative screening on the business group data to obtain an original screened data set.
[0071] In the example of the present invention, when drawing a curve using discrete points, the more discrete points there are, the better it can reflect the true situation of the curve. However, the problem caused by too many discrete points is that the amount of data that needs to be processed is too large, which is reflected in the specific device as a jam. In order to ensure that the trend of the data remains unchanged, the change in the slope of the curve is determined by the derivation method, thereby deleting a large number of non-critical points and improving the data processing speed.
[0072] In detail, the derivative screening of the service group data to obtain an original screening data set includes:
[0073] Performing secondary derivation on each group data in the service group data to obtain a plurality of derived group data;
[0074] Absolute value processing is performed on the data in the plurality of derivative grouped data, and data with absolute values less than a preset absolute threshold is removed, so as to obtain an original filtered data set including the plurality of filtered grouped data.
[0075] In the embodiment of the present invention, since the sign of the data after the second derivative only indicates the trend direction, the calculation is facilitated by taking the absolute value, and the data with an absolute value less than a preset absolute threshold is removed from the original derivative grouped data to obtain the filtered grouped data.
[0076] S4. Sampling and screening the data in the original screening data set to obtain a standard screening data set.
[0077] In detail, the sampling and screening of the data in the original screening data set to obtain the standard screening data set includes:
[0078] Based on a preset sampling rate, each screening group data in the original screening data set is sampled in a random sampling manner to obtain a standard screening data set including a plurality of sampled group data.
[0079] In the embodiment of the present invention, the sampling rate can be any value between 0 and 1, where 0 means no sampling and 1 means full sampling. For example, if there are 100 data points in the filtered group data and the sampling rate is 40%, 40 data points are randomly sampled.
[0080] S5. Discretize the standard screening data set, generate an original business curve chart based on the discretized data, and perform image compression on the original business curve chart to obtain a standard business curve chart.
[0081] In the embodiment of the present invention, the discretization process refers to reducing the data accordingly without changing the relative size of the data. Since the curve is composed of a large number of data points, and the curve mainly shows the trend of changes between data, when the change (surge or drop) is obvious, using the original data for image drawing may occupy more memory and reduce the data processing speed. For example, the original data is 2000, and after discretization, it is 2.
[0082] Specifically, the discretization processing of the standard screening data set and generating an original business curve chart based on the discretized data includes:
[0083] Sorting the business data in the standard screening data set by size to obtain a second sorted data set;
[0084] removing duplicate data in the second sorted data set, and adding indexes to the data in the second sorted data set;
[0085] A coordinate system is constructed according to the time and the index, and the business data in the standard screening data set is mapped to the coordinate system to obtain the original business curve graph.
[0086] In the embodiment of the present invention, since there may be duplicate data in the business data of the standard screening data set, directly adding an index will result in different indexes for the same data. Therefore, the duplicate data is removed by sorting by size, and then the index is added. The index can be used to draw curve graphics directly later. For example, the standard screening data set includes {10, 5, 10, 15, 20}, and the second sorted data set after deduplication includes {5, 10, 15, 20}, and the corresponding indexes are {1, 2, 3, 4}. The index is used to replace the original data for curve drawing later, which can improve the data processing speed.
[0087] In the embodiment of the present invention, the image compression refers to storing and transmitting the image with as little data as possible. In most cases, the compressed image is not required to be exactly the same as the original image, but a small amount of distortion is allowed as long as the distortion is not noticeable by the human eye. The image compression methods of different formats are different. Taking the image in PNG format as an example, image compression includes two stages: Pre-analysis (Prediction): pre-processing the PNG image with differential encoding (Delta encoding), which makes it more convenient for subsequent compression; Compression (Compression): executing the Deflate compression algorithm, which combines the LZ77 compression algorithm and the Huffman coding algorithm to encode the image, reducing the memory occupancy and CPU usage.
[0088] In an optional embodiment of the present invention, a large amount of data is refined by data cleaning and data grouping, thereby improving data processing efficiency. At the same time, the quadratic derivation method is used to determine the change in the slope of the curve, thereby deleting a large number of non-critical points, so that the curve still conforms to the original trend after a large amount of compression. Finally, through sampling screening, discretization processing and image compression processing, the original trend chart is highly restored when the sampling rate is greatly reduced. When used on mobile devices, the memory and CPU usage are greatly reduced, thereby solving the problem of freezes when displaying curves on mobile devices.
[0089] The present invention refines a large amount of data by performing data cleaning and data grouping processing on the business data in the business data set, thereby improving data processing efficiency. At the same time, by adopting a derivation method, the change in the slope of the curve is determined, and a large number of non-critical points are deleted, so that the curve still conforms to the original trend after a large amount of compression. Finally, through sampling screening and image compression processing, the original trend chart is highly restored when the sampling rate is greatly reduced, the usage rate of memory and CPU is reduced, and there will be no phenomenon such as jamming due to excessive data volume, thereby improving the display quality of the curve image in the mobile device. Therefore, the curve image generation method proposed by the present invention can solve the problem of jamming when displaying the curve on a mobile device.
[0090] like Figure 2 , which is a functional module diagram of a curve image generating device provided by an embodiment of the present invention.
[0091] The curve image generating device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the curve image generating device 100 can include a data cleaning module 101, a data grouping module 102, a data screening module 103 and a curve image generating module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, which are stored in the memory of the electronic device.
[0092] In this embodiment, the functions of each module / unit are as follows:
[0093] The data cleaning module 101 is used to obtain a business data set, clean the business data in the business data set, and obtain a standard business data set;
[0094] The data grouping module 102 is used to perform data grouping processing on the standard service data set to obtain service grouping data;
[0095] The data screening module 103 is used to perform derivative screening on the service group data to obtain an original screening data set, and perform sampling screening on the data in the original screening data set to obtain a standard screening data set;
[0096] The curve image generation module 104 is used to discretize the standard screening data set, generate an original business curve graph based on the discretized data, and perform image compression on the original business curve graph to obtain a standard business curve graph.
[0097] In detail, the specific implementation of each module of the curve image generating device 100 is as follows:
[0098] Step 1: Acquire a business data set, perform data cleaning on the business data in the business data set, and obtain a standard business data set.
[0099] In the embodiment of the present invention, the business data set may be business data that changes with time (or other dimensions), such as stock market data, regional productivity data, and the like.
[0100] Specifically, the data cleaning of the business data in the business data set to obtain a standard business data set includes:
[0101] Sorting the business data in the business data set in chronological order to obtain a first sorted data set;
[0102] Data anomaly detection and data missing value detection are performed on the business data in the first sorted data set, and business data with abnormal detection data or missing values are eliminated to obtain the standard business data set.
[0103] In the embodiment of the present invention, since outliers or missing values do not have a particularly large impact on the overall curve trend when drawing a curve image, they can be directly eliminated. The missmap function can be used to detect whether there are missing values in the business data. If there are no missing values, no processing is performed. If there are missing values, they are eliminated. At the same time, the unilateral test method and the bilateral test method can be used to perform data anomaly detection on the business data. If there are no outliers, no processing is performed. If there are outliers, they are eliminated.
[0104] In an optional embodiment of the present invention, the one-sided test elimination includes minimum value one-sided test elimination and maximum value one-sided test elimination.
[0105] The calculation method for eliminating the minimum value single-side test elimination includes:
[0106]
[0107] Among them, G represents the test value, represents the average value of the data in the business data set, Y min Indicates the smallest data in the historical business data set. When G is greater than a preset test threshold, the smallest data is determined to be abnormal data.
[0108] The calculation method of the maximum value single-side test elimination includes:
[0109]
[0110] Among them, G represents the test value, represents the average value of the data in the historical business data set, Y max Indicates the largest data in the historical business data set. When G is greater than a preset test threshold, the largest data is determined to be abnormal data.
[0111] In the embodiment of the present invention, by performing data cleaning on business data, the data processing volume is reduced to a certain extent, and the data quality and data processing speed are improved.
[0112] Step 2: performing data grouping processing on the standard service data set to obtain service grouping data.
[0113] In the embodiment of the present invention, since the amount of data for drawing the curve is large, the processing speed will be reduced during data processing. The data processing speed can be increased by grouping.
[0114] Specifically, the step of performing data grouping processing on the standard service data set to obtain service grouping data includes:
[0115] Calculate the grouping interval of the data in the standard service data set according to the preset number of groups;
[0116] The standard service data set is grouped using the grouping interval to obtain the service grouping data.
[0117] In an optional embodiment of the present invention, the step of calculating the grouping interval of data in the standard service data set according to a preset number of groups includes:
[0118] The grouping interval of the data in the standard business data set is calculated using a preset grouping formula:
[0119]
[0120] Wherein, Width is the grouping interval, n is the preset number of groups, x max is the last data in the standard business data set sorted in chronological order, x minIt is the data that is first sorted in chronological order in the standard business data set.
[0121] In an optional embodiment of the present invention, taking the financial field as an example, assuming that there are 10,000 stock data, which are sorted by time and divided into 100 groups, the grouping interval is (10000-0) / 100.
[0122] Step three: perform derivative screening on the business group data to obtain an original screened data set.
[0123] In the example of the present invention, when drawing a curve using discrete points, the more discrete points there are, the better it can reflect the true situation of the curve. However, the problem caused by too many discrete points is that the amount of data that needs to be processed is too large, which is reflected in the specific device as a jam. In order to ensure that the trend of the data remains unchanged, the change in the slope of the curve is determined by the derivation method, thereby deleting a large number of non-critical points and improving the data processing speed.
[0124] In detail, the derivative screening of the service group data to obtain an original screening data set includes:
[0125] Performing secondary derivation on each group data in the service group data to obtain a plurality of derived group data;
[0126] Absolute value processing is performed on the data in the plurality of derivative grouped data, and data with absolute values less than a preset absolute threshold is removed, so as to obtain an original filtered data set including the plurality of filtered grouped data.
[0127] In the embodiment of the present invention, since the sign of the data after the second derivative only indicates the trend direction, the calculation is facilitated by taking the absolute value, and the data with an absolute value less than a preset absolute threshold is removed from the original derivative grouped data to obtain the filtered grouped data.
[0128] Step 4: Sampling and screening the data in the original screening data set to obtain a standard screening data set.
[0129] In detail, the sampling and screening of the data in the original screening data set to obtain the standard screening data set includes:
[0130] Based on a preset sampling rate, each screening group data in the original screening data set is sampled in a random sampling manner to obtain a standard screening data set including a plurality of sampled group data.
[0131] In the embodiment of the present invention, the sampling rate can be any value between 0 and 1, where 0 means no sampling and 1 means full sampling. For example, if there are 100 data points in the filtered group data and the sampling rate is 40%, 40 data points are randomly sampled.
[0132] Step 5: discretize the standard screening data set, generate an original business curve chart based on the discretized data, and perform image compression on the original business curve chart to obtain a standard business curve chart.
[0133] In the embodiment of the present invention, the discretization process refers to reducing the data accordingly without changing the relative size of the data. Since the curve is composed of a large number of data points, and the curve mainly shows the trend of changes between data, when the change (surge or drop) is obvious, using the original data for image drawing may occupy more memory and reduce the data processing speed. For example, the original data is 2000, and after discretization, it is 2.
[0134] Specifically, the discretization processing of the standard screening data set and generating an original business curve chart based on the discretized data includes:
[0135] Sorting the business data in the standard screening data set by size to obtain a second sorted data set;
[0136] removing duplicate data in the second sorted data set, and adding indexes to the data in the second sorted data set;
[0137] A coordinate system is constructed according to time and the index, and the business data in the standard screening data set is mapped to the coordinate system to obtain the original business curve graph.
[0138] In the embodiment of the present invention, since there may be duplicate data in the business data of the standard screening data set, directly adding an index will result in different indexes for the same data. Therefore, the duplicate data is removed by sorting by size, and then the index is added. The index can be used to draw curve graphics directly later. For example, the standard screening data set includes {10, 5, 10, 15, 20}, and the second sorted data set after deduplication includes {5, 10, 15, 20}, and the corresponding indexes are {1, 2, 3, 4}. The index is used to replace the original data for curve drawing later, which can improve the data processing speed.
[0139] In the embodiment of the present invention, the image compression refers to storing and transmitting the image with as little data as possible. In most cases, the compressed image is not required to be exactly the same as the original image, but a small amount of distortion is allowed as long as the distortion is not noticeable by the human eye. The image compression methods of different formats are different. Taking the image in PNG format as an example, image compression includes two stages: Pre-analysis (Prediction): pre-processing the PNG image with differential encoding (Delta encoding), which makes it more convenient for subsequent compression; Compression (Compression): executing the Deflate compression algorithm, which combines the LZ77 compression algorithm and the Huffman coding algorithm to encode the image, reducing the memory occupancy and CPU usage.
[0140] In an optional embodiment of the present invention, a large amount of data is refined by data cleaning and data grouping, thereby improving data processing efficiency. At the same time, the quadratic derivation method is used to determine the change in the slope of the curve, thereby deleting a large number of non-critical points, so that the curve still conforms to the original trend after a large amount of compression. Finally, through sampling screening, discretization processing and image compression processing, the original trend chart is highly restored when the sampling rate is greatly reduced. When used on mobile devices, the memory and CPU usage are greatly reduced, thereby solving the problem of freezes when displaying curves on mobile devices.
[0141] The present invention refines a large amount of data by performing data cleaning and data grouping processing on the business data in the business data set, thereby improving data processing efficiency. At the same time, by adopting a derivation method, the change in the slope of the curve is determined, and a large number of non-critical points are deleted, so that the curve still conforms to the original trend after a large amount of compression. Finally, through sampling screening and image compression processing, the original trend chart is highly restored when the sampling rate is greatly reduced, the usage rate of memory and CPU is reduced, and there will be no phenomenon such as jamming due to excessive data volume, thereby improving the display quality of the curve image in the mobile device. Therefore, the curve image generation device proposed by the present invention can solve the problem of jamming when displaying the curve on a mobile device.
[0142] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a curve image generating method provided by an embodiment of the present invention.
[0143] The electronic device may include a processor 10 , a memory 11 , a communication interface 12 , and a bus 13 , and may also include a computer program stored in the memory 11 and executable on the processor 10 , such as a curve image generating program.
[0144] Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the curve image generation program, but also can be used to temporarily store data that has been output or is to be output.
[0145] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as curve image generation programs, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device and process data.
[0146] The communication interface 12 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0147] The bus 13 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 13 may be divided into an address bus, a data bus, a control bus, etc. The bus 13 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0148] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0149] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0150] Furthermore, the electronic device may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.
[0151] Optionally, the electronic device may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0152] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0153] The curve image generation program stored in the memory 11 in the electronic device is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0154] Acquire a business data set, and perform data cleaning on the business data in the business data set to obtain a standard business data set;
[0155] Performing data grouping processing on the standard service data set to obtain service grouping data;
[0156] Performing derivative screening on the business group data to obtain an original screening data set;
[0157] Sampling and screening the data in the original screening data set to obtain a standard screening data set;
[0158] The standard screening data set is discretized, and an original business curve graph is generated based on the discretized data. The original business curve graph is image compressed to obtain a standard business curve graph.
[0159] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0160] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0161] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0162] Acquire a business data set, and perform data cleaning on the business data in the business data set to obtain a standard business data set;
[0163] Performing data grouping processing on the standard service data set to obtain service grouping data;
[0164] Performing derivative screening on the business group data to obtain an original screening data set;
[0165] Sampling and screening the data in the original screening data set to obtain a standard screening data set;
[0166] The standard screening data set is discretized, and an original business curve graph is generated based on the discretized data. The original business curve graph is image compressed to obtain a standard business curve graph.
[0167] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0168] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0170] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0171] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0172] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0173] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0174] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0175] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A curve image generation method, It is characterized in that The method comprises: Acquire a business data set, and perform data cleaning on the business data in the business data set to obtain a standard business data set; Performing data grouping processing on the standard service data set to obtain service grouping data; Performing secondary derivation on each group data in the service group data to obtain a plurality of derived group data, performing absolute value processing on the data in the plurality of derived group data, and removing data whose absolute value is less than a preset absolute threshold, to obtain an original screening data set including a plurality of screened group data; Sampling and screening the data in the original screening data set to obtain a standard screening data set; The standard screening data set is discretized, and an original business curve graph is generated based on the discretized data. The original business curve graph is image compressed to obtain a standard business curve graph.
2. The method for generating a curve image according to claim 1, It is characterized in that The step of performing data cleaning on the business data in the business data set to obtain a standard business data set includes: Sorting the business data in the business data set in chronological order to obtain a first sorted data set; Data anomaly detection and data missing value detection are performed on the business data in the first sorted data set, and business data with abnormal detection data or missing values are eliminated to obtain the standard business data set.
3. The method for generating a curve image as claimed in claim 2, It is characterized in that The step of performing data grouping processing on the standard service data set to obtain service grouping data includes: Calculate the grouping interval of the data in the standard service data set according to the preset number of groups; The standard service data set is grouped using the grouping interval to obtain the service grouping data.
4. The curve image generating method according to claim 3, It is characterized in that The calculating the grouping interval of the data in the standard service data set according to the preset number of groups includes: The grouping interval of the data in the standard business data set is calculated using a preset grouping formula: wherein, is the grouping interval, is the preset number of groups, is the data that is the last in chronological order in the standard service data set, is the data that is the first in chronological order in the standard service data set.
5. The curve image generating method according to claim 1, It is characterized in that The discretization processing of the standard screening data set and generating an original business curve chart based on the discretized data includes: Sorting the business data in the standard screening data set by size to obtain a second sorted data set; removing duplicate data in the second sorted data set, and adding indexes to the data in the second sorted data set; A coordinate system is constructed according to the time and the index, and the business data in the standard screening data set is mapped to the coordinate system to obtain the original business curve graph.
6. The curve image generating method according to claim 1, It is characterized in that The sampling and screening of the data in the original screening data set to obtain the standard screening data set includes: Based on a preset sampling rate, random sampling is used to sample each screening grouped data in the original screening data set, and a standard screening data set containing multiple sampled grouped data is obtained.
7. A curve image generation device for implementing the curve image generation method according to any one of claims 1-6, characterized in that the device includes: a data cleaning module for obtaining a business data set, cleaning the business data in the business data set, and obtaining a standard business data set; a data grouping module for performing data grouping processing on the standard business data set to obtain business grouped data; a data screening module for performing derivative screening on the business grouped data to obtain an original screening data set, and performing sampling screening on the data in the original screening data set to obtain a standard screening data set; a curve image generation module for performing discretization processing on the standard screening data set, generating an original business curve graph based on the discretized data, and compressing the original business curve graph to obtain a standard business curve graph.
8. An electronic device characterized in that the electronic device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the curve image generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the curve image generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Time-series data cleaning method for pipe net modeling
CN106649579A
Data asset unified management system based on enterprise data
CN113434487A