Data processing method and device, storage medium and electronic equipment
By using the sliding window algorithm on the terminal device to process business data and sending the calculation results to the cloud platform, the problem of high data processing bandwidth and high computing pressure in the cloud computing center is solved, improving data processing efficiency and saving costs.
Patent Information
- Application Number
- CN202410721649.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-03
AI Technical Summary
In the current Internet architecture, the data processing bandwidth cost of cloud computing centers is high, cloud computing pressure is high, and the computing power of smart device terminals is not fully utilized.
By acquiring business data in real time on the terminal device, using the sliding window algorithm with a preset time for calculation and processing, the initial calculation results are generated, accumulated and processed within the predetermined time, and finally the calculation results are sent to the cloud platform in the form of a report, reducing the burden on the cloud. Calculate pressure.
It realizes periodic statistical data processing through the computing power of the terminal device itself, reduces the computing pressure on the cloud, saves bandwidth costs, and improves data processing efficiency.
Smart Images

Figure CN118585299A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, applicable to the field of financial technology technology, and in particular to an edge computing data processing method, device, storage medium and electronic device. Background Art
[0002] The current Internet architecture system is: all online connected device terminals transmit data to the cloud platform and data processing center through the wide area network, and the cloud platform or data processing center receives the massive data sent by the device terminals, and calculates and processes the data to obtain the calculation results. Online connected device terminals can support functions such as shopping, social networking, interactive games, and resource transfer. The cloud platform can have functions such as applying for loans, credit cards, or purchasing insurance and financial products. The current network architecture system does not fully utilize the computing power of billions of smart device terminals, and the bandwidth cost is high and the cloud computing pressure is high. Summary of the invention
[0003] In view of this, the present invention provides a data processing method, device, storage medium and electronic device, the main purpose of which is to solve the current problems of high data processing bandwidth cost and high cloud computing pressure in cloud computing centers.
[0004] To solve the above problems, the present application provides a data processing method, comprising:
[0005] Acquire a plurality of service data of a target service in real time according to a first preset time length to obtain service data sets corresponding to the first preset time length;
[0006] Performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets;
[0007] When the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0008] The target calculation results are processed and sent to the target cloud platform in the form of a target report.
[0009] Optionally, the acquiring of a plurality of service data of a target service according to a first preset duration to obtain a service data set corresponding to each of the first preset durations specifically includes:
[0010] Monitor the target business, obtain a number of business data of the target business in real time according to the first predetermined time period, and obtain each initial business data set;
[0011] Based on a preset counter thread, each of the business data sets obtained by real-time monitoring is marked respectively to obtain each of the business data sets containing a time identifier.
[0012] Optionally, the performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets specifically includes:
[0013] Performing calculation processing on the data in the first business data set based on the first preset calculation thread to obtain an initial calculation result corresponding to the first business data set;
[0014] Compare the sum of the current first preset time length with the second preset time length to obtain a comparison result;
[0015] When the comparison result is that the sum of the current first preset time lengths is less than the second preset time length, the data in the second business data set is calculated and processed in the order of the time identifiers based on the second preset calculation thread to obtain an initial calculation result corresponding to the second business data set, until the sum of each of the first preset time lengths is equal to the second preset time length, and the initial calculation result corresponding to each of the business data sets is calculated.
[0016] Optionally, the performing calculation processing on the data in the first business data set based on the first preset calculation thread to obtain an initial calculation result corresponding to the first business data set specifically includes:
[0017] Determine the return code identifier corresponding to each business data in the first business data set;
[0018] The number of requests corresponding to the target return code identifier of the target business is calculated based on the first preset computing thread to obtain an initial computing result corresponding to the first business data set.
[0019] Optionally, when the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period specifically includes:
[0020] Determining the number of requests included in each of the initial calculation results;
[0021] Accumulative calculation processing is performed based on the number of requests to obtain a target calculation result corresponding to the second predetermined time length.
[0022] Optionally, performing data processing on the target calculation result and sending it to the target cloud platform in a target report manner specifically includes:
[0023] Determining a target report generation template for outputting a target data processing report based on each report generation template;
[0024] Generate a target data processing report of the target calculation result based on the target report generation template;
[0025] The target data processing report is sent to the target cloud platform.
[0026] Optionally, generating a target data processing report of the target calculation result based on the target report generation template specifically includes:
[0027] Create a report name for the target data processing report;
[0028] The target calculation result is matched to the target report generation template with the parameter information corresponding to the report name to obtain the target data processing report.
[0029] In order to solve the above problems, the present application provides a data processing device, comprising:
[0030] An acquisition module: used for acquiring a number of service data of a target service in real time according to a first preset duration, so as to obtain each service data set corresponding to the first preset duration;
[0031] A first calculation module: used for performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets;
[0032] A second calculation module: configured to, when the sum of the first predetermined time periods is equal to the second predetermined time period, perform calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0033] Data processing module: used to process the target calculation results and send them to the target cloud platform in the form of target reports.
[0034] To solve the above problems, the present application provides a storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned edge computing data processing method are implemented.
[0035] To solve the above problems, the present application provides an electronic device, which includes at least a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned edge computing data processing method when executing the computer program on the memory.
[0036] This application obtains several business data of the target business in real time according to the first preset time length to obtain each business data set corresponding to the first preset time length; performs calculation processing on each of the business data sets based on each preset calculation thread to obtain the initial calculation result corresponding to each of the business data sets; when the sum of each of the first preset time lengths is equal to the second preset time length, performs calculation processing based on each of the initial calculation results to obtain the target calculation result corresponding to the second preset time length; performs data processing on the target calculation result and sends it to the target cloud platform in the form of a target report. The data processing method of this application can be applied to various terminal devices, and the calculation of periodic statistical data is realized through the computing power of the terminal device itself. What is sent to the cloud is the calculated result, which improves the computing performance of large distributed systems in the Internet and the Internet of Things as a whole, relieves the computing pressure of the cloud platform, saves bandwidth costs, and improves data processing efficiency.
[0037] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0039] Figure 1 A schematic diagram of a data processing method provided in an embodiment of the present application is shown;
[0040] Figure 2 A schematic diagram showing a flow chart of a data processing method provided by another embodiment of the present application is shown;
[0041] Figure 3 A structural block diagram of a data processing device provided in yet another embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0043] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0044] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0045] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0046] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0047] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0048] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0049] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0050] The present application embodiment provides a data processing method, such as Figure 1 As shown, including:
[0051] Step S101: acquiring a number of service data of a target service in real time according to a first preset duration, so as to obtain service data sets corresponding to the first preset duration;
[0052] In the specific implementation of this step, the business data may be payment data, transaction data and other data. The target business is monitored, and several business data of the target business are obtained in real time according to the first predetermined time to obtain each initial business data set; based on the preset counter thread, each business data set obtained by real-time monitoring is marked to obtain each business data set containing a time identifier. The first preset time can be 1s, 2s, etc. This application does not limit the first preset time. This application uses a preset sliding window algorithm to achieve periodic data statistics. For example, when 5s is a cycle, the business data counted within a cycle, i.e. 5s, is calculated and processed and sent to the cloud platform. The first predetermined time can be set to 1s, and the sliding window algorithm is used to obtain 5 business data sets corresponding to the first preset time. The sliding window algorithm can be used to solve the problem of sub-elements of arrays or strings; the sliding window algorithm can convert the nested loop problem into a single loop problem, thereby reducing the time complexity.
[0053] Step S102: performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets;
[0054] During the specific implementation of this step, the data of each of the first data sets can be queried in a polling manner using a computing thread pool, so as to perform computational processing on the data of each of the first data sets. Specifically, the data in the first business data set is computed and processed based on the first preset computing thread to obtain an initial computational result corresponding to the first business data set; the sum of the current first preset time length is compared with the second preset time length to obtain a comparison result; when the comparison result is that the sum of the current first preset time length is less than the second preset time length, the data in the second business data set is computed and processed in the order of the time identifiers based on the second preset computing thread to obtain an initial computational result corresponding to the second business data set; until the sum of the first preset time lengths is equal to the second preset time length, computational processing is performed based on each of the initial computational results to obtain a target computational result corresponding to the second preset time length.
[0055] Step S103: when the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0056] In the specific implementation process of this step, the number of requests included in each of the initial calculation results is determined; based on each of the request numbers, a cumulative calculation process is performed to obtain a target calculation result corresponding to the second preset duration. Specifically, for a preset return code corresponding to the target business, the number of requests corresponding to the preset return code is obtained, and the number of requests corresponding to each of the first preset durations is cumulatively calculated to obtain a target calculation result corresponding to the second preset duration.
[0057] Step S104: Process the target calculation result and send it to the target cloud platform in the form of a target report.
[0058] In the specific implementation process of this step, a target report generation template for outputting a target data processing report is determined based on each report generation template; a target data processing report of the target calculation result is generated based on the target report generation template; and the target data processing report is sent to the target cloud platform. Specifically, the report generation template can be in the form of: KafkaReport (distributed data processing platform report), Logger Report (log record report), Http Report (hypertext transfer protocol report), Subscribe Report (subscription report), etc. This application can perform data processing on the target calculation result based on the report generation mode selected by the user to generate a target data processing report and send it to the target cloud platform.
[0059] This application obtains several business data of the target business in real time according to the first preset time length to obtain each business data set corresponding to the first preset time length; performs calculation processing on each of the business data sets based on each preset calculation thread to obtain the initial calculation result corresponding to each of the business data sets; when the sum of each of the first preset time lengths is equal to the second preset time length, performs calculation processing based on each of the initial calculation results to obtain the target calculation result corresponding to the second preset time length; performs data processing on the target calculation result and sends it to the target cloud platform in the form of a target report. The data processing method of this application can be applied to various terminal devices, and the calculation of periodic statistical data is realized through the computing power of the terminal device itself. What is sent to the cloud is the calculated result, which improves the computing performance of large distributed systems in the Internet and the Internet of Things as a whole, relieves the computing pressure of the cloud platform, saves bandwidth costs, and improves data processing efficiency.
[0060] Another embodiment of the present application provides a data processing method, such as Figure 2 As shown, including:
[0061] Step S201: acquiring a number of service data of a target service in real time according to a first preset duration, so as to obtain service data sets corresponding to the first preset duration;
[0062] In the specific implementation process of this step, the target business is monitored, and several business data of the target business are obtained in real time according to the first preset time length to obtain each initial business data set; the first preset time length can be 1S, 2s, 5ms, etc., and this application does not limit the first preset time length. Based on the preset counter thread, each of the business data sets obtained by real-time monitoring is marked to obtain each of the business data sets containing a time mark. The preset counter thread is CounterThread, and the monitoring data falls into the corresponding initial business data set according to the timestamp produced in real time to mark each of the initial business data sets to obtain each of the business data sets containing a time mark. This application adopts a preset sliding window algorithm to achieve periodic data statistics. For example, when 10s is a cycle, the business data counted in a cycle, i.e. 10s, is calculated and processed and sent to the cloud platform. When the first preset time length is set to 2s, the sliding window algorithm is used to obtain 5 business data sets corresponding to the first preset time length. The sliding window algorithm can be used to solve the problem of sub-elements of arrays or strings; the sliding window algorithm can convert the nested loop problem into a single loop problem, thereby reducing the time complexity.
[0063] Step S202: performing calculation processing on the data in the first business data set based on the first preset calculation thread to obtain an initial calculation result corresponding to the first business data set;
[0064] In the specific implementation process of this step, the data of each business data set can be queried by polling the computing thread pool to perform computational processing on the data of each business data set. Specifically, the data in the first business data set whose time stamp is ranked first is computed and processed based on the first preset computing thread in the computing thread pool to obtain the initial computational result corresponding to the first business data set. Determine the return code identifier corresponding to each business data in the first business data set; calculate the number of requests corresponding to the target return code identifier of the target business based on the first preset computing thread to obtain the initial computational result corresponding to the first business data set.
[0065] Step S203: Compare the sum of the current first preset time length with the second preset time length to obtain a comparison result;
[0066] In the specific implementation of this step, the second preset time length is a predefined periodic statistical time. For example, when the periodic statistical time is set to 10s and the first preset time length is set to 2s, when the sum of the current first preset time lengths is equal to 2 and the periodic statistical time is 10s, the comparison result is that the sum of the first preset time lengths is less than the second preset time length; when the business data of the fifth first preset time length is currently acquired, the sum of the current first preset time lengths is 2*5=10s, and the periodic statistical time is 10s, then the result is that the sum of the current first preset time lengths is equal to the second preset time length.
[0067] Step S204: when the comparison result is that the sum of the current first preset time lengths is less than the second preset time length, the data in the second business data set is calculated and processed according to the sequence of the time identifiers based on the second preset calculation thread to obtain an initial calculation result corresponding to the second business data set, until the sum of the first preset time lengths is equal to the second preset time length, and the initial calculation result corresponding to each of the business data sets is calculated and obtained;
[0068] During the specific implementation of this step, when the comparison result is that the sum of the current first preset time lengths is less than the second preset time length, the data in the second business data set whose time identifier of each business data set ranks second is calculated and processed based on the second preset calculation thread in the calculation thread pool to obtain an initial calculation result corresponding to the second business data set; and so on until the sum of the first preset time lengths is equal to the second preset time length, the last business data set in the current calculation cycle is calculated and processed to obtain the initial calculation result corresponding to the last business data set.
[0069] Step S205: when the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0070] In the specific implementation process of this step, the number of requests included in each of the initial calculation results is determined; based on each of the request numbers, a cumulative calculation process is performed to obtain a target calculation result corresponding to the second preset duration. Specifically, for a preset return code corresponding to the target business, the number of requests corresponding to the preset return code is obtained, and the number of requests corresponding to each of the first preset durations is cumulatively calculated to obtain a target calculation result corresponding to the second preset duration.
[0071] Step S206: determining a target report generation template for outputting a target data processing report based on each report generation template;
[0072] In the specific implementation process of this step, the report generation template can be in the form of: Kafka Report (distributed data processing platform report), Logger Report (logging report), Http Report (Hypertext Transfer Protocol report), Subscribe Report (subscription report), etc., and the target template can be selected from each of the templates according to actual needs, for example: determine the Kafka Report report template as the target report generation template, etc.
[0073] Step S207: generating a target data processing report of the target calculation result based on the target report generation template;
[0074] In the specific implementation process of this step, a report name for the target data processing report is created; the target calculation result is matched to the target report generation template with the parameter information corresponding to the report name to obtain the target data processing report. For example: in the application scenario of an e-commerce shopping website, the second preset time is set to 5s, the first preset time is set to 1s, and when the user adds a cart, the number of requests with a system return code of "5xx" is calculated. With a 1s accumulation window, the second-level statistical results are output to the cloud computing center every 5s with the name value corresponding to the custom report name through the target report template KafkaReport function module to achieve periodic statistics of data.
[0075] Step S208: Send the target data processing report to the target cloud platform.
[0076] In the specific implementation process of this step, the target data processing report is sent to the target cloud platform, and the transmission to the remote cloud computing center is a calculation result, rather than a large amount of collected data, which reduces the computing pressure on the cloud and improves data processing efficiency. The method of this application can allow any smart device to directly rely on its own development system in the form of SDK, and can directly call the interface of the development system of this method or use this technical method to implement independent functional modules and embed them into various smart devices in the form of plug. The method in this application is suitable for the calculation of statistical data of any period.
[0077] The present application obtains a number of business data of a target business in real time according to a first preset time length to obtain a business data set corresponding to each of the first preset time lengths; performs calculation processing on the data in the first business data set based on a first preset calculation thread to obtain an initial calculation result corresponding to the first business data set; compares the sum of the current first preset time length with the second preset time length to obtain a comparison result; when the comparison result is that the sum of the current first preset time length is less than the second preset time length, performs calculation processing on the data in the second business data set in the order of time identifiers based on a second preset calculation thread to obtain an initial calculation result corresponding to the second business data set, until the sum of each of the first preset time lengths is equal to the second preset time length, the initial calculation result corresponding to each of the business data sets is calculated; when the sum of each of the first preset time lengths is equal to the second preset time length, performs calculation processing based on each of the initial calculation results to obtain a target calculation result corresponding to the second preset time length; determines a target report generation template for outputting a target data processing report based on each report generation template; generates a target data processing report of the target calculation result based on the target report generation template; and sends the target data processing report to a target cloud platform. The method of the present application can realize edge computing, and use the computing power of smart terminals to calculate and process business data, thereby reducing the computing pressure on the cloud, saving bandwidth costs, and improving data processing efficiency.
[0078] Another embodiment of the present application provides a data processing device, such as Figure 3 As shown, including:
[0079] Acquisition module 1: used to acquire a number of service data of a target service in real time according to a first preset duration, so as to obtain each service data set corresponding to the first preset duration;
[0080] The first calculation module 2 is used to perform calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets;
[0081] A second calculation module 3 is configured to, when the sum of the first predetermined time periods is equal to the second predetermined time period, perform calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0082] Data processing module 4: used to process the target calculation results and send them to the target cloud platform in the form of target reports.
[0083] During the specific implementation process, the acquisition module 1 is specifically used to: monitor the target business, obtain a number of business data of the target business in real time according to the first predetermined time period, and obtain each initial business data set; based on the preset counter thread, mark each business data set obtained by real-time monitoring, and obtain each business data set containing a time identifier.
[0084] During the specific implementation process, the first calculation module 2 is specifically used to: calculate and process the data in the first business data set based on the first preset calculation thread to obtain an initial calculation result corresponding to the first business data set; compare the sum of the current first preset time length with the second preset time length to obtain a comparison result; when the comparison result is that the sum of the current first preset time length is less than the second preset time length, calculate and process the data in the second business data set in the order of time identifiers based on the second preset calculation thread to obtain an initial calculation result corresponding to the second business data set, until when the sum of each of the first preset time lengths is equal to the second preset time length, the initial calculation result corresponding to each of the business data sets is calculated and obtained.
[0085] During the specific implementation process, the first computing module 2 is also used to: determine the return code identifier corresponding to each business data in the first business data set; calculate the number of requests corresponding to the target return code identifier of the target business based on the first preset computing thread, and obtain the initial calculation result corresponding to the first business data set.
[0086] In the specific implementation process, the second calculation module 3 is specifically used to: determine the number of requests included in each of the initial calculation results; perform cumulative calculation processing based on each of the request numbers to obtain a target calculation result corresponding to the second predetermined time length.
[0087] During the specific implementation process, the data processing module 4 is specifically used to: determine a target report generation template for outputting a target data processing report based on each report generation template; generate a target data processing report of the target calculation result based on the target report generation template; and send the target data processing report to the target cloud platform.
[0088] In the specific implementation process, the data processing module 4 is also used to: create a report name for the target data processing report; match the target calculation result with the parameter information corresponding to the report name to the target report generation template to obtain the target data processing report.
[0089] This application obtains several business data of the target business in real time according to the first preset time length to obtain each business data set corresponding to the first preset time length; performs calculation processing on each of the business data sets based on each preset calculation thread to obtain the initial calculation result corresponding to each of the business data sets; when the sum of each of the first preset time lengths is equal to the second preset time length, performs calculation processing based on each of the initial calculation results to obtain the target calculation result corresponding to the second preset time length; performs data processing on the target calculation result and sends it to the target cloud platform in the form of a target report. The data processing method of this application can be applied to various terminal devices, and the calculation of periodic statistical data is realized through the computing power of the terminal device itself. What is sent to the cloud is the calculated result, which improves the computing performance of large distributed systems in the Internet and the Internet of Things as a whole, relieves the computing pressure of the cloud platform, saves bandwidth costs, and improves data processing efficiency.
[0090] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:
[0091] Step 1: acquiring a number of service data of a target service in real time according to a first preset time period, so as to obtain service data sets corresponding to the first preset time period;
[0092] Step 2: performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets;
[0093] Step 3: when the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0094] Step 4: Process the target calculation results and send them to the target cloud platform in the form of a target report.
[0095] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0096] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0097] The specific implementation process of the above method steps can refer to the embodiments of any of the above data processing methods, and this embodiment will not be repeated here.
[0098] This application obtains several business data of the target business in real time according to the first preset time length to obtain each business data set corresponding to the first preset time length; performs calculation processing on each of the business data sets based on each preset calculation thread to obtain the initial calculation result corresponding to each of the business data sets; when the sum of each of the first preset time lengths is equal to the second preset time length, performs calculation processing based on each of the initial calculation results to obtain the target calculation result corresponding to the second preset time length; performs data processing on the target calculation result and sends it to the target cloud platform in the form of a target report. The data processing method of this application can be applied to various terminal devices, and the calculation of periodic statistical data is realized through the computing power of the terminal device itself. What is sent to the cloud is the calculated result, which improves the computing performance of large distributed systems in the Internet and the Internet of Things as a whole, relieves the computing pressure of the cloud platform, saves bandwidth costs, and improves data processing efficiency.
[0099] Another embodiment of the present application provides an electronic device, which may be a server, and the electronic device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the electronic device program is executed by the processor, it implements a function or step on the server side of a data processing method.
[0100] In one embodiment, an electronic device is provided, which may be a client. The electronic device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external server via a network connection. When the electronic device program is executed by the processor, a function or step on the client side of a processing method is implemented.
[0101] Another embodiment of the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the following method steps when executing the computer program in the memory:
[0102] Step 1: acquiring a number of service data of a target service in real time according to a first preset time period, so as to obtain service data sets corresponding to the first preset time period;
[0103] Step 2: performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets;
[0104] Step 3: when the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period;
[0105] Step 4: Process the target calculation results and send them to the target cloud platform in the form of a target report.
[0106] The specific implementation process of the above method steps can refer to the embodiments of any of the above data processing methods, and this embodiment will not be repeated here.
[0107] This application obtains several business data of the target business in real time according to the first preset time length to obtain each business data set corresponding to the first preset time length; performs calculation processing on each of the business data sets based on each preset calculation thread to obtain the initial calculation result corresponding to each of the business data sets; when the sum of each of the first preset time lengths is equal to the second preset time length, performs calculation processing based on each of the initial calculation results to obtain the target calculation result corresponding to the second preset time length; performs data processing on the target calculation result and sends it to the target cloud platform in the form of a target report. The data processing method of this application can be applied to various terminal devices, and the calculation of periodic statistical data is realized through the computing power of the terminal device itself. What is sent to the cloud is the calculated result, which improves the computing performance of large distributed systems in the Internet and the Internet of Things as a whole, relieves the computing pressure of the cloud platform, saves bandwidth costs, and improves data processing efficiency.
[0108] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: Acquire a plurality of service data of a target service in real time according to a first preset time length to obtain service data sets corresponding to the first preset time length; Performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets; When the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period; The target calculation results are processed and sent to the target cloud platform in the form of a target report.
2. The method according to claim 1, characterized in that The acquiring of a plurality of service data of the target service according to the first preset duration to obtain a service data set corresponding to each of the first preset durations specifically includes: Monitor the target business, obtain a number of business data of the target business in real time according to the first predetermined time period, and obtain each initial business data set; Based on a preset counter thread, each of the business data sets obtained by real-time monitoring is marked respectively to obtain each of the business data sets containing a time identifier.
3. The method according to claim 1, characterized in that The performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets specifically includes: Performing calculation processing on the data in the first business data set based on the first preset calculation thread to obtain an initial calculation result corresponding to the first business data set; Compare the sum of the current first preset time length with the second preset time length to obtain a comparison result; When the comparison result is that the sum of the current first preset time lengths is less than the second preset time length, the data in the second business data set is calculated and processed in the order of the time identifiers based on the second preset calculation thread to obtain an initial calculation result corresponding to the second business data set, until the sum of each of the first preset time lengths is equal to the second preset time length, and the initial calculation result corresponding to each of the business data sets is calculated.
4. The method according to claim 3, characterized in that The step of performing calculation processing on the data in the first business data set based on the first preset calculation thread to obtain an initial calculation result corresponding to the first business data set specifically includes: Determine the return code identifier corresponding to each business data in the first business data set; The number of requests corresponding to the target return code identifier of the target business is calculated based on the first preset computing thread to obtain an initial computing result corresponding to the first business data set.
5. The method according to claim 1, characterized in that When the sum of the first predetermined time periods is equal to the second predetermined time period, performing calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period specifically includes: Determining the number of requests included in each of the initial calculation results; Accumulative calculation processing is performed based on the number of requests to obtain a target calculation result corresponding to the second predetermined time length.
6. The method according to claim 1, characterized in that The target calculation result is processed and sent to the target cloud platform in the form of a target report, specifically including: Determining a target report generation template for outputting a target data processing report based on each report generation template; Generate a target data processing report of the target calculation result based on the target report generation template; The target data processing report is sent to the target cloud platform.
7. The method according to claim 6, characterized in that The step of generating a target data processing report of the target calculation result based on the target report generation template specifically includes: Create a report name for the target data processing report; The target calculation result is matched to the target report generation template with the parameter information corresponding to the report name to obtain the target data processing report.
8. A data processing device, characterized in that: include: An acquisition module: used for acquiring a number of service data of a target service in real time according to a first preset duration, so as to obtain each service data set corresponding to the first preset duration; A first calculation module: used for performing calculation processing on each of the business data sets based on each preset calculation thread to obtain an initial calculation result corresponding to each of the business data sets; A second calculation module: configured to, when the sum of the first predetermined time periods is equal to the second predetermined time period, perform calculation processing based on the initial calculation results to obtain a target calculation result corresponding to the second predetermined time period; Data processing module: used to process the target calculation results and send them to the target cloud platform in the form of target reports.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the edge computing data processing method described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: At least includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the edge computing data processing method described in any one of claims 1 to 7 when executing the computer program on the memory.
