Industrial cloud application usage statistics analysis method
By installing Thrift components and an Elasticsearch database on the DDC server, the inconvenience of using the built-in statistical service system of the DDC server and the database pressure problem were solved, achieving efficient data transmission and querying while protecting user privacy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING WIT SCI & TECH CO LTD
- Filing Date
- 2023-06-29
- Publication Date
- 2026-05-29
Smart Images

Figure CN117149802B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a statistical analysis method for the usage of industrial cloud applications. Background Technology
[0002] A DDC server is a dedicated server for processing web applications, offering advantages such as high reliability, easy scalability, and secure control, providing enterprises with high-quality web services. In the digital age, with the increasing prevalence of internet-based office work, application usage has become a crucial factor influencing enterprise management and decision-making.
[0003] However, existing technologies have the following drawbacks:
[0004] 1. The statistical service system that comes with the DDC server is not convenient for enterprises to use their own management platform.
[0005] 2. When large-scale data is statistically analyzed in a database, it will increase the pressure on the database and reduce the efficiency of database queries.
[0006] 3. Data privacy issues: Statistics on cloud application usage usually require the collection and analysis of user data, which may involve sensitive information and personal privacy. Storing this information in the database may lead to data leakage or misuse. Summary of the Invention
[0007] The purpose of this invention is to address the shortcomings of existing technologies by proposing a statistical analysis method for the usage of industrial cloud applications.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: a method for statistical analysis of industrial cloud application usage, comprising the following steps:
[0009] S1. Obtain user data;
[0010] The user data includes: user account, user name, application name, application category, user full name, IP address, session type, current time, and application duration;
[0011] Specifically, it includes the following sub-steps:
[0012] S11. Install and start the Thrift component on the DDC server;
[0013] The DDC server is a virtual machine responsible for application deployment in the cloud platform architecture. User session information is displayed on this machine, which itself is a Windows system. The Thrift component is a remote scheduling component used for preliminary data filtering and circulation, playing a bridging role.
[0014] S12, The Thrift component calls a PowerShell script to retrieve user data;
[0015] PowerShell scripts use low-level Windows commands to capture user sessions on the DDC server, thereby obtaining user data.
[0016] After the PowerShell script is executed, it produces a data set, and PowerShell reads the contents of the set one by one.
[0017] The data set is a data structure that stores and manipulates data in the form of key-value pairs. The content of the data set is the user data to be obtained; the data format is optimized to facilitate data transmission and improve data transmission efficiency.
[0018] S13. After PowerShell obtains the user data, it returns the data set to the Thrift component via an HTTP request.
[0019] The Thrift component is installed on the DDC server, using the corresponding server login username and password. At the same time, the address of the Elasticsearch data is configured, and the Thrift component is given permission to log in as a service. This allows the Thrift component to automatically start and persist as a service following the server system, ensuring the accuracy of the retrieved data.
[0020] S2. Send user data to the Elasticsearch database.
[0021] After the Thrift component obtains the data set from step S1, it iterates through the data set according to the key value set by the developer to obtain the required data.
[0022] The filtered data is then packaged into a new set and sent to the Elasticsearch database via an HTTP request to improve database query efficiency.
[0023] By placing the data filtering work on the Thrift component side, the total amount of data in the database is saved, and the pressure on the database is reduced.
[0024] Set up data templates and accept data in S3 and Elasticsearch databases;
[0025] The data template sets all fields and field types of the user data in step S1;
[0026] Write data template creation statements using the syntax provided by the Elasticsearch database, and then execute them in the Elasticsearch database to generate the data templates.
[0027] Each data field in the data template receives the filtered new set of data sent in step S2 via an HTTP request, thereby improving the speed and accuracy of database queries.
[0028] Elasticsearch databases can be configured to retain data for a specified period. Once this period expires, the data used by the user application before the expiration date will be automatically deleted to prevent the system from crashing due to excessive data volume.
[0029] S4. The management platform acquires user data and displays the statistical results;
[0030] The management platform retrieves data by executing queries on the Elasticsearch database via HTTP requests, modifies the data format using Java syntax, formats the data obtained from the Elasticsearch database into the required format, and displays it graphically.
[0031] Some data, such as detailed user information, doesn't need to be stored in an Elasticsearch database, but the management platform may still need to display it in certain situations. In these cases, the management platform can directly call the Thrift component via an API to execute PowerShell commands to retrieve real-time data and display it on the page. This approach better protects user privacy and improves page response speed by asynchronously retrieving data.
[0032] The specific method is as follows: the management platform sends instructions to the Thrift component via an HTTP request. The Thrift component is written in C and executes a PowerShell script. The PowerShell script directly queries relevant information through Windows low-level commands and then returns this information to the management platform via an HTTP request.
[0033] Compared with existing technologies, the beneficial effects of this invention are as follows: The industrial cloud application usage statistical analysis method proposed in this invention uses the Thrift component as an intermediate component, treating it as a remote procedure call framework. It leverages the cross-language service of the Thrift component to bridge the transmission gap between Windows and Linux platforms, and can simultaneously support C and Java languages, overcoming the challenges of remote scheduling between different languages. Furthermore, this industrial cloud application usage statistical analysis method can save on the total amount of database data, reduce database pressure, and improve database query efficiency; at the same time, it also protects user privacy. Attached Figure Description
[0034] Figure 1 This is a flowchart of the steps of the present invention; Implementation
[0035] To provide a further understanding of the purpose, structure, features, and functions of the present invention, detailed descriptions are provided below with reference to specific embodiments.
[0036] A method for statistical analysis of industrial cloud application usage includes the following steps:
[0037] S1. Obtain user data;
[0038] The user data includes: user account, user name, application name, application category, user full name, IP address, session type, current time, and application duration;
[0039] Specifically, it includes the following sub-steps:
[0040] S11. Install and start the Thrift component on the DDC server;
[0041] The DDC server is a virtual machine responsible for application deployment in the cloud platform architecture. User session information is displayed on this machine, which itself is a Windows system. The Thrift component is a remote scheduling component used for preliminary data filtering and circulation, playing a bridging role.
[0042] S12, The Thrift component calls a PowerShell script to retrieve user data;
[0043] PowerShell scripts use low-level Windows commands to capture user sessions on the DDC server, thereby obtaining user data.
[0044] After the PowerShell script is executed, it produces a data set, and PowerShell reads the contents of the set one by one.
[0045] The data set is a data structure that stores and manipulates data in the form of key-value pairs. The content of the data set is the user data to be obtained; the data format is optimized to facilitate data transmission and improve data transmission efficiency.
[0046] S13. After PowerShell obtains the user data, it returns the data set to the Thrift component via an HTTP request.
[0047] The Thrift component is installed on the DDC server, using the corresponding server login username and password. At the same time, the address of the Elasticsearch database is configured, and the permission for the Thrift component to log in as a service is enabled. This allows the Thrift component to automatically start and persist as a service with the server system, ensuring the accuracy of the retrieved data.
[0048] S2. Send user data to the Elasticsearch database.
[0049] After the Thrift component obtains the data set from step S1, it iterates through the data set according to the key value set by the developer to obtain the required data.
[0050] For example, if the developer sets a "user" field, they can iterate through the dataset to find the record with the key "user".
[0051] After obtaining all the data, the selected data is packaged into a new set and sent to the Elasticsearch database via an HTTP request to improve the database's query efficiency.
[0052] By placing the data filtering work on the Thrift component side, the total amount of data in the database is saved, and the pressure on the database is reduced.
[0053] Set up data templates and accept data in S3 and Elasticsearch databases;
[0054] In Elasticsearch, an index, or data template, is created and fields are mapped to store data. The data template sets all fields and field types of the user data from step S1.
[0055] For example, the fields include uname, userrou, app, appcategory, userfulname, ipaddress, sessiontype, applicationsusedtimevuname, and time;
[0056] Here, uname corresponds to the user account, and the field type is keyword;
[0057] `userou` corresponds to the user's name, and the field type is keyword.
[0058] The app corresponds to the application name, and the field type is keyword;
[0059] appcategory corresponds to the application category, and the field type is keyword;
[0060] userfullname corresponds to the user's full name, and the field type is keyword;
[0061] The ipaddress field corresponds to the IP address and is of type keyword.
[0062] The sessiontype corresponds to the session type, and the field type is keyword.
[0063] applicationsusedtime corresponds to the application duration, and the field type is integer.
[0064] The time field corresponds to the current time and is of type date.
[0065] Write data template creation statements using the syntax provided by the Elasticsearch database, and then execute them in the Elasticsearch database to generate the data templates.
[0066] Each data field in the data template receives the filtered new set of data sent in step S2 via an HTTP request, thereby improving the speed and accuracy of database queries.
[0067] Elasticsearch databases can be configured to retain data for two years by default. After the retention period expires, user application data older than two years will be automatically deleted to prevent system crashes caused by excessive data volume.
[0068] S4. The management platform acquires user data and displays the statistical results;
[0069] The management platform executes queries on the Elasticsearch database via HTTP requests to retrieve data. It then modifies the data format using Java syntax, transforming the data obtained from the Elasticsearch database into the format required by the front end and displaying it graphically.
[0070] Some data, such as detailed user information, doesn't need to be stored in an Elasticsearch database, but the management platform may still need to display it in certain situations. In these cases, the management platform can directly call the Thrift component via an API to execute PowerShell commands to retrieve real-time data and display it on the page. This approach better protects user privacy and improves page response speed by asynchronously retrieving data.
[0071] The specific method is as follows: the management platform sends instructions to the Thrift component via an HTTP request. The Thrift component is written in C and executes a PowerShell script. The PowerShell script directly queries relevant information through Windows low-level commands and then returns this information to the management platform via an HTTP request.
[0072] The present invention has been described in the above-described embodiments; however, these embodiments are merely examples for implementing the present invention. It must be noted that the disclosed embodiments do not limit the scope of the present invention. Conversely, any modifications and refinements made without departing from the spirit and scope of the present invention are within the scope of patent protection of the present invention.
Claims
1. A method for statistical analysis of the usage of industrial cloud applications, characterized in that: Specifically, the following steps are included: S1. Obtain user data; The user data includes: user account, user name, application name, application category, user full name, IP address, session type, current time, and application duration; Specifically, it includes the following sub-steps: S11. Install and start the Thrift component on the DDC server; S12, The Thrift component calls a PowerShell script to retrieve user data; PowerShell scripts use low-level Windows commands to capture user sessions on the DDC server, thereby obtaining user data. After the PowerShell script is executed, it produces a data set, and PowerShell reads the contents of the set one by one. The data set is a data structure that stores and manipulates data in the form of key-value pairs, and the content in the data set is the user data to be obtained. S13. After PowerShell obtains the user data, it returns the data set to the Thrift component via an HTTP request. S2. Send user data to the Elasticsearch database; After obtaining the data set from step S1, the Thrift component iterates through the data set according to the key value set by the developer to obtain the required data. The filtered data is then packaged into a new collection and sent to the Elasticsearch database via an HTTP request. Set up data templates and accept data in S3 and Elasticsearch databases; The data template sets all fields and field types of the user data in step S1; Write data template creation statements using the syntax provided by the Elasticsearch database, and then execute them in the Elasticsearch database to generate the data templates. Each data field in the data template receives the filtered new set of data sent in step S2 via an HTTP request; S4. The management platform acquires user data and displays the statistical results; The management platform retrieves data by executing queries on the Elasticsearch database via HTTP requests, modifies the data format using the syntax provided by the Java language, formats the data obtained from the Elasticsearch database into the required data format, and displays it graphically.
2. The method for statistical analysis of industrial cloud application usage as described in claim 1, characterized in that: Some data does not need to be stored in an Elasticsearch database, but the management platform may still need to display it in certain situations. In such cases, the management platform can directly call the Thrift component via an API to execute PowerShell commands and retrieve real-time data to display on the page. Specifically, the management platform sends instructions to the Thrift component via an HTTP request, the Thrift component executes a PowerShell script, the PowerShell script directly queries relevant information using Windows underlying commands, and then returns this information to the management platform via an HTTP request.
3. The method for statistical analysis of industrial cloud application usage as described in claim 1, characterized in that: In step S1, installing the Thrift component on the DDC server requires a corresponding login username and password, and also requires configuring the address of the Elasticsearch database and enabling the Thrift component as a service login permission.
4. The method for statistical analysis of industrial cloud application usage as described in claim 1, characterized in that: In step S3, the Elasticsearch database sets the data retention time.