Data processing method and device, and non-transitory machine readable storage medium
By adding random values outside the valid bits of the data to generate new data and retaining the data during the deduplication process, the problem of valid data loss in high-frequency patrol collection is solved, and more accurate monitoring and analysis results are achieved.
Patent Information
- Application Number
- CN202510639087.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-09-05
AI Technical Summary
In high-frequency patrol data collection scenarios, protocol conversion devices deduplicate data, resulting in valid data loss and affecting the accuracy of monitoring and analysis results.
Randomly add values to the digits other than the valid digits of the data to generate new data, and retain the data during the deduplication process until the data analysis device restores it to the original data for analysis.
By retaining valid data information during the deduplication process, data loss is avoided and the accuracy of monitoring and analysis results is improved.
Smart Images

Figure CN120596466A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, and in particular to a data processing method, device, and non-transitory machine-readable storage medium. Background Art
[0002] In many scenarios such as product production, power plants, and chemical plants, it is necessary to collect data from the production process, such as size, temperature, and humidity, and to monitor and analyze this data.
[0003] Typically, different sensors, programmable logic controllers (PLCs), smart meters and other data acquisition devices collect data in different formats. In order to monitor and analyze the data collected by various data acquisition devices, the collected data needs to be converted into a unified format through a protocol conversion device. For example, the protocol conversion device can be an Object Linking and Embedding (OLE Process Control, OPC) server for process control, which transmits the converted data to a server. For example, the server can be a production statistical process control (SPC) server, which can perform data analysis based on the received data to evaluate the production process.
[0004] However, in scenarios like high-frequency round-robin data collection, protocol converters automatically perform deduplication on the collected data. This deduplication compares the current data with the previous one and, if they are identical, deletes the current data, thereby reducing the data volume. However, even if duplicate data is identical to the previous one, if it is valid data, this will result in the loss of valid data, making the server's monitoring and analysis results based on deduplication less accurate. Summary of the Invention
[0005] Embodiments of the present application provide a data processing method, device, and non-transitory machine-readable storage medium that can avoid data loss and improve the accuracy of monitoring and analysis results.
[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0007] receiving first data sent by a data acquisition device;
[0008] Randomly adding a first value to digits other than the valid digits of the first data to obtain second data;
[0009] If the second data is different from the previous data, and the previous data is the previous data of the first data acquired by the data acquisition device, then the second data is sent to the data analysis device so that the data analysis device deletes the numerical values of the digits other than the valid digits of the first data from the second data, so as to restore the second data to the first data and perform analysis based on the first data.
[0010] Optionally, randomly adding a first value to digits other than valid digits of the first data to obtain the second data includes:
[0011] randomly generating a first value, wherein a significant digit of the first value is different from a significant digit of the first data;
[0012] The sum or combination result of the first value and the first data is obtained to obtain second data.
[0013] Optionally, randomly adding a first value to digits other than valid digits of the first data to obtain the second data includes:
[0014] If the first data is the same as the previous data, a first value is randomly added to the digits other than the valid digits of the first data to obtain the second data.
[0015] Optionally, randomly adding a first value to digits other than valid digits of the first data to obtain the second data includes:
[0016] If it is determined that the first data is valid data, a first value is randomly added to digits other than the valid digits of the first data to obtain second data.
[0017] Optionally, determining whether the first data is valid data is performed in the following manner:
[0018] If the absolute value of the difference between the first data and the target data is not greater than a preset difference threshold, the first data is determined to be valid data.
[0019] In a second aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0020] receiving second data sent by a protocol conversion device, where the second data is obtained by randomly adding a first value to digits other than valid digits of the first data received by the protocol conversion device and sent when the second data is different from previous data, where the previous data is data previous to the first data sent by the data acquisition device;
[0021] deleting values of digits other than the valid digits of the first data from the second data to restore the second data to the first data;
[0022] An analysis is performed based on the first data.
[0023] Optionally, deleting values of digits other than valid digits of the first data from the second data to restore the second data to the first data includes:
[0024] The first data is obtained by extracting the value of the valid bit of the first data from the second data.
[0025] Optionally, extracting a value of a valid digit of the first data from the second data to obtain the first data includes:
[0026] Obtaining a preset terminator, where the preset terminator is a bit located after a valid bit of the first data;
[0027] The value before the preset terminator in the second data is intercepted to obtain the first data.
[0028] In a third aspect, an embodiment of the present application provides an electronic device comprising: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the data processing method as described in the first aspect.
[0029] In a fourth aspect, an embodiment of the present application provides an electronic device comprising: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the data processing method as described in the second aspect.
[0030] In a fifth aspect, an embodiment of the present application provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the data processing method described in the first aspect.
[0031] In the sixth aspect, an embodiment of the present application provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the data processing method described in the second aspect.
[0032] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it can implement the data processing method described in the first aspect.
[0033] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it can implement the data processing method described in the second aspect.
[0034] In the data processing solution provided in the embodiment of the present application, after receiving the first data sent by the data acquisition device, the protocol conversion device randomly adds the first value to the digits other than the valid digits of the first data to obtain the second data. During the deduplication process, even if the first data is the same as the previous data, the first data will not be deleted after the above processing, thereby avoiding data loss. The protocol conversion device sends the second data to the data analysis device, which can delete the values on the digits other than the valid digits of the first data from the second data to quickly restore the second data to the first data and perform analysis based on the first data. This improves the accuracy of the monitoring and analysis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0036] Figure 1 An architectural diagram of a data processing system provided in an embodiment of the present application;
[0037] Figure 2 An interactive diagram of a data processing method provided in an embodiment of the present application;
[0038] Figure 3 This is a schematic structural diagram of an electronic device provided in this embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions 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 part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, the step timing in the following method embodiments is only an example and not a strict limitation.
[0040] It should be noted that, in the case where the embodiments of the present application involve user information, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse. In addition, the various models involved in this application (including but not limited to large language models or other models) are in compliance with relevant laws and standards.
[0041] First, the terms or concepts involved in the embodiments of this application are explained:
[0042] The Internet of Things (IoT) refers to the connection of any object to the network through information sensing devices and agreed protocols. Objects exchange and communicate information through information transmission media to achieve intelligent identification, positioning, tracking, supervision and other functions.
[0043] Statistical Process Control (SPC) data refers to production process parameters (such as dimensions, temperature, and humidity) collected through statistical methods. It is used to analyze process stability and predict quality trends. Based on this feedback, the SPC system promptly identifies signs of systemic factors and takes measures to eliminate their impact, maintaining the process under control, influenced only by random factors, ultimately achieving quality control.
[0044] KEPServer, an industrial automation data connectivity platform, is an Object Linking and Embedding (OLE Process Control, or OPC) server software that implements standard OPC interfaces. KEPServer allows communication with devices, and applications connect to KEPServer via the OPC protocol. KEPServer supports data integration across multiple protocols and is widely used in industrial automation, ensuring smooth transmission of production data between different systems.
[0045] The data processing system provided in the embodiments of the present application is introduced and explained below.
[0046] See also Figure 1 , Figure 1 This is an architecture diagram of a data processing system provided in an embodiment of the present application. The data processing system provided in this embodiment may include but is not limited to: a data acquisition device, a protocol conversion device 103, and a data analysis device 104. The data acquisition device may be a sensor, a PLC, or an intelligent meter, etc. Figure 1 In the example, two data acquisition devices are shown, namely sensor 101 and PLC 102. It can be understood that Figure 1 This is just an example. The data processing system in actual application may include more or fewer data acquisition devices, as well as different types of data acquisition devices. The protocol conversion device 103 is respectively connected to the data acquisition devices for communication. Optionally, the protocol conversion device 103 can be connected to the data acquisition device for communication via an RS-485 standard interface, an RS-232 standard interface, etc. The protocol conversion device 103 can receive data sent by different data acquisition devices, and transmit the data to the data analysis device 104 carried by the platform via a standard interface, wherein the data analysis device 104 can be a data monitoring, management, and analysis system, etc. Optionally, the protocol conversion device 103 can also be connected to the data analysis device 104 via, for example, an Internet of Things platform device.
[0047] The protocol conversion device 103 can be a server or a server cluster consisting of multiple servers. The data analysis device 104 can be a server or a server cluster consisting of multiple servers.
[0048] In practical applications, the data processing system can optionally be applied to the industrial field. Different data acquisition devices may collect data in different formats. In order to monitor and analyze the data collected by various data acquisition devices, the collected data needs to be converted into a unified format through the protocol conversion device 103. For example, the protocol conversion device 103 may be an OPC server, which transmits the converted data to the data analysis device 104. For example, the server may be a production statistical process control (SPC) server. The SPC server can perform data analysis based on the received data to evaluate the production process. The OPC server may be a KEPServer server. The following description takes the protocol conversion device 103 as a KEPServer server as an example.
[0049] In scenarios such as high-frequency data collection, the KEPServer automatically deduplicates the collected data. This deduplication process compares the current data with the previous data and deletes the current data if they are identical, thereby reducing the data volume. However, even if duplicate data is identical to the previous data, if it is valid data, this will result in the loss of valid data, making the SPC server's monitoring and analysis results based on the deduplication less accurate.
[0050] Based on this, the present application provides a data processing solution. After receiving the first data sent by the data acquisition device, the protocol conversion device randomly adds the first value to the digits other than the valid digits of the first data to obtain the second data. During the deduplication process, even if the first data is the same as the previous data, the first data will not be deleted after the above processing, thereby avoiding data loss. The protocol conversion device sends the second data to the data analysis device, which can delete the values on the digits other than the valid digits of the first data from the second data to quickly restore the second data to the first data and perform analysis based on the first data. This improves the accuracy of the monitoring and analysis results.
[0051] The following describes in detail the execution process of the data processing method provided in the embodiment of the present application with reference to the accompanying drawings.
[0052] Figure 2 This is an interactive diagram of a data processing method provided in an embodiment of the present application. The method provided in this embodiment can be applied to a data processing system. Optionally, the data processing system can be the above-mentioned Figure 1 For example, the data acquisition device of this embodiment can be the data processing system shown in FIG. Figure 1 The data acquisition device in the data processing system shown in the figure, the protocol conversion device of this embodiment can be the above Figure 1 The protocol conversion device in the data processing system shown in FIG. 1 may be the data analysis device described above. Figure 1 The data analysis device in the data processing system shown. Figure 2 As shown, the method includes the following steps.
[0053] 201. A data acquisition device sends first data to a protocol conversion device.
[0054] 202. The protocol conversion device randomly adds a first value to digits other than valid digits of the first data to obtain second data.
[0055] 203. The protocol conversion device determines whether the second data is different from previous data, where the previous data is data previous to the first data sent by the data acquisition device.
[0056] If yes, continue to step 204 ; if no, continue to step 207 .
[0057] 204. The protocol conversion device sends the second data to the data analysis device.
[0058] 205. The data analysis device deletes the values of digits other than the valid digits of the first data from the second data to restore the second data to the first data.
[0059] 206. The data analysis device performs analysis based on the first data.
[0060] 207. The protocol conversion device deletes the second data.
[0061] In practical applications, a data acquisition device collects or calculates first data. The data acquisition device then sends the first data to a protocol conversion device. It is understood that the data acquisition device may obtain multiple first data. Typically, the data acquisition device sends the first data to the protocol conversion device sequentially in the order in which the first data were collected. Optionally, the data acquisition device may also include a relevant information tag for the first data when sending the first data. For example, the relevant information tag may include the collection time of the first data, the device identifier corresponding to the first data, etc.
[0062] The protocol conversion device can process the first data in the order in which the first data is received or collected. The first value is randomly added to the digits other than the valid digits of the first data to obtain the second data. The valid digits of the first data refer to the digits from the first non-zero digit on the left to the last digit (including the estimated value of the last digit). For example, the valid digits of 55 are the ones and tens. The digits other than the valid digits of the first data refer to the other digits in the first data except the valid digits. For example, the digits other than the valid digits of 55 refer to the digits other than the ones and tens, including the thousands, hundreds, and decimal places after the decimal point. The first value is a random number, that is, when the protocol conversion device processes the data other than the first data, the first value added is different from the first value added to the first data. As a result, the adjacent data after processing are not the same.
[0063] The protocol conversion device then automatically triggers a deduplication operation, comparing the first data with the previous data acquired by the data acquisition device. If the first data is identical to the previous data, a deduplication operation is performed, deleting the first data. If the first data is different from the previous data, the first data is sent to the data analysis device after undergoing protocol conversion.
[0064] The data analysis device receives the second data and deletes the values of the digits other than the valid digits of the first data from the second data, thereby restoring the second data to the first data. The data analysis device can analyze the first data to obtain an analysis result.
[0065] In an optional embodiment, the valid bit of the first data can be set in advance in the data analysis device, or the valid bit of the first data can be obtained when receiving the second data sent by the protocol conversion device. For example, the protocol conversion device can send the valid bit of the first data to the data analysis device.
[0066] In this embodiment, the data acquisition device collects or generates first data and sends the first data to the protocol conversion device. The protocol conversion device obtains second data by randomly adding a first value to the digits other than the valid digits of the first data. During the deduplication process, even if the first data is the same as the previous data, the first data will not be deleted after the above processing, thereby avoiding data loss. The protocol conversion device sends the second data to the data analysis device. The data analysis device can delete the values on the digits other than the valid digits of the first data from the second data to quickly restore the second data to the first data and perform analysis based on the first data. By quickly and effectively processing the data before deduplication, the protocol conversion device retains complete valid data for analysis and processing by the data analysis device, thereby improving the accuracy of the monitoring and analysis results.
[0067] In an optional embodiment, in step 202, a possible implementation method of randomly adding the first value to the digits other than the valid digits of the first data to obtain the second data may be: randomly generate a first value, and the valid digits of the first value are different from the valid digits of the first data. Obtain the sum of the first value and the first data to obtain the second data. For example, the valid digits of the first data are the ones digit and the digits before the ones digit. Assuming that the first data is 111, the first value can be a randomly generated value from a positive number less than 1. Assuming that the first value is 0.222, in this way, by calculating the sum of the first data and the first value, the first value can be randomly added to the digits other than the valid digits of the first data to obtain the second data. Based on the above assumption, the second data is 111.222. Another possible implementation method may be: randomly generate a first value, and the valid digits of the first value are different from the valid digits of the first data. Obtain the combination result of the first value and the first data to obtain the second data. For example, if the significant digits of the first data are the ones digit and the digits preceding them, and the first data is 111, then the first value can be a randomly generated value from a positive number less than 1. For example, if the first value is 0.222, then the first data and the first value can be combined. If the possible combination result is 111.00222, 111.0222, or other possible combination results, the first value can be randomly added to the digits other than the significant digits of the first data to obtain the second data. Subsequently, when the data analysis device restores the second data to the first data, the first data can be obtained by deleting the values of the digits after the decimal point of the second data.
[0068] In an optional embodiment, in a possible implementation of step 202, step 202 can be performed on all first data. In another possible implementation of step 202, it can be pre-determined whether the first data is the same as the previous data. If the first data is the same as the previous data, it means that if the deduplication operation is performed on the first data without processing, the protocol conversion device will delete the first data. Therefore, in this case, it is necessary to randomly add the first value to the digits other than the valid bits of the first data to obtain the second data. If the first data is different from the previous data, it means that the first data will not be deleted during the deduplication operation even if it is not processed. Therefore, in this case, step 202 can be omitted and the automatic deduplication operation on the first data can continue.
[0069] In an optional embodiment, in step 205, the data analysis device deletes the values of the digits other than the valid digits of the first data from the second data to restore the second data to the first data. The implementation method can be: the values of the valid digits of the first data are intercepted from the second data to obtain the first data.
[0070] Furthermore, the data analysis device can obtain a preset terminator, which is a digit located after the significant digit of the first data. The value of the second data located before the preset terminator is intercepted to obtain the first data. For example, if the significant digit of the first data is at or before the units digit, the preset terminator can be set to the digit after the decimal point. Thus, when the data analysis device restores the second data to the first data, it can directly obtain the value of the digit before the decimal point in the second data to obtain the first data.
[0071] In some scenarios, invalid data may be present in the first data sent by the data acquisition device. For example, a certain first data collected may deviate significantly from the range of valid data. In this case, the data is not valid data and is meaningless for subsequent analysis by the data analysis device. Therefore, the protocol conversion device can pre-determine whether the first data is valid data and perform the above data processing process on the first data that is valid data. This will be described in detail below with specific embodiments.
[0072] Based on any of the above embodiments, further, in a possible implementation of step 202, after receiving the first data sent by the data acquisition device, the protocol conversion device determines whether the first data is valid data. If the first data is valid data, the first value is randomly added to the digits other than the valid digits of the first data to obtain the second data. If the first data is not valid data, that is, the first data is invalid data, the first data can be deleted. Therefore, there is no need to process the first data subsequently, saving processing resources.
[0073] Optionally, the first data may be determined to be valid data in the following manner: determining whether the absolute value of the difference between the first data and the target data is not greater than a preset difference threshold. The target data is a value preset based on the valid data of the first data, and the preset difference threshold is a value preset based on the valid data of the first data, used to indicate the magnitude of the difference between the first data and the target data. If the absolute value of the difference between the first data and the target data is not greater than the preset difference threshold, it indicates that the difference between the first data and the standard value is small, and the first data is determined to be valid data. If the absolute value of the difference between the first data and the target data is greater than the preset difference threshold, it indicates that the difference between the first data and the standard value is large, and the first data is determined to be invalid data.
[0074] After receiving the first data sent by the data acquisition device, the protocol conversion device first determines whether the first data is valid data. After determining that the first data is valid data, the first data is processed. This allows only valid data to be processed subsequently, eliminating the need to process invalid data. This conserves processing resources and data transmission resources required to send data to the data analysis device. Furthermore, the data analysis device can directly perform analysis based on the received valid data, resulting in a smaller amount of data to be processed, saving processing resources. Furthermore, analysis based on valid data results in more accurate analysis results.
[0075] In an optional embodiment, after receiving the first data, the protocol conversion device usually stores it in its own storage resource first, and then scans the storage resource at a preset frequency to obtain the first data in the storage resource and perform the above data processing method.
[0076] Optionally, the protocol conversion device will perform automatic deduplication operations in scenarios such as high-frequency polling and acquisition. The high-frequency polling and acquisition scenario refers to a scenario in which the preset frequency of the protocol conversion device reading the storage resource is greater than the frequency threshold, that is, the preset frequency of the current protocol conversion device is high. In this way, the amount of data processed and sent is large, and therefore, automatic deduplication operations will be performed, which may cause the loss of valid data. Therefore, when the protocol conversion device is in scenarios such as high-frequency polling and acquisition, the steps in the method of the above embodiment are executed. In scenarios such as non-high-frequency polling and acquisition, since the automatic deduplication operation of the protocol conversion device will not be triggered, the processing of the above step 202 can be omitted and the first data can be directly sent to the data analysis device. Accordingly, after receiving the first data, the data analysis device can directly perform analysis based on the first data.
[0077] The following example illustrates the method of the embodiment of the present application by using a protocol conversion device equipped with KEPServer software and a data analysis device equipped with SPC software. This example includes the following steps.
[0078] Step 1. Pre-configure the target value points and actual data acquisition points in the KEPServer software of the protocol conversion device.
[0079] The addresses corresponding to the storage resources in the protocol conversion device may be referred to as points.
[0080] The protocol conversion device can store the received first data in a corresponding address in the order of the first data collection time, and store the standard value for measuring whether the first data is valid data in the target value point.
[0081] Step 2: Create difference calculation tags and judgment logic tags.
[0082] Optionally, you can use the Advanced Tags plug-in to create difference calculation tags and judgment logic tags.
[0083] For example, the difference calculation tag type selects Expression (Expression), and the expression of the difference calculation tag can be expressed as: ABS (data corresponding to the actual sampling point - data corresponding to the target value point), where ABS() represents the absolute value function, which is used to calculate the absolute value of the difference between the data stored at the actual sampling point and the data stored at the target value point.
[0084] For example, select Expression as the judgment logic tag type. The judgment logic tag expression can be expressed as: IF(Difference calculation tag <= 50, 1, 0), where 50 is the preset difference threshold. The judgment logic tag is used to determine whether the value obtained by the difference calculation tag is less than or equal to 50. If it is less than or equal to 50, the value of the judgment point tag is 1, indicating that the data corresponding to the actual data point is valid and can be collected. If it is greater than 50, the value of the judgment point tag is 0, indicating that the data corresponding to the actual data point is invalid and cannot be collected.
[0085] Step 3: Create random number points.
[0086] You can generate non-repeating random numbers (range 0.0001-0.9999). Specifically, create a new channel in the KEPServer Configuration Manager, select the Simulator driver protocol, create a device under this channel, and add a variable to the created device. Use the RANDOM function to generate a random number in the variable address. The specific address can be RANDOM(10,0,0.9998)+0.0001.
[0087] Step 4: Create virtual point labels.
[0088] Use the Advanced Tags plug-in to create a virtual point tag. The virtual point tag type can be selected as Derived. The expression of the virtual point tag can be expressed as: IF(judgment logic tag == 1, actual number point + random number point, 0). It means that when the judgment logic tag is equal to 1, the virtual point generates a corresponding data. The data consists of: the data corresponding to the actual number point + the data corresponding to the random number point. For example, if the data corresponding to the actual number point is 1332 and the data corresponding to the random number point is 0.0582, the virtual point data generated after triggering is 1332.0582.
[0089] In actual applications, the data acquisition device sends the collected first data to the protocol conversion device. The KEPServer software in the protocol conversion device stores the received first data in a storage resource. The KEPServer software processes the first data in the storage resource using the point tags created above and then sends the data at the virtual point (i.e., the second data) to the IoT system. The IoT system then sends the second data to the data analysis device.
[0090] The data analysis device may perform the following steps.
[0091] Step 5: Define the decimal point in the second data as a terminator.
[0092] Step 6: Obtain the second data, and based on the defined terminator, intercept the value before the terminator in the second data, use the intercepted data as valid data, and transmit it to the SPC for analysis.
[0093] This embodiment creates a virtual point that combines judgment points, actual data collection points, and random data points to capture all valid data during the collection process. Data that meets the validity criteria is intercepted based on a defined terminator to obtain the actual data. This solves the problem of identical data being unable to be collected in high-frequency KEPServer polling scenarios. This solution allows KEPServer to collect data without considering differences between different software versions, forming a standardized collection and processing method, unifying the collection method with the system front-end processing method.
[0094] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, in practice, the electronic device includes: a memory 21 and a processor 22.
[0095] The memory 21 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, data structures, contact data, phone book data, messages, images, videos, etc.
[0096] The processor 22 is coupled to the memory 21 and is used to execute the computer program in the memory 21 to implement the steps performed by the protocol processing device or the data analysis device in the data processing method provided in the above embodiment.
[0097] Further, if Figure 3 As shown, the electronic device also includes: a communication component 23, a display 24, a power component 25, an audio component 26 and other components. Figure 3 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 3 The electronic device of this embodiment can be implemented as a terminal device such as a desktop computer, a laptop computer, a smart phone or an IOT device, or a server device such as a conventional server, a cloud server or a server array.
[0098] The above-mentioned memory can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random-access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0099] The communication component is configured to facilitate wired or wireless communication between the device in which the communication component resides and other devices. The device in which the communication component resides can access a wireless network based on a communication standard, such as a 2G, 3G, 4G / LTE, 5G, or other mobile communication network, or a combination thereof. In an exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.
[0100] The above-mentioned display includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundary of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0101] The power supply assembly provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.
[0102] The above-mentioned audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as call mode, recording mode, and voice recognition mode, the microphone is configured to receive external audio signals. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals.
[0103] Accordingly, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to implement the steps of the protocol processing device or data analysis device in the above-mentioned method embodiment. Wherein, the computer-readable storage medium includes volatile or non-volatile or a combination thereof, and can be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, tape disk storage or other magnetic storage device or any other non-transmission medium.
[0104] Accordingly, an embodiment of the present application further provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is enabled to implement the various steps of the protocol processing device or data analysis device in the above-mentioned method embodiment. It should be understood that each process or a combination of multiple processes in the above-mentioned method flow can be implemented by a computer program or instruction. In addition, these computer programs or instructions can be applied to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device, so that the processor of the general-purpose computer, the special-purpose computer, the embedded processor, or other programmable data processing device can be implemented as a device for implementing the corresponding functions in the above-mentioned method embodiment.
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: receiving first data sent by a data acquisition device; Randomly adding a first value to digits other than the valid digits of the first data to obtain second data; If the second data is different from the previous data, and the previous data is the previous data of the first data acquired by the data acquisition device, then the second data is sent to the data analysis device so that the data analysis device deletes the numerical values of the digits other than the valid digits of the first data from the second data, so as to restore the second data to the first data and perform analysis based on the first data.
2. The method according to claim 1, characterized in that The randomly adding a first value to digits other than the valid digits of the first data to obtain the second data includes: randomly generating a first value, wherein a significant digit of the first value is different from a significant digit of the first data; The sum or combination result of the first value and the first data is obtained to obtain second data.
3. The method according to claim 1, characterized in that The randomly adding a first value to digits other than the valid digits of the first data to obtain the second data includes: If the first data is the same as the previous data, a first value is randomly added to the digits other than the valid digits of the first data to obtain the second data.
4. The method according to any one of claims 1 to 3, characterized in that The randomly adding a first value to digits other than the valid digits of the first data to obtain the second data includes: If it is determined that the first data is valid data, a first value is randomly added to digits other than the valid digits of the first data to obtain second data.
5. The method according to claim 4, characterized in that Determine whether the first data is valid data by: If the absolute value of the difference between the first data and the target data is not greater than a preset difference threshold, the first data is determined to be valid data.
6. A data processing method, characterized in that: The method comprises: receiving second data sent by a protocol conversion device, where the second data is obtained by randomly adding a first value to digits other than valid digits of the first data received by the protocol conversion device and sent when the second data is different from previous data, where the previous data is data previous to the first data sent by the data acquisition device; deleting values of digits other than the valid digits of the first data from the second data to restore the second data to the first data; An analysis is performed based on the first data.
7. The method according to claim 6, characterized in that The step of deleting values of digits other than the valid digits of the first data from the second data to restore the second data to the first data includes: The first data is obtained by extracting the value of the valid bit of the first data from the second data.
8. The method according to claim 7, characterized in that The extracting the value of the valid digit of the first data from the second data to obtain the first data includes: Obtaining a preset terminator, where the preset terminator is a bit located after a valid bit of the first data; The value before the preset terminator in the second data is intercepted to obtain the first data.
9. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the data processing method according to any one of claims 1 to 8.
10. A non-transitory machine-readable storage medium, characterized in that The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the data processing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for processing data
CN101631111A
Data transmission method and device
CN105743722A