Data processing method and device, equipment and medium
By aligning the data flows of home appliance motherboard and cloud servers, streaming comparison of the data flows of home appliance motherboard and attribute fields, identifying and processing abnormal data, the problem of mistransmission and mistransmission in home appliance data transmission is solved, and the accuracy of data analysis is improved and user experience.
Patent Information
- Application Number
- CN202310553636.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When home appliances upload real-time running data, due to poor network signal and problems with the motherboard embedded software, data transmission is prone to loss or mistransmission, which affects the accuracy of data analysis and thus cannot effectively improve the user experience.
By obtaining the data flow of the home appliance motherboard and cloud server in real time, aligning the timestamps and attribute fields, streaming comparison is performed, identifying the data inconsistencies as abnormal data, and sending it to the user terminal to form an abnormal data list for analysis.
Effectively identify and handle the data mistransmission and mistransmission problems of home appliance motherboards when uploading data to cloud servers, improve the accuracy of data analysis and improve user experience.
Smart Images

Figure CN119011611A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electrical technology, and specifically relates to data processing methods, devices, equipment and media. Background Art
[0002] In order to provide users with a better user experience, existing home appliances generally have Internet of Things functions. The home appliances are equipped with a motherboard to collect various operating data of the home appliances and transmit them to the server in real time to analyze user habits and improve user experience.
[0003] However, during the data transmission process, affected by many factors, such as poor network signal, problems with the motherboard embedded software, etc., the data uploaded to the server may be lost and other abnormal situations may occur. These situations greatly affect the conclusions of data analysis and thus cannot accurately improve the user experience. Summary of the invention
[0004] In order to solve the problem in the prior art that when home appliances upload real-time operation data, data transmission anomalies occur and cannot be effectively identified, the present application provides a data processing method, device, equipment and medium.
[0005] In a first aspect, the present application provides a data processing method, the method comprising:
[0006] Acquire a first data stream from a mainboard of a home appliance in real time, and acquire a second data stream uploaded by the mainboard in real time from a cloud server in real time; wherein the first data stream and the second data stream are used to reflect the operating status of the home appliance;
[0007] Performing real-time streaming comparison processing according to the first data stream and the second data stream;
[0008] If the first data stream and the second data stream are inconsistent when compared, abnormal data is obtained and sent to the user terminal.
[0009] In a possible implementation, performing real-time streaming comparison processing according to the first data stream and the second data stream includes:
[0010] Obtaining a timestamp and an attribute field common to the first data stream and the second data stream;
[0011] Using the timestamp and the attribute field as alignment flags, an alignment operation is performed on the first data stream and the second data stream acquired in real time;
[0012] After the alignment operation is completed, a streaming comparison process is performed on the first data stream and the second data stream.
[0013] In a possible implementation, after the alignment operation is completed, performing streaming comparison processing on the first data stream and the second data stream includes:
[0014] After the alignment operation is completed, determining whether there is any redundant byte stream in the first data stream that is not aligned with the second data stream;
[0015] If so, the comparison is inconsistent, and the redundant byte stream is determined to be the missing data of the second data stream relative to the first data stream, and the stream comparison processing is continued on the attribute fields in the first data stream and the second data stream;
[0016] If not present, a stream comparison process is performed on the attribute fields in the first data stream and the second data stream.
[0017] In a possible implementation, performing stream comparison processing on the attribute fields in the first data stream and the second data stream includes:
[0018] Determine whether the attribute fields at the same alignment position of the first data stream and the second data stream are consistent;
[0019] If not, the comparison is inconsistent and the inconsistent attribute fields are obtained;
[0020] If so, obtain the attribute value corresponding to the attribute field and verify the attribute value.
[0021] In a possible implementation manner, the verifying the attribute value includes:
[0022] Determining whether the attribute value is within a preset range;
[0023] If yes, the verification passes;
[0024] If not, the verification fails and the abnormal attribute value corresponding to the attribute field is recorded.
[0025] In a possible implementation, if the first data stream and the second data stream are inconsistent when compared, obtaining abnormal data includes:
[0026] The abnormal data is acquired according to the missing data of the server, the inconsistent attribute fields, and the abnormal attribute values corresponding to the attribute fields.
[0027] In a possible implementation, the step of acquiring the first data stream from a mainboard of the home appliance in real time includes:
[0028] After accessing the serial port of the home appliance, the real-time serial port data transmitted by the mainboard is read as a first data stream through a Java program.
[0029] In a second aspect, the present application provides a data processing device, the device comprising:
[0030] An acquisition module, used for acquiring a first data stream from a mainboard of the home appliance in real time, and acquiring a second data stream uploaded by the mainboard in real time from a cloud server in real time; wherein the first data stream and the second data stream are used to reflect the operating status of the home appliance;
[0031] A processing module, used for performing real-time streaming comparison processing according to the first data stream and the second data stream;
[0032] The processing module is further configured to obtain abnormal data if the first data stream and the second data stream are inconsistent after comparison, and send the abnormal data to a user terminal.
[0033] In a possible implementation manner, the processing module is specifically used to:
[0034] Obtaining a timestamp and an attribute field common to the first data stream and the second data stream;
[0035] Using the timestamp and the attribute field as alignment flags, an alignment operation is performed on the first data stream and the second data stream acquired in real time;
[0036] After the alignment operation is completed, a streaming comparison process is performed on the first data stream and the second data stream.
[0037] In a possible implementation manner, the processing module is further configured to:
[0038] After the alignment operation is completed, determining whether there is any redundant byte stream in the first data stream that is not aligned with the second data stream;
[0039] If so, the comparison is inconsistent, and the redundant byte stream is determined to be the missing data of the second data stream relative to the first data stream, and the stream comparison processing is continued on the attribute fields in the first data stream and the second data stream;
[0040] If not present, a stream comparison process is performed on the attribute fields in the first data stream and the second data stream.
[0041] In a possible implementation manner, the processing module is further configured to:
[0042] Determine whether the attribute fields at the same alignment position of the first data stream and the second data stream are consistent;
[0043] If not, the comparison is inconsistent and the inconsistent attribute fields are obtained;
[0044] If so, obtain the attribute value corresponding to the attribute field and verify the attribute value.
[0045] In a possible implementation, the processing module is further used to: determine whether the attribute value is within a preset range;
[0046] If yes, the verification passes;
[0047] If not, the verification fails and the abnormal attribute value corresponding to the attribute field is recorded.
[0048] In a possible implementation manner, the processing module is further configured to:
[0049] The abnormal data is acquired according to the missing data of the server, the inconsistent attribute fields, and the abnormal attribute values corresponding to the attribute fields.
[0050] In a possible implementation, the acquisition module is specifically used to:
[0051] After accessing the serial port of the home appliance, the real-time serial port data transmitted by the mainboard is read as a first data stream through a Java program.
[0052] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0053] In a fourth aspect, the present application provides an electronic device, comprising: at least one processor and a memory; wherein:
[0054] The memory stores computer-executable instructions;
[0055] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method as described in any one of the first aspects.
[0056] The data processing method, device, equipment and medium provided in this embodiment obtain and process the data of the mainboard of the home appliance as a first data stream in real time, and simultaneously obtain the second data stream transmitted by the mainboard in the cloud server, perform real-time streaming comparison processing on the first data stream and the second data stream, and use the first data stream as a reference. When the second data stream is inconsistent with the first data stream, abnormal data is obtained and sent to the user terminal. This method effectively identifies the problem of data transmission error and omission when the mainboard of the home appliance uploads data to the cloud server, which is conducive to timely processing of abnormal problems, making the conclusion of data analysis more accurate, thereby accurately improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0059] Figure 2 The process of the data processing method provided in the embodiment of the present application Figure 1 ;
[0060] Figure 3 The process of the data processing method provided in the embodiment of the present application Figure 2 ;
[0061] Figure 4 The process of the data processing method provided in the embodiment of the present application Figure 3 ;
[0062] Figure 5 A diagram of a data processing device provided by an embodiment of the present invention;
[0063] Figure 6 A hardware schematic diagram of an electronic device provided by an embodiment of the present invention.
[0064] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0066] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention 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 numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.
[0067] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0068] In an environment where all kinds of home appliances have Internet of Things functions, the mainboards of home appliances can transmit operation-related data to the server through the Internet. This type of data plays an important guiding role in helping developers analyze user habits and improve user experience. At the same time, it is more convenient to improve home appliances. However, the data transmission function of the mainboard of home appliances is often affected by many objective factors, such as poor network signals, problems with the embedded software in the mainboard, etc., and data transmission often results in loss or mistransmission and other anomalies, which greatly affects the conclusions of data analysis.
[0069] In response to the above problems, the present application provides a data processing method, which can obtain real-time data in the home appliance motherboard and data in the cloud server. Based on the real-time data in the motherboard, the two types of data are aligned under the timestamp and attribute fields through Flink (Apache Flink), and then a streaming comparison is performed to determine whether the data is abnormal. If abnormal data occurs, the abnormal data is split and a separate list table is formed so that users can clearly understand the abnormality and analyze it.
[0070] This method realizes real-time horizontal comparison between the host board data and the cloud server data, which is conducive to using abnormal data to quickly analyze the cause of the abnormality, thereby making improvements, improving device performance and enhancing user experience.
[0071] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, taking a clothing processing device as an example, the clothing processing device 102 transmits real-time data to the cloud server 101 through the main board. Since the transmission is affected by many factors, the cloud data transmitted to the cloud server 101 may be missed or mis-transmitted. In order to compare the data in real time and obtain abnormal data, the processing device 103 externally connected to the clothing processing device 102 obtains the real-time data of the main board, and accesses and obtains the cloud data in the cloud server 101 at the same time. The processing device 103 aligns the data at both ends based on the timestamp and attribute field, and then compares the real-time dual-stream data to check whether the cloud data has missing data, inconsistent attribute fields or abnormal attribute field values. If the above problems exist, the abnormal data is split to form an abnormal data list table 104, and the abnormal data list table 104 is pushed to the user terminal.
[0072] The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0073] Figure 2 The process of the data processing method provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the method includes:
[0074] S201, acquiring a first data stream from a mainboard of a home appliance in real time, and acquiring a second data stream uploaded by the mainboard in real time from a cloud server in real time.
[0075] The first data stream and the second data stream are used to reflect the operating status of the home appliance.
[0076] In this step, the mainboard of the home appliance is connected and real-time data in the mainboard is obtained, and the real-time data is the first data stream. At the same time, the data uploaded by the mainboard in the cloud server is accessed and obtained, and the data is the second data stream.
[0077] It should be noted that, in the absence of any influence, the first data stream and the second data stream should be exactly the same, but in actual situations, unstable network conditions often occur, causing data transmission abnormalities, resulting in the second data stream being inconsistent with the first data stream. In order to effectively identify, it is necessary to obtain the first data stream and the second data stream at the same time for comparison, so as to discover the specific abnormal content of the second data stream.
[0078] When the motherboard transmits data to the cloud server, the cloud server will read the data and process the data into a unified byte stream. When reading the real-time data in the motherboard, it is also necessary to read it as a byte stream. The comparison process is based on the data under the byte stream. In addition, an external processing device can be set to receive the first data stream and the second data stream. The processing device has the function of receiving and processing the data stream in real time, such as a computer.
[0079] Exemplarily, after accessing the serial port of the home appliance, the real-time serial port data transmitted by the mainboard is read as the first data stream through a Java program.
[0080] S202: Perform real-time streaming comparison processing according to the first data stream and the second data stream.
[0081] In this step, when the first data stream and the second data stream are received, a real-time streaming comparison is performed on the data to identify whether there is a problem in the transmission process of the second data stream.
[0082] It should be noted that real-time streaming comparison can be processed by an external processing device based on Flink, a framework and distributed processing engine, which compares the dual-stream data obtained in real time. Its low-latency stream processing and support for window operations with event time very well support the large-scale and fast characteristics of data comparison.
[0083] S203: If the first data stream and the second data stream are inconsistent after comparison, abnormal data is obtained and sent to the user terminal.
[0084] In this step, according to the real-time comparison, if an abnormality occurs, it is necessary to obtain the abnormal data and push the abnormal data to the user terminal so that the user can view the abnormal data for analysis.
[0085] It should be noted that data transmitted in the form of byte streams generally contain timestamps, attribute field names corresponding to attributes, and attribute field values. Therefore, types of data anomalies include but are not limited to inconsistent number of fields, inconsistent attribute field names, or out-of-range values corresponding to attribute fields. For different anomalies, the abnormal data results can be identified and classified by type and presented to the user terminal in the form of a list table.
[0086] The method of pushing to the user terminal is, for example, to send the abnormal data to the user terminal in real time in the form of a dialog box when the abnormal data appears, or to summarize and classify the abnormal data and send it to the user terminal after the operation of the home appliance is completed.
[0087] The data processing method provided in this embodiment obtains and processes the data of the mainboard of the home appliance as a first data stream in real time, and simultaneously obtains the second data stream transmitted by the mainboard in the cloud server, performs real-time streaming comparison processing on the first data stream and the second data stream, and takes the first data stream as a reference. When the second data stream is inconsistent with the first data stream, abnormal data is obtained and sent to the user terminal. The method effectively identifies the problem of data transmission error and omission when the mainboard of the home appliance uploads data to the cloud server, which is conducive to timely processing of abnormal problems, making the conclusion of data analysis more accurate, thereby accurately improving user experience.
[0088] Figure 3 The process of the data processing method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, the missing data in the streaming comparison of the first data stream and the second data stream is described in detail. The method includes:
[0089] S301. Obtain a timestamp and an attribute field common to the first data stream and the second data stream.
[0090] In this step, the data stream will carry the time information of the data during transmission, which is in the form of a timestamp in the data stream. At the same time, the data is also composed of fields corresponding to multiple attributes, as well as the values of the attribute fields. Obtaining the timestamp and attribute fields of the dual-stream data can achieve the following alignment operation.
[0091] S302: Use the timestamp and the attribute field as alignment flags to align the first data stream and the second data stream acquired in real time.
[0092] In this step, after aligning each piece of data in the dual-stream data based on the timestamp and attribute field, the above alignment operation can be implemented through Flink, which can actually achieve a low latency of milliseconds. It should be noted that since the dual-stream data is real-time data, it is essentially an unbounded data stream. Flink performs operations on each data item transmitted, that is, it compares it immediately after acquisition. Because the input data stream is unbounded, it needs to be sorted by the time when the data is generated, so that the integrity of the transmitted data during the operation of the device can be determined.
[0093] S303: After the alignment operation is completed, determine whether there is any redundant byte stream in the first data stream that is not aligned with the second data stream.
[0094] In this step, the second data stream is first compared to see if there is a transmission leakage problem. If there is a transmission leakage problem, the number of bytes of the first data stream will be greater than that of the second data stream during the comparison, so alignment is impossible.
[0095] S304: If it exists, the comparison is inconsistent, and the redundant byte stream is determined to be the missing data of the second data stream relative to the first data stream, and the stream comparison processing of the attribute fields in the first data stream and the second data stream continues.
[0096] In this step, when there is a problem of leakage of the second data stream, the byte stream in which the first data stream is larger than that in the second data stream is missing data, and the type of missing data at least includes the problem of inconsistent number of attribute fields. The missing data can be recorded in the abnormal data list, and the attribute fields in the dual-stream data can continue to be compared to confirm whether the names of the attribute fields are consistent.
[0097] S305: If not, perform stream comparison processing on the attribute fields in the first data stream and the second data stream.
[0098] In this step, if there is no leakage in the second data stream, the attribute fields in the dual-stream data are compared. It should be noted that the dual-stream data comparison process based on Flink is very fast, and the description of the comparison process is only an explanation of the judgment process.
[0099] The data processing method provided in this embodiment aligns the dual-stream data by acquiring the timestamp and attribute fields shared by the first data stream and the second data stream, and based on the aligned data, determines whether the byte stream of the first data stream is greater than the byte stream of the second data stream, thereby determining whether there is a transmission leakage problem in the second data stream. This method realizes real-time alignment and comparison operations of the dual-stream data, can promptly discover data leakage problems and report them to the user end, thereby improving data processing efficiency.
[0100] Figure 4 The process of the data processing method provided in the embodiment of the present application Figure 3 .like Figure 4 As shown, in this embodiment Figure 3 Based on the embodiment, the stream comparison process of the attribute field is described in detail. The method includes:
[0101] S401: Determine whether the attribute fields at the same alignment position of the first data stream and the second data stream are consistent.
[0102] In this step, it is confirmed whether the names of the attribute fields under the same data are consistent after alignment. During the data transmission process, the second data stream may have the problem of mistransmitting attribute fields. The attribute fields represent the names of all data involved in the operation of the home appliance. For example, taking a washing machine as an example, the attribute fields may include but are not limited to the inner drum speed, clothing weight, remaining program running time or motor temperature, etc.
[0103] S402: If not, the comparison is inconsistent, and the inconsistent attribute fields are obtained.
[0104] In this step, if it is identified that the attribute field in the second data stream is inconsistent with the first data stream, the inconsistent attribute field can be obtained, and the content may be the exception type, the first data stream attribute field and the second data stream attribute field, wherein the exception type may be the inconsistency of the attribute field.
[0105] S403: If yes, obtain the attribute value corresponding to the attribute field, verify the attribute value, and determine whether the attribute value is within a preset range.
[0106] In this step, if there is no inconsistency in the attribute field, the attribute values corresponding to the attribute fields of the dual-stream data are compared. During the second data transmission process, the attribute values are generally mis-transmitted, so this problem needs to be compared and identified.
[0107] It should be noted that if the attribute value in the second data stream exceeds the preset range, it is generally due to an error in data transmission or a malfunction in the operation of the home appliance. Therefore, prioritizing the identification of attribute values that exceed the preset range has practical significance for analyzing data transmission problems and equipment operation failure problems. When an error occurs in data transmission, the attribute value will exceed the preset range. The attribute value that exceeds the preset range can be identified first, and it is prioritized to confirm whether the attribute value is consistent with the first data stream. If they are consistent, the abnormal attribute value is caused by an equipment operation failure. This information is helpful for the user end to analyze the abnormal attribute value and thus improve the equipment.
[0108] S404: If yes, the verification is passed;
[0109] S405: If not, the verification fails, and the abnormal attribute value corresponding to the attribute field is recorded.
[0110] In this step, for attribute values that exceed a preset range, the recorded content may clearly indicate the type of anomaly, such as data transmission anomaly or device operation failure, so that the user can intuitively understand the source of the abnormal attribute value.
[0111] Exemplarily, if the first data stream and the second data stream are inconsistent when compared, the abnormal data is obtained according to the missing data of the server, the inconsistent attribute fields, and the abnormal attribute values corresponding to the attribute fields.
[0112] It should be noted that the analyzed anomalies can be displayed in several dimensions, including generation time, anomaly type, first data stream content, and second data stream content. The display method can be to send the anomaly data to the user terminal in the form of a list table based on the above dimensions through Java.
[0113] The data processing method provided in this embodiment determines whether the second data stream has transmission abnormalities by identifying the attribute fields and corresponding attribute values in the dual-stream data. At the same time, judging whether the attribute values exceed the preset range can not only identify the problem of abnormal data transmission, but also identify the information of equipment operation failure, which is beneficial for users to analyze and improve equipment operation failures while analyzing and processing data transmission problems.
[0114] Figure 5 A data processing device diagram provided by an embodiment of the present invention, such as Figure 5 As shown, the processing device 50 includes: an acquisition module 501 and a processing module 502.
[0115] The acquisition module 501 is used to acquire a first data stream from a mainboard of the home appliance in real time, and to acquire a second data stream uploaded by the mainboard in real time from a cloud server in real time; wherein the first data stream and the second data stream are used to reflect the operating status of the home appliance;
[0116] A processing module 502, configured to perform real-time stream comparison processing according to the first data stream and the second data stream;
[0117] The processing module 502 is further configured to obtain abnormal data if the first data stream and the second data stream are inconsistent after comparison, and send the abnormal data to a user terminal.
[0118] In a possible implementation, the processing module 502 is specifically configured to:
[0119] Obtaining a timestamp and an attribute field common to the first data stream and the second data stream;
[0120] Using the timestamp and the attribute field as alignment flags, an alignment operation is performed on the first data stream and the second data stream acquired in real time;
[0121] After the alignment operation is completed, a streaming comparison process is performed on the first data stream and the second data stream.
[0122] In a possible implementation, the processing module 502 is further configured to:
[0123] After the alignment operation is completed, determining whether there is any redundant byte stream in the first data stream that is not aligned with the second data stream;
[0124] If so, the comparison is inconsistent, and the redundant byte stream is determined to be the missing data of the second data stream relative to the first data stream, and the stream comparison processing is continued on the attribute fields in the first data stream and the second data stream;
[0125] If not present, a stream comparison process is performed on the attribute fields in the first data stream and the second data stream.
[0126] In a possible implementation, the processing module 502 is further configured to:
[0127] Determine whether the attribute fields at the same alignment position of the first data stream and the second data stream are consistent;
[0128] If not, the comparison is inconsistent and the inconsistent attribute fields are obtained;
[0129] If so, obtain the attribute value corresponding to the attribute field and verify the attribute value.
[0130] In a possible implementation, the processing module 502 is further used to: determine whether the attribute value is within a preset range;
[0131] If yes, the verification passes;
[0132] If not, the verification fails and the abnormal attribute value corresponding to the attribute field is recorded.
[0133] In a possible implementation, the processing module 502 is further configured to:
[0134] The abnormal data is acquired according to the missing data of the server, the inconsistent attribute fields, and the abnormal attribute values corresponding to the attribute fields.
[0135] In a possible implementation, the acquisition module 501 is specifically used to:
[0136] After accessing the serial port of the home appliance, the real-time serial port data transmitted by the mainboard is read as a first data stream through a Java program.
[0137] Figure 6 Schematic diagram of the hardware of the electronic device provided by the embodiment of the present invention. Figure 6 As shown, the electronic device 60 provided in this embodiment includes: at least one processor 601 and a memory 602. The device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.
[0138] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above data processing method.
[0139] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0140] In the above Figure 6In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0141] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0142] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0143] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method described above is implemented.
[0144] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage 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. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0145] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0146] The division of the units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.
[0147] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present invention 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.
[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including 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 methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0150] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0151] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. 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 replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire a first data stream from a mainboard of a home appliance in real time, and acquire a second data stream uploaded by the mainboard in real time from a cloud server in real time; wherein the first data stream and the second data stream are used to reflect the operating status of the home appliance; Performing real-time streaming comparison processing according to the first data stream and the second data stream; If the first data stream and the second data stream are inconsistent when compared, abnormal data is obtained and sent to the user terminal.
2. The method according to claim 1, characterized in that The performing real-time streaming comparison processing according to the first data stream and the second data stream includes: Obtaining a timestamp and an attribute field common to the first data stream and the second data stream; Using the timestamp and the attribute field as alignment flags, an alignment operation is performed on the first data stream and the second data stream acquired in real time; After the alignment operation is completed, a streaming comparison process is performed on the first data stream and the second data stream.
3. The method according to claim 2, characterized in that After the alignment operation is completed, performing a stream comparison process on the first data stream and the second data stream includes: After the alignment operation is completed, determining whether there is any redundant byte stream in the first data stream that is not aligned with the second data stream; If so, the comparison is inconsistent, and the redundant byte stream is determined to be the missing data of the second data stream relative to the first data stream, and the stream comparison processing is continued on the attribute fields in the first data stream and the second data stream; If not present, a stream comparison process is performed on the attribute fields in the first data stream and the second data stream.
4. The method according to claim 3, characterized in that The performing stream comparison processing on the attribute fields in the first data stream and the second data stream includes: Determine whether the attribute fields at the same alignment position of the first data stream and the second data stream are consistent; If not, the comparison is inconsistent and the inconsistent attribute fields are obtained; If so, obtain the attribute value corresponding to the attribute field and verify the attribute value.
5. The method according to claim 4, characterized in that The verifying the attribute value includes: Determining whether the attribute value is within a preset range; If yes, the verification passes; If not, the verification fails and the abnormal attribute value corresponding to the attribute field is recorded.
6. The method according to claim 5, characterized in that If the first data stream and the second data stream are inconsistent after comparison, obtaining abnormal data includes: The abnormal data is acquired according to the missing data of the server, the inconsistent attribute fields, and the abnormal attribute values corresponding to the attribute fields.
7. The method according to claim 1, characterized in that The step of acquiring the first data stream from the mainboard of the home appliance in real time includes: After accessing the serial port of the home appliance, the real-time serial port data transmitted by the mainboard is read as a first data stream through a Java program.
8. A data processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a first data stream from a mainboard of the home appliance in real time, and acquiring a second data stream uploaded by the mainboard in real time from a cloud server in real time; wherein the first data stream and the second data stream are used to reflect the operating status of the home appliance; A processing module, used for performing real-time streaming comparison processing according to the first data stream and the second data stream; The processing module is further configured to obtain abnormal data if the first data stream and the second data stream are inconsistent after comparison, and send the abnormal data to a user terminal.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
10. An electronic device, characterized in that: include: at least one processor and memory; wherein, The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.
