Data analysis method and device and nonvolatile storage medium
By acquiring and processing target data in data analysis and packaging it to multiple receiving terminals, efficient collaborative data analysis between multiple users is achieved, and the problems of inefficiency and high communication costs in the prior art are solved.
Patent Information
- Application Number
- CN202411728923.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-15
AI Technical Summary
It is difficult for the prior art to conduct efficient and coordinated data analysis among multiple users, especially in industrial data analysis scenarios. Multiple fields experts are inefficient in collaborative analysis and communication and discussion, and the results are not good.
By obtaining the target data to be analyzed, performing visual analysis, collecting label information, generating new target data, and packaging it to multiple receiving terminals. The receiving terminal unpacks and updates the data analysis screen and labeling information to realize dynamic transmission and labeling of the data analysis screen.
It realizes efficient and collaborative data analysis among multiple users, improves the efficiency and effectiveness of data analysis, and solves the problems of inefficiency and high communication costs in traditional methods.
Smart Images

Figure CN119829639A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis, and in particular, to a method, device and non-volatile storage medium for data analysis. Background Art
[0002] As the value of data becomes increasingly prominent, especially the data generated in real time by process industrial production equipment contains a large amount of production process information, which is of great value to enterprise quality control, equipment failure prediction, and production efficiency improvement. It is particularly important to provide a set of fast and efficient data analysis tools based on massive time series data. The traditional data analysis method is to provide a set of data analysis tools or work interfaces for a data scientist or process analysis engineer of the enterprise to conduct self-service analysis. The entire analysis process cannot be carried out by multiple people online, and there are problems such as low efficiency and high communication costs. There is a lack of a data analysis method for efficient collaboration between multiple users. However, many industrial data analysis scenarios, such as production efficiency, equipment maintenance, quality control, etc., often require multiple experts in the field to conduct collaborative analysis and communication and discussion. At present, they often adopt methods such as taking screenshots of data comparison trends and making static text annotations or telephone communication (calling data according to instructions while communicating), which is inefficient and ineffective. Further, there are also ways to provide sharing (Uniform Resource Locator URL or PDF) or analysis reports (often in PDF format), but there is still a problem that the analysis screen cannot be dynamically transmitted and annotated between multiple users.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method, device and non-volatile storage medium for data analysis to at least solve the technical problem in the related art that efficient and collaborative data analysis cannot be achieved among multiple users when performing data analysis.
[0005] According to one aspect of an embodiment of the present application, a method for data analysis is provided, including: obtaining first target data to be analyzed; analyzing the first target data in a visual manner to obtain a data analysis screen, collecting annotation information during the analysis process, and generating second target data based on the data analysis screen and the annotation information; packaging the second target data to obtain a first data packet, and sending the first data packet to multiple receiving terminals; receiving a second data packet sent by the first receiving terminal and unpacking it, wherein the second data packet is a data packet after the data analysis screen and annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
[0006] In some embodiments of the present application, the first target data is analyzed in a visual manner to obtain a data analysis screen, and annotation information is collected during the analysis process, and the second target data is generated based on the data analysis screen and the annotation information, including: analyzing the first target data in a visual manner to obtain a data analysis screen, wherein the visualization method includes at least one of the following: a trend chart, a bar chart, a scatter plot, the data analysis screen is used to visualize static data or dynamic data, the static data is the first target data within a first preset time period, and the dynamic data is the first target data within a second preset time period, the data analysis screen allows the receiving terminal to perform annotations and generate annotation information; the data analysis screen is encapsulated into the first target data to obtain the second target data.
[0007] In some embodiments of the present application, the second target data is packaged to obtain a first data packet, including: when the analysis screen in the second target data is used to visualize static data, the second target data within a first preset time period is packaged into a JSON data packet, and the JSON data packet is determined as a first data packet, wherein the start time and end time of the first preset time period are both preset; when the analysis screen in the second target data is used to visualize dynamic data, the second target data within a second preset time period is packaged into a JSON data packet, and the JSON data packet is determined as a first data packet, wherein the start time of the second preset time period is preset, and the end time of the second preset time period is the time indicated by the timestamp of the packaging moment.
[0008] In some embodiments of the present application, a second data packet sent by a first receiving terminal is received and unpacked, including: when the data analysis screen in the second data packet is used to visualize static data, the second data packet is unpacked, and the data in the second data packet within a first preset time period is analyzed in a visual manner to obtain a first data analysis screen and first annotation information; when the data analysis screen in the second data packet is used to visualize dynamic data, the second data packet is unpacked, and the data in the second data packet within a third preset time period is analyzed in a visual manner to obtain a second data analysis screen and second annotation information, wherein the start time of the third preset time period is the start time of the second preset time period, the end time of the third preset time period is the end time of the fourth preset time period, the start time of the fourth preset time period is the end time of the second preset time period, and the end time of the fourth preset time period is the time indicated by the timestamp of the moment when the second data packet is unpacked.
[0009] In some embodiments of the present application, the method also includes: storing the second data packet in a local storage device and an external server respectively to obtain an archive file, wherein the archive file is used to store the second data packet; when obtaining the archive file, sending an archive file identifier to the external server, wherein the archive file identifier is used to obtain version number information of the archive file; when the version number information is the same as the version number information of the archive file stored in the local storage device, obtaining the archive file from the local storage device; when the version number information is different from the version number information of the archive file stored in the local storage device, obtaining the archive file from the external server and updating the archive file in the local storage device.
[0010] In some embodiments of the present application, the method also includes: determining the data structure of the data in the unpacked JSON data packet, wherein the data structure includes at least an analysis topic, a data trend set, and annotation information, wherein the data trend set includes at least: a position number name, a start and end time, data, a quality code, a trend line color, a line type, a line width, a horizontal title note, and a vertical title note; analyzing the content of the data structure in a visual manner to obtain a data analysis screen.
[0011] According to another aspect of an embodiment of the present application, a data analysis method is also provided, including: a first receiving terminal receives a third data packet sent by a sending terminal or a second receiving terminal; unpacking the third data packet; updating a data analysis screen and annotation information of the unpacked third data packet to obtain a fourth data packet; and packaging the fourth data packet and sending it to a third receiving terminal or a sending terminal.
[0012] In some embodiments of the present application, the third data packet includes a header, a body and a trailer, wherein the header includes a subject, a creation date, a creator, a version number and a bit number name set, the bit number name set is used for permission verification, the body includes a historical data type, and the trailer includes a checksum for data integrity verification.
[0013] In some embodiments of the present application, before unpacking the third data packet, the method also includes: obtaining a bit number name set in the packet header of the third data packet; verifying whether the bit number name set satisfies the access rights; and unpacking the third data packet if the bit number name set satisfies the access rights.
[0014] According to another aspect of an embodiment of the present application, a data analysis device is also provided, including: an acquisition module, used to acquire first target data to be analyzed; an analysis module, used to analyze the first target data in a visual manner, obtain a data analysis screen, and collect annotation information during the analysis process, and generate second target data based on the data analysis screen and the annotation information; a sending module, used to package the second target data to obtain a first data packet, and send the first data packet to multiple receiving terminals; a receiving module, used to receive and unpack a second data packet sent by the first receiving terminal, wherein the second data packet is a data packet after the data analysis screen and annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
[0015] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, in which a program is stored, wherein when the program is executed, a device where the non-volatile storage medium is located is controlled to execute the above-mentioned data analysis method.
[0016] According to another aspect of an embodiment of the present application, there is further provided an electronic device, comprising: a memory and a processor, wherein the processor is configured to run a program stored in the memory, wherein the program executes the above-mentioned data analysis method when running.
[0017] According to another aspect of an embodiment of the present application, a computer program product is also provided, including computer instructions, which implement the above-mentioned data analysis method when executed by a processor.
[0018] In the embodiment of the present application, the first target data to be analyzed is obtained; the first target data is analyzed in a visual manner to obtain a data analysis screen, and the annotation information in the analysis process is collected, and the second target data is generated according to the data analysis screen and the annotation information; the second target data is packaged to obtain a first data packet, and the first data packet is sent to multiple receiving terminals; the second data packet sent by the first receiving terminal is received and unpacked, wherein the second data packet is a data packet after the data analysis screen and the annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet. By adopting the method of obtaining the first target data to be analyzed; analyzing the first target data in a visual manner to obtain a data analysis screen, and collecting the annotation information in the analysis process. Thus, the first target data is obtained, the first target data is packaged and sent to at least one receiving device, and the second data packet returned by the last receiving device is received, so as to achieve the purpose of sending data to multiple terminal devices during data analysis, so that multiple users can perform efficient collaborative data analysis, thereby solving the technical problem of data analysis that cannot achieve efficient collaboration between multiple users during data analysis in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing a method for data analysis provided in an embodiment of the present application;
[0021] Figure 2 It is a flowchart of a data analysis method provided according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a visual analysis screen provided according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of the structure of an archive file provided according to an embodiment of the present application;
[0024] Figure 5 is a flow chart of another data analysis method provided according to an embodiment of the present application;
[0025] Figure 6 is a flow chart of another data analysis method provided according to an embodiment of the present application;
[0026] Figure 7It is a structural schematic diagram of a data analysis device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or reject automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[0031] Tag: In the field of industrial automation and process control, a tag usually refers to a unique identifier used to identify a sensor, actuator, controller or other device in an automation system. This identifier is used to reference and operate these devices in the software system to facilitate data collection, monitoring and control.
[0032] In the related art, there is a lack of a data analysis method that can be efficiently and collaboratively performed between multiple users. However, many industrial data analysis scenarios, such as production efficiency, equipment maintenance, quality control and other fields, often require multiple field experts to collaborate in analysis and communication and discussion. At present, methods such as taking screenshots of data comparison trends and making static text annotations or telephone communication (retrieving data according to instructions while communicating) are often adopted, which is inefficient and the effect is not good. Therefore, there is a problem in the related art that it is impossible to achieve efficient and collaborative data analysis between multiple users when performing data analysis. In order to solve this problem, a relevant solution is provided in the embodiment of the present application, which is described in detail below.
[0033] According to an embodiment of the present application, an embodiment of a method for data analysis is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for data analysis. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0035] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0036] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method of data analysis in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned method of data analysis. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0038] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0039] In the above operating environment, the present application embodiment provides a flow chart of a method for data analysis, such as Figure 2 As shown, the following steps are included:
[0040] Step S202, obtaining first target data to be analyzed (for example, a time series data).
[0041] The following are specific embodiments:
[0042] The industrial real-time database interface adapter module is compatible with various types of industrial real-time databases, shielding the differences between different databases and providing a unified access interface, including real-time value, historical value, statistical value, bit number attribute, etc. Through the interface adapter module, based on the user-entered IP, port, user name, password and other connection information, connect to the corresponding industrial real-time database and obtain the first target data (i.e., time series data) from the industrial real-time database.
[0043] Step S204, analyze the first target data in a visual manner to obtain a data analysis screen (the screen is a human-computer interaction interface), collect annotation information during the analysis process, and generate second target data based on the data analysis screen and the annotation information.
[0044] In the technical solution provided in step S204, the first target data is analyzed in a visual manner to obtain a data analysis screen, and the annotation information in the analysis process is collected. There are many ways to generate the second target data based on the data analysis screen and the annotation information, for example: the first target data is analyzed in a visual manner to obtain a data analysis screen, wherein the visualization method includes at least one of the following: a trend chart, a bar chart, and a scatter plot. The data analysis screen is used to visualize static data or dynamic data. The static data is the first target data within a first preset time period, and the dynamic data is the first target data within a second preset time period. The data analysis screen allows the receiving terminal to perform annotations and generate annotation information; the annotation information is displayed in a table record, and the content includes the annotator, the annotation point, the annotation time, the annotation text, and one annotation record is generated for each annotation. The annotation information is generated in response to the information annotation instruction input by the user, and the information annotation instruction includes multiple trend comparisons, and information annotation is performed at places where there are questions during the comparison process, and the annotation points are marked with special symbols (for example, five-pointed stars).
[0045] The data analysis screen is encapsulated into the first target data to obtain the second target data.
[0046] The following are specific embodiments:
[0047] The first target data is analyzed in a visual way to obtain a data analysis screen. The visualization method includes at least one of the following: trend chart, bar chart, scatter plot. The trend chart is suitable for displaying the changing trend of the bit number within a specified time range, and multiple trends can be compared, which is conducive to observing data fluctuations; the bar chart is suitable for displaying the value of the data at different time points and intuitively displaying the data distribution; the scatter plot is suitable for identifying the relationship between data points, especially in multivariate analysis; the tree diagram is suitable for displaying data structure or classification, and is suitable for visualization of hierarchical data. If the data analysis screen is used to visualize dynamic data (such as real-time updated data), the chart of the data analysis screen will be continuously updated; if the data analysis screen is used to visualize static data, all data will be loaded and displayed at one time. That is, the data analysis screen can support the retrieval of data within a period of time (static data) and also support the retrieval of a period with a fixed start time, and display the trend dynamics in real time (dynamic data).
[0048] Step S206: Pack the second target data to obtain a first data packet, and send the first data packet to multiple receiving terminals (one receiving terminal corresponds to one user).
[0049] In the technical solution provided in step S206, there are multiple ways to package the second target data to obtain the first data packet, for example: when the analysis screen in the second target data is used to visualize static data, the second target data within the first preset time period is packaged into a JSON (JavaScript Object Notation, a lightweight data exchange format) data packet, and the JSON data packet is determined as the first data packet, wherein the start time and end time of the first preset time period are both preset; when the analysis screen in the second target data is used to visualize dynamic data, the second target data within the second preset time period is packaged into a JSON data packet, and the JSON data packet is determined as the first data packet, wherein the start time of the second preset time period is preset, and the end time of the second preset time period is the time indicated by the timestamp of the packaging moment.
[0050] The following are specific embodiments:
[0051] When the second target data is packaged and sent to other users, it will be marked as static or dynamic data. If it is static data, it will be packaged into a JSON data packet. The receiving terminal parses the JSON data packet and visualizes the data of the corresponding time period into the corresponding data analysis screen; if it is dynamic data, when packaging, the timestamp at the moment of packaging will be used as the end time of the current dynamic data. Assuming that the analysis scenario is to compare the temperature change trend on a factory production line from January 1 to January 31 of a certain year, the specific implementation steps are as follows: Extract the first target data (temperature data within the specified time period) from the real-time database, and perform visual analysis in the form of a trend chart, and extract annotation information (the annotation information is generated in response to user instructions, and the user instruction is to mark certain specific data points during the analysis process.) Complete the analysis and prepare to send to other receiving terminals:
[0052] When the second target data is used to visualize static data, the data analysis screen (including trend chart, annotation information, bit number name, etc.) of the first preset time (January 1, XX to January 31, XX) is packaged into a JSON data packet, which contains: Header information: creation date (for example, January 31, XX), creator (for example, XX), version number (for example, 1.0), bit number name set (for example, temperature sensor A, B, C). Data body: historical data type, bit number name set (temperature sensor A, B, C), value set (temperature value at the corresponding time point), quality code set, annotation information (including annotation text, annotator, annotation time, etc.). Packet tail: CRC checksum to verify the integrity of the data packet. The specific format is shown in Table 1 below: Since the first target data is used to visualize static data (January 1, 2023 to January 31, 2023), the start time and end time of the first preset time period are both pre-set, so in response to the sending instruction of the user of the sending terminal, the generated JSON data packet is marked as static data and sent to multiple receiving terminals. The receiver (receiving terminal) corresponding to the JSON data packet marked as static data unpacks and loads and views the data of the entire analysis cycle (first preset time period) at one time after authorization authentication, and restores the data analysis screen of the second target data. When the second target data is used to visualize dynamic data, the current data analysis screen (including trend charts, annotation information, bit number names, etc.) is packaged into a JSON data packet, but at this time the end time point of the data packet is not pre-set, but the time indicated by the timestamp of the packaging moment. Therefore, in response to the sending instruction of the user of the sending terminal, the generated JSON data packet is marked as dynamic data and sent to multiple receiving terminals. The receiver (receiving terminal) corresponding to the JSON data packet marked as dynamic data is unpacked through permission authentication, and the restored data analysis screen is dynamically updated, that is, it will automatically establish a connection with the real-time database server, request the incremental data between the end time of the second preset time period and the current time of unpacking, and continuously update the data analysis screen to ensure the real-time and accuracy of the dynamic data. The above packaging method is applicable to all packaging processes of this application. It should be noted that the above JSON data packet can also be sent to a receiving terminal first, and then sent to multiple receiving terminals after a receiving terminal marks it. The receiving terminal receives the JSON data packet repackaged after the previous receiving terminal updates the data. That is, the receiving terminal responds to the instruction of the current user to mark the data analysis screen or retrieve new data, and repackages and transmits it to other new receiving terminals for analysis by other users. Repeat the above steps to realize the dynamic transmission and sharing of the data screen among multiple users until the last update of the data analysis screen by the receiving terminal is completed, thereby efficiently completing the collaborative analysis process. The format of the data packet is shown in Table 1 below:
[0053]
[0054] Step S208, receiving the second data packet sent by the first receiving terminal and unpacking it, wherein the second data packet is a data packet after the data analysis screen and annotation information of the first data packet are updated, the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet, all receiving terminals are only the receiving terminals that participate in the analysis of the first data packet, the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet, that is, there will be no more data packet updates, and the data analysis screen after the data in the second data packet is visualized is the final result. Figure 3 FIG. 1 is a schematic diagram of a visual analysis screen provided according to an embodiment of the present application, showing a Figure 3 The data analysis screen of various data shown in the figure within the time shown and the position of the marked points (represented in the form of five-pointed stars). Focusing on the comparative diagnostic analysis of the efficiency (%) of the 2 intermediate pressure cylinder before and after, by comparing the changes in the load rate (%), the effect of the coordinated analysis of the time series data is intuitively demonstrated. Specifically, Figure 3 The real-time value of the 2 medium pressure cylinder efficiency, the design target, and the average lines of the front and rear sections are displayed. These lines correspond to the data status before and after the adjustment, and the target difference reflects the gap with the design target, which is finally presented in a trend chart.
[0055] In the technical solution provided in step S208, there are multiple ways to implement receiving the second data packet sent by the first receiving terminal and unpacking it, for example: when the data analysis screen in the second data packet is used to visualize static data, the second data packet is unpacked, and the data in the second data packet within the first preset time period is analyzed in a visual manner to obtain a first data analysis screen and first annotation information; when the data analysis screen in the second data packet is used to visualize dynamic data, the second data packet is unpacked, and the data in the second data packet within the third preset time period is analyzed in a visual manner to obtain a second data analysis screen and second annotation information, wherein the start time of the third preset time period is the start time of the second preset time period, the end time of the third preset time period is the end time of the fourth preset time period, the start time of the fourth preset time period is the end time of the second preset time period, and the end time of the fourth preset time period is the time indicated by the timestamp of the moment when the second data packet is unpacked. Before unpacking the second data packet, it is necessary to verify whether the bit number name set satisfies the access rights; if the bit number name set satisfies the access rights, the JSON data packet packaged in the second data packet is unpacked, and the data structure corresponding to the data in the unpacked JSON data packet includes at least the analysis subject, data trend set, and annotation information, wherein the data trend set includes at least: bit number name, start and end time, data, quality code, trend line color, line type, line width, horizontal title note, and vertical title note; in response to the user's acceptance instruction, the content of the data structure is analyzed in a visual manner, and the content is rendered to generate a page to obtain a data analysis screen.
[0056] The second data packet is stored in a local storage device and an external server respectively to obtain an archive file, wherein the archive file is used to store the second data packet; when obtaining the archive file, an archive file identifier is sent to the external server, wherein the archive file identifier is used to obtain version number information of the archive file; when the version number information is the same as the version number information of the archive file stored in the local storage device, the archive file is obtained from the local storage device; when the version number information is different from the version number information of the archive file stored in the local storage device, the archive file is obtained from the external server and the archive file in the local storage device is updated.
[0057] The following are specific embodiments:
[0058] like Figure 4As shown, it is a structural diagram of an archive file provided according to an embodiment of the present application. The data analysis screen corresponding to the second data packet is archived or exported, and the archiving method adopts a local + server archiving method, that is, when archiving, the local storage device stores a copy of the data while storing a copy to the external server, and automatically generates a version number for the archive file (that is, the above-mentioned version number information), and the version number is used to compare the difference between the local storage device and the external server. Synchronously, an archive notification will be issued to the receiving terminal participating in the data analysis and annotation, and the archive notification includes the archive file unique identifier and version information. The specific structure of the archive file is shown in FIG. Figure 4 As shown, each time an archive file is retrieved, the archive file identifier is first sent to the external server to send the archive file unique identifier (i.e., the archive file identifier mentioned above), and the corresponding version number information returned by the external server is received and compared with the local version number information. If the version number information is equal, the local storage device archive file is directly opened. If the version number information of the archive file saved in the local storage device is lower than the version number information of the external server, a request for the archive file is initiated to the external server again, and the requested archive file is updated to the local storage device. This design of simultaneous storage and version comparison by local storage device + external server can effectively avoid the large data transmission overhead caused by initiating requests to external servers in most scenarios.
[0059] The present application also provides another data analysis method, such as Figure 5 As shown, including:
[0060] Step S502, the first receiving terminal receives a third data packet sent by the sending terminal or the second receiving terminal (the third data packet is a JSON data packet, and when the first receiving terminal receives the third data packet sent by the sending terminal, the third data packet is the above-mentioned first data packet).
[0061] In the technical solution provided in step S502, the third data packet includes a header, a body and a tail, wherein the header includes a subject, a creation date, a creator, a version number and a bit number name set, the bit number name set is used for authority verification, the body includes a historical data type, and the tail includes a check code for data integrity verification. The specific format is shown in Table 1 above.
[0062] Step S504, unpacking the third data packet; updating the data analysis screen and annotation information of the unpacked third data packet to obtain a fourth data packet.
[0063] The following is a specific embodiment: in the case where the data analysis screen in the third data packet is used to visualize static data, the third data packet is unpacked, and the data in the third data packet within a preset time period (the start time and the end time are both preset) is analyzed in a visual manner to obtain a third data analysis screen and third annotation information, the third data analysis screen and the third annotation information are updated in response to the user's update instruction, and the fourth data packet is obtained after packaging; in the case where the data analysis screen in the third data packet is used to visualize dynamic data, the data in the third data packet within a preset time period (the start time is preset, and the end time is the time indicated by the timestamp of the third data packet packaging moment) is analyzed in a visual manner to obtain a third data analysis screen and third annotation information, the third data analysis screen and the third annotation information are updated in response to the user's update instruction, and step S606 is performed to package the fourth data packet and send it to a third receiving terminal or a sending terminal. When parsing the third data packet (JSON data packet) and restoring the data to the corresponding data analysis screen, a connection is established with the real-time database server (server), and the incremental data between the end time of the preset time period (the start time is pre-set, and the end time is the time indicated by the timestamp of the third data packet packaging time) and the time indicated by the timestamp of the current time unpacking time is used as the incremental start and end time period, and a data request is initiated to the external server, and the external server returns the data to the receiving terminal, and the receiving terminal then initiates a real-time value subscription request for the relevant bit number. After the server receives the subscription request, as long as the data changes, it will be continuously pushed to the receiving terminal, and the receiving terminal receives the pushed value and updates it to the data analysis screen. The receiving terminal responds to the user's update instruction to update the data analysis screen and the annotation information, and performs step S606 to package the fourth data packet and send it to the third receiving terminal or the sending terminal, which can realize the real-time synchronization and analysis of the data analysis screen between multiple receiving terminals. By supporting dynamic display of data, users are allowed to track changes, identify patterns, and respond quickly when events occur, which is particularly suitable for industries that require real-time monitoring and rapid response. The above unpacking method is applicable to all unpacking processes of this application. The packaging process and the structure of the data analysis screen and annotation information have been described in detail in the above embodiments and will not be repeated here.
[0064] In the technical solution provided in step S502, before unpacking the third data packet, obtain the bit number name set in the packet header of the third data packet; verify whether the bit number name set satisfies the access rights; and unpack the third data packet if the bit number name set satisfies the access rights.
[0065] The following is a specific implementation method:
[0066] The receiving terminal receives the user request of the current user, that is, the username and password entered by the user, verifies the correctness of the username and password, and once the user authentication is successful, a Token is generated. This Token usually contains user information and some security features. The Token adopts the standard format of JWT (JSON Web Token, an open standard for securely transmitting information between parties) and supports single sign-on. The Token consists of three parts: Header, Payload, and Signature. When each user requests, the Token is placed in the Authorization field in the HTTP request header and sent to the server. The Authorization field is used to carry the token. The generated Token is verified: including checking whether the signature is correct, whether it is expired, etc. The Token expiration time, if the idle time of the service interaction with the receiving terminal exceeds this time, it will automatically expire and the login information of the account will be cancelled. If the Token verification fails, the user request is rejected and the client is required to log in again. If the Token verification passes, the user information contained in the Token is parsed. Get the bit number name set in the header of the third data packet; verify whether the bit number name set satisfies the access rights: determine whether to allow access to the bits in the current bit number name set for unpacking based on the user's role and rights (i.e., the above-mentioned access rights) in the user information; query the user's access rights to the bits in the permission database based on the user information, compare the bit number name set with the user's permission information, check whether each bit number has access rights, and all bit numbers are unpacked after verification.
[0067] For example: Assume that receiving terminal A sends a data packet in response to the instruction of user A, and the bit number name set includes bit number 1, bit number 2 and bit number 3. After receiving the data packet, receiving terminal B verifies the permission of the current user B through the following mechanism: Role-Based Access Control (RBAC) can be adopted. In the RBAC authorization mode, the permission is assigned to the role, and the user indirectly has the permission through the role he has (for example, the senior role has all access rights, and the low-level role has no access rights). The bit number access rights of the corresponding role of user B are queried from the permission database, and it is found that the corresponding role of user B has the access rights of bit number 1 and bit number 2, but not bit number 3. Then receiving terminal B does not meet the access rights of the bit number name set, and does not decompress. Verifying whether the bit number name set meets the access rights is applicable to the access rights authentication in all embodiments of the present application. In addition, a list of trusted users can be set, and the role is bound to the specified user to generate the corresponding client ID. The user with the client ID can log in and verify without a username and password, which prevents the risk of passwords being easily leaked.
[0068] Step S506: Pack the fourth data packet and send it to the third receiving terminal or the sending terminal.
[0069] Through the above steps, it is possible to obtain data from mainstream industrial real-time databases, perform self-service analysis and annotation, and support the packaging, transmission, verification and one-click restoration of analysis and annotation content, dynamically manage the data analysis process, and realize dynamic sharing and collaborative analysis among multiple people.
[0070] The present application also provides a flowchart of another data analysis method, such as Figure 6 As shown, it includes data extraction (i.e. obtaining the first target data to be analyzed), data analysis and annotation (i.e. analyzing the first target data in a visual manner to obtain a data analysis screen, and collecting annotation information during the analysis process), packaging, sending, authority authentication, data unpacking, display and archiving. The specific implementation methods of the above steps are described in detail in the above implementation and will not be repeated here.
[0071] The present application also provides a schematic diagram of a data analysis device. Figure 7 As shown, including:
[0072] The acquisition module 702 is used to acquire first target data to be analyzed.
[0073] The analysis module 704 is used to analyze the first target data in a visual manner, obtain a data analysis screen, collect annotation information during the analysis process, and generate the second target data based on the data analysis screen and the annotation information.
[0074] The analysis module 704 is also used to analyze the first target data in a visual manner to obtain a data analysis screen, wherein the visualization method includes at least one of the following: a trend chart, a bar chart, a scatter plot, and the data analysis screen is used to visualize static data or dynamic data, the static data is the first target data within a first preset time period, and the dynamic data is the first target data within a second preset time period. The data analysis screen allows the receiving terminal to perform annotations and generate annotation information; the data analysis screen is encapsulated into the first target data to obtain the second target data.
[0075] The sending module 706 is used to package the second target data to obtain a first data packet, and send the first data packet to multiple receiving terminals.
[0076] The sending module 706 is also used for packaging the second target data within the first preset time period into a JSON data packet and determining the JSON data packet as the first data packet when the analysis screen in the second target data is used to visualize static data, wherein the start time and the end time of the first preset time period are both preset; and for packaging the second target data within the second preset time period into a JSON data packet and determining the JSON data packet as the first data packet when the analysis screen in the second target data is used to visualize dynamic data, wherein the start time of the second preset time period is preset and the end time of the second preset time period is the time indicated by the timestamp of the packaging moment.
[0077] The receiving module 708 is used to receive and unpack the second data packet sent by the first receiving terminal, wherein the second data packet is a data packet after updating the data analysis screen and annotation information of the first data packet, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
[0078] The receiving module 708 is also used to unpack the second data packet and analyze the data in the second data packet within the first preset time period in a visual manner to obtain a first data analysis screen and first annotation information when the data analysis screen in the second data packet is used to visualize static data; and to unpack the second data packet and analyze the data in the second data packet within the third preset time period in a visual manner to obtain a second data analysis screen and second annotation information when the data analysis screen in the second data packet is used to visualize dynamic data, wherein the start time of the third preset time period is the start time of the second preset time period, the end time of the third preset time period is the end time of the fourth preset time period, the start time of the fourth preset time period is the end time of the second preset time period, and the end time of the fourth preset time period is the time indicated by the timestamp of the moment when the second data packet is unpacked.
[0079] The receiving module 708 is also used to store the second data packet in a local storage device and an external server respectively to obtain an archive file, wherein the archive file is used to store the second data packet; when obtaining the archive file, sending an archive file identifier to the external server, wherein the archive file identifier is used to obtain version number information of the archive file; when the version number information is the same as the version number information of the archive file stored in the local storage device, obtaining the archive file from the local storage device; when the version number information is different from the version number information of the archive file stored in the local storage device, obtaining the archive file from the external server and updating the archive file in the local storage device.
[0080] The receiving module 708 is also used to determine the data structure of the data in the unpacked JSON data packet, wherein the data structure includes at least an analysis topic, a data trend set, and annotation information, wherein the data trend set includes at least: position number name, start and end time, data, quality code, trend line color, line type, line width, horizontal title note, and vertical title note; the content of the data structure is analyzed in a visual manner to obtain a data analysis screen.
[0081] It should be noted that Figure 7 The data analysis apparatus shown is used to perform Figure 2 The data analysis method shown is therefore Figure 2 The relevant explanations in the data analysis method are also applicable to the data analysis device and will not be repeated here.
[0082] It should be noted that the various modules in the above-mentioned data analysis device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.
[0083] The embodiment of the present application also provides a non-volatile storage medium, the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to perform the above data analysis method. For example, the first target data to be analyzed is obtained; the first target data is analyzed in a visual manner to obtain a data analysis screen, and the annotation information in the analysis process is collected, and the second target data is generated according to the data analysis screen and the annotation information; the second target data is packaged to obtain a first data packet, and the first data packet is sent to multiple receiving terminals; the second data packet sent by the first receiving terminal is received and unpacked, wherein the second data packet is a data packet after the data analysis screen and the annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
[0084] The embodiment of the present application also provides an electronic device, the electronic device includes a processor, the processor is used to run a program, wherein the above data analysis method is executed when the program is running. For example, the first target data to be analyzed is obtained; the first target data is analyzed in a visual manner to obtain a data analysis screen, and the annotation information in the analysis process is collected, and the second target data is generated according to the data analysis screen and the annotation information; the second target data is packaged to obtain a first data packet, and the first data packet is sent to multiple receiving terminals; the second data packet sent by the first receiving terminal is received and unpacked, wherein the second data packet is a data packet after the data analysis screen and the annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
[0085] According to another aspect of the embodiment of the present application, a computer program product is also provided, including a computer program, which implements the above data analysis method when executed by a processor. For example, the first target data to be analyzed is obtained; the first target data is analyzed in a visual manner to obtain a data analysis screen, and the annotation information in the analysis process is collected, and the second target data is generated according to the data analysis screen and the annotation information; the second target data is packaged to obtain a first data packet, and the first data packet is sent to multiple receiving terminals; the second data packet sent by the first receiving terminal is received and unpacked, wherein the second data packet is a data packet after the data analysis screen and the annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
[0086] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0087] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0088] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0089] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or 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 software functional units.
[0090] If the integrated unit 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. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0091] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for data analysis, characterized in that: include: Acquire first target data to be analyzed; Analyze the first target data in a visual manner to obtain a data analysis screen, collect annotation information during the analysis process, and generate second target data based on the data analysis screen and the annotation information; Packing the second target data to obtain a first data packet, and sending the first data packet to multiple receiving terminals; Receive a second data packet sent by a first receiving terminal and unpack it, wherein the second data packet is a data packet after the data analysis screen and the annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
2. The method according to claim 1, characterized in that Analyzing the first target data in a visual manner to obtain the data analysis screen, collecting annotation information during the analysis, and generating the second target data according to the data analysis screen and the annotation information, including: Analyzing the first target data in a visual manner to obtain the data analysis screen, wherein the visualization method includes at least one of the following: a trend chart, a bar chart, and a scatter chart, the data analysis screen is used to visualize static data or dynamic data, the static data is the first target data within a first preset time period, and the dynamic data is the first target data within a second preset time period, and the data analysis screen allows the receiving terminal to perform annotation and generate the annotation information; The data analysis screen is encapsulated into the first target data to obtain the second target data.
3. The method according to claim 2, characterized in that The second target data is packaged to obtain a first data packet: When the analysis screen in the second target data is used to visualize static data, the second target data within the first preset time period is packaged into a JSON data packet, and the JSON data packet is determined as the first data packet, wherein the start time and the end time of the first preset time period are both preset; When the analysis screen in the second target data is used to visualize dynamic data, the second target data within the second preset time period is packaged into a JSON data packet, and the JSON data packet is determined as the first data packet, wherein the start time of the second preset time period is pre-set, and the end time of the second preset time period is the time indicated by the timestamp of the packaging moment.
4. The method according to claim 3, characterized in that: Receiving a second data packet sent by the first receiving terminal and depacketizing the second data packet includes: In a case where the data analysis screen in the second data packet is used to visualize static data, the second data packet is unpacked, and the data in the second data packet within the first preset time period is analyzed in a visualized manner to obtain a first data analysis screen and first annotation information; In the case where the data analysis screen in the second data packet is used to visualize dynamic data, the second data packet is unpacked, and the data in the second data packet within a third preset time period is analyzed in a visual manner to obtain a second data analysis screen and second annotation information, wherein the start time of the third preset time period is the start time of the second preset time period, the end time of the third preset time period is the end time of the fourth preset time period, the start time of the fourth preset time period is the end time of the second preset time period, and the end time of the fourth preset time period is the time indicated by the timestamp of the moment when the second data packet is unpacked.
5. The method according to claim 1, characterized in that The method further comprises: storing the second data packet in a local storage device and an external server respectively to obtain an archive file, wherein the archive file is used to store the second data packet; When acquiring the archive file, sending the archive file identifier to the external server, wherein the archive file identifier is used to acquire version number information of the archive file; When the version number information is the same as the version number information of the archive file stored in the local storage device, obtaining the archive file from the local storage device; In the case where the version number information is different from the version number information of the archive file stored in the local storage device, the archive file is obtained from the external server, and the archive file in the local storage device is updated.
6. The method according to claim 3, characterized in that The method further comprises: Determine the data structure of the data in the unpacked JSON data packet, wherein the data structure at least includes an analysis topic, a data trend set, and annotation information, wherein the data trend set at least includes: a bit number name, a start and end time, data, a quality code, a trend line color, a line type, a line width, a horizontal title note, and a vertical title note; The content of the data structure is analyzed in a visual manner to obtain the data analysis screen.
7. A method of data analysis, characterized in that: include: The first receiving terminal receives a third data packet sent by the sending terminal or the second receiving terminal; Unpacking the third data packet; Performing a data analysis screen and updating annotation information on the unpacked third data packet to obtain a fourth data packet; The fourth data packet is packaged and sent to the third receiving terminal or the sending terminal.
8. The method according to claim 7, characterized in that The third data packet includes a header, a body and a trailer, wherein the header includes a subject, a creation date, a creator, a version number and a bit number name set, the bit number name set is used for authority verification, the body includes a historical data type, and the trailer includes a check code for data integrity verification.
9. The method according to claim 8, characterized in that Before unpacking the third data packet, the method further includes: Obtaining a bit number name set in the packet header of the third data packet; Verify whether the bit number name set satisfies the access rights; In the case where the bit number name set satisfies the access permission, the third data packet is unpacked.
10. A data analysis device, characterized in that: include: An acquisition module, used for acquiring first target data to be analyzed; An analysis module, configured to analyze the first target data in a visual manner, obtain a data analysis screen, collect annotation information during the analysis, and generate second target data based on the data analysis screen and the annotation information; A sending module, used for packaging the second target data to obtain a first data packet, and sending the first data packet to multiple receiving terminals; A receiving module is used to receive and unpack a second data packet sent by a first receiving terminal, wherein the second data packet is a data packet after the data analysis screen and the annotation information of the first data packet are updated, and the first receiving terminal is the last receiving terminal among all receiving terminals to update the first data packet.
11. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the data analysis method described in any one of claims 1 to 6 or the data analysis method described in any one of claims 7 to 9.
12. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein when the program is run, the data analysis method described in any one of claims 1 to 6 or the data analysis method described in any one of claims 7 to 9 is executed.
13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the data analysis method described in any one of claims 1 to 6 or the data analysis method described in any one of claims 7 to 9 is implemented.