Movatterモバイル変換


[0]ホーム

URL:


CN114745291A - Abnormal data cloud method and device, electronic equipment and storage medium - Google Patents

Abnormal data cloud method and device, electronic equipment and storage medium
Download PDF

Info

Publication number
CN114745291A
CN114745291ACN202011545051.4ACN202011545051ACN114745291ACN 114745291 ACN114745291 ACN 114745291ACN 202011545051 ACN202011545051 ACN 202011545051ACN 114745291 ACN114745291 ACN 114745291A
Authority
CN
China
Prior art keywords
data
abnormal
edge
target
requirements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011545051.4A
Other languages
Chinese (zh)
Inventor
王鹏
高健
梁冰
张希成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co LtdfiledCriticalBeijing Gridsum Technology Co Ltd
Priority to CN202011545051.4ApriorityCriticalpatent/CN114745291A/en
Publication of CN114745291ApublicationCriticalpatent/CN114745291A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention relates to a method and a device for cloud application of abnormal data, electronic equipment and a storage medium, wherein the method comprises the following steps: after receiving an abnormal data acquisition request sent by a cloud network, an edge side device extracts a data requirement from the abnormal data acquisition request, then calls target data content corresponding to a data field in a data format from a stored data record related to an abnormal event, generates abnormal data according to the called target data content and the data format, and finally sends the generated abnormal data to the cloud network.

Description

Translated fromChinese
一种异常数据上云方法、装置、电子设备及存储介质A method, device, electronic device and storage medium for uploading abnormal data to the cloud

技术领域technical field

本发明涉及数据传输技术领域,尤其涉及一种异常数据上云方法、装置、电子设备及存储介质。The present invention relates to the technical field of data transmission, and in particular, to a method, device, electronic device and storage medium for uploading abnormal data to the cloud.

背景技术Background technique

一般,现场数据采集装置或数据服务器因停机、故障等原因造成丢失数据,以及机组异常启停、异常运行等事件发生时,都会产生相应的异常数据,为了对异常数据进行更好的分析,通常需要对异常数据的发生时刻之前一段时间以及发生时刻之后一段时间内的所有数据进行采集,因此,每次异常时,采集的频率较高,采集数据量大。并且不同设备所采集的异常数据的采集方式及采集字段均不相同,进而导致将大量的异常数据上传到云服务后,无法及时对异常数据进行分析。Generally, when the on-site data acquisition device or data server loses data due to downtime, failure, etc., and when the unit starts and stops abnormally, abnormal operation and other events, corresponding abnormal data will be generated. In order to better analyze the abnormal data, usually It is necessary to collect all data for a period of time before the occurrence time of abnormal data and for a period of time after the occurrence time. Therefore, each time an abnormality occurs, the frequency of collection is high, and the amount of data collected is large. In addition, the collection methods and collection fields of abnormal data collected by different devices are different, so that after a large amount of abnormal data is uploaded to the cloud service, the abnormal data cannot be analyzed in time.

发明内容SUMMARY OF THE INVENTION

为了解决上述技术问题或者至少部分地解决上述技术问题,本发明提供了一种异常数据上云方法、装置、电子设备以及存储介质。In order to solve the above technical problem or at least partially solve the above technical problem, the present invention provides a method, apparatus, electronic device and storage medium for uploading abnormal data to the cloud.

第一方面,本发明提供了一种异常数据上云方法,应用于边缘设备侧,所述方法包括:In a first aspect, the present invention provides a method for uploading abnormal data to the cloud, which is applied to the edge device side, and the method includes:

接收云网络发送的异常数据获取请求;所述异常数据获取请求中携带至少一个数据要求;Receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;

从所述异常数据获取请求中提取目标数据要求;所述目标数据要求包含有数据格式和至少一个数据字段;Extract target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;

从存储的与异常事件相关的数据记录中,调取与所述目标数据要求中数据字段对应的目标数据内容;From the stored data record related to the abnormal event, retrieve the target data content corresponding to the data field in the target data request;

将调取到的目标数据内容按照所述数据格式生成异常数据;generating abnormal data according to the data format of the retrieved target data content;

发送所述异常数据至云网络。Send the abnormal data to the cloud network.

在本发明的可选实施方式中,所述异常数据获取请求中携带有设备标识,每个设备标识与数据要求之间一一对应;In an optional embodiment of the present invention, the abnormal data acquisition request carries a device identifier, and each device identifier corresponds to a data requirement one-to-one;

所述从所述异常数据获取请求中提取所述数据要求,包括:The extracting the data requirements from the abnormal data acquisition request includes:

查找与所述边缘侧设备的标识对应的目标设备标识;Find the target device identification corresponding to the identification of the edge side device;

提取与所述目标设备标识对应的数据要求作为目标数据要求。The data requirement corresponding to the target device identification is extracted as the target data requirement.

在本发明的可选实施方式中,所述数据要求中包含有多个数据字段;In an optional embodiment of the present invention, the data request includes a plurality of data fields;

所述调取与所述目标数据要求中数据字段对应的目标数据内容,包括:The fetching of the target data content corresponding to the data field in the target data request includes:

提取所述目标数据要求中的所有数据字段;extracting all data fields in the target data request;

从所述所有数据字段中确定所述边缘侧设备所支持的目标数据字段;Determine a target data field supported by the edge-side device from all the data fields;

调取所述目标数据字段对应的数据内容作为目标数据内容。The data content corresponding to the target data field is retrieved as the target data content.

在本发明的可选实施方式中,发送所述异常数据至云网络,包括:In an optional embodiment of the present invention, sending the abnormal data to the cloud network includes:

发送所述异常数据至所述异常数据获取请求的发送方;sending the abnormal data to the sender of the abnormal data acquisition request;

或者,or,

发送所述异常数据至所述异常数据获取请求的发送方所在云网络中kafka集群。Send the abnormal data to the Kafka cluster in the cloud network where the sender of the abnormal data acquisition request is located.

在本发明的可选实施方式中,所述方法还包括:In an optional embodiment of the present invention, the method further includes:

获取所述边缘侧设备所支持的所有数据字段;Obtain all data fields supported by the edge-side device;

判断所述边缘侧设备的所支持的所有数据字段是否与所述数据要求的数据字段一致;Judging whether all data fields supported by the edge-side device are consistent with the data fields required by the data;

若所述边缘侧设备的所支持的所有数据字段与所述数据要求的数据字段不一致,将所述边缘侧设备的所支持的所有数据字段中区别于所述数据要求的数据字段确定为扩展数据字段;If all the data fields supported by the edge-side device are inconsistent with the data fields required by the data, determine the data fields that are different from the data requirements among all the data fields supported by the edge-side device as extended data field;

将所述扩展数据字段加入接收到的所述数据要求中,对所述数据格式进行更新,以利用更新后数据格式进行生成异常数据。The extended data field is added to the received data request, and the data format is updated to generate abnormal data using the updated data format.

在本发明的可选实施方式中,所述方法还包括:In an optional embodiment of the present invention, the method further includes:

判断所述边缘侧设备是否存储有历史异常数据获取请求对应的本地数据要求;Determine whether the edge-side device stores the local data requirements corresponding to the historical abnormal data acquisition request;

若存储有本地数据要求,按照本地数据要求生成异常数据;If there are local data requirements for storage, abnormal data will be generated according to the local data requirements;

若未存储有本地数据要求,从云网络发送的所述异常数据获取请求中提取所述数据要求。If no local data requirements are stored, the data requirements are extracted from the abnormal data acquisition request sent by the cloud network.

在本发明的可选实施方式中,所述方法还包括:In an optional embodiment of the present invention, the method further includes:

若存储有本地数据要求,判断本地数据要求与新的数据要求是否一致;If there are local data requirements stored, determine whether the local data requirements are consistent with the new data requirements;

若所述本地数据要求与所述新的数据要求不一致,将新的数据要求更新为本地数据要求。If the local data request is inconsistent with the new data request, the new data request is updated to the local data request.

第二方面,本发明提供了一种异常数据上云方法,应用于云服务器,所述方法包括:In a second aspect, the present invention provides a method for uploading abnormal data to the cloud, which is applied to a cloud server, and the method includes:

调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;retrieving pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;

根据所述目标数据要求生成异常数据获取请求;Generate an abnormal data acquisition request according to the target data requirements;

将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照所述异常数据获取请求中的目标数据要求生成异常数据;sending the abnormal data acquisition request to the edge-side device, so that the edge-side device generates abnormal data according to the target data requirements in the abnormal data acquisition request from the stored data records related to the abnormal event;

接收所述边缘侧设备发送的异常数据。Receive abnormal data sent by the edge-side device.

在本发明的可选实施方式中,所述方法还包括:In an optional embodiment of the present invention, the method further includes:

判断接收到的异常数据中的数据字段是否超出所述目标数据要求的数据字段;Determine whether the data field in the received abnormal data exceeds the data field required by the target data;

若超出,将异常数据中不属于所述目标数据要求的数据字段确定为扩展数据字段;If it exceeds, the data fields in the abnormal data that do not belong to the target data requirements are determined as extended data fields;

将所述扩展数据字段增加到所述目标数据要求中。The extension data field is added to the target data requirement.

第三方面,本发明提供了一种异常数据上云装置,所述装置包括:In a third aspect, the present invention provides a device for uploading abnormal data to the cloud, the device comprising:

第一接收模块,用于接收云网络发送的异常数据获取请求;所述异常数据获取请求中携带至少一个数据要求;a first receiving module, configured to receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;

提取模块,用于从所述异常数据获取请求中提取目标数据要求;所述目标数据要求包含有数据格式和至少一个数据字段;an extraction module, used for extracting target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;

第一调取模块,用于从存储的与异常事件相关的数据记录中,调取与所述目标数据要求中数据字段对应的目标数据内容;The first retrieval module is used to retrieve the target data content corresponding to the data field in the target data requirement from the stored data records related to the abnormal event;

第一生成模块,用于将调取到的目标数据内容按照所述数据格式生成异常数据;The first generation module is used to generate abnormal data according to the data format according to the content of the fetched target data;

第一发送模块,用于发送所述异常数据至云网络。The first sending module is configured to send the abnormal data to the cloud network.

第四方面,本发明提供了一种异常数据上云装置,所述装置包括:In a fourth aspect, the present invention provides a device for uploading abnormal data to the cloud, the device comprising:

第二调取模块,用于调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;a second retrieval module, configured to retrieve pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;

第二生成模块,用于根据所述目标数据要求生成异常数据获取请求;a second generating module, configured to generate an abnormal data acquisition request according to the target data requirement;

第二发送模块,用于将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照所述异常数据获取请求中的数据要求生成异常数据;a second sending module, configured to send the abnormal data acquisition request to the edge-side device, so that the edge-side device records the stored data related to the abnormal event to generate abnormal data according to the data requirements in the abnormal data acquisition request;

第二接收模块,用于接收所述边缘侧设备发送的异常数据。The second receiving module is configured to receive abnormal data sent by the edge-side device.

第五方面,本发明提供了一种电子设备,包括:至少一个处理器、以及与处理器连接的至少一个存储器、总线;其中,所述处理器、所述存储器通过所述总线完成相互间的通信;所述处理器用于调用所述存储器中的程序指令,以执行上述第一方面或第二方面中任一项所述的异常数据上云方法。In a fifth aspect, the present invention provides an electronic device, comprising: at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory complete mutual communication through the bus. communication; the processor is configured to call program instructions in the memory to execute the method for uploading abnormal data to the cloud according to any one of the first aspect or the second aspect.

第六方面,本发明实施例提供一种存储介质,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述第一方面或第二方面中任一项所述的异常数据上云方法。In a sixth aspect, an embodiment of the present invention provides a storage medium, where one or more programs are stored in the storage medium, and the one or more programs can be executed by one or more processors to implement the above-mentioned first aspect or The method for uploading abnormal data to the cloud according to any one of the second aspects.

本发明实施例提供的技术方案,边缘侧设备接收到云网络发送的异常数据获取请求后,先从异常数据获取请求中提取数据要求,其中,数据要求包含有数据格式以及至少一个数据字段,然后从存储的与异常事件相关的数据记录中,调取与数据格式中数据字段对应的目标数据内容,再将调取到的目标数据内容按照数据格式生成异常数据,最后将生成的异常数据发送至云网络,由于边缘侧设备在生成异常数据时,是按照云网络发送的异常数据获取请求中的数据要求生成的,此时云网络接收到的异常数据的数据格式和数据字段便是符合云网络对异常数据进行分析的需求的,现对于现有技术中云网络接收到的不同采集方式以及不同采集字段的数据,利用本实施例的技术方案生成的异常数据明显会加快对异常数据的分析速度,有效避免了因数据格式以及数据字段不满足分析需求造成的无法及时对异常数据进行分析的问题。In the technical solution provided by the embodiment of the present invention, after receiving the abnormal data acquisition request sent by the cloud network, the edge side device first extracts the data requirements from the abnormal data acquisition request, wherein the data requirements include a data format and at least one data field, and then From the stored data records related to abnormal events, retrieve the target data content corresponding to the data fields in the data format, and then generate abnormal data according to the data format from the retrieved target data content, and finally send the generated abnormal data to In the cloud network, when the edge-side device generates abnormal data, it is generated according to the data requirements in the abnormal data acquisition request sent by the cloud network. At this time, the data format and data fields of the abnormal data received by the cloud network are consistent with the cloud network. For the needs of analyzing abnormal data, for the data of different collection methods and different collection fields received by the cloud network in the prior art, the abnormal data generated by the technical solution of this embodiment will obviously speed up the analysis speed of the abnormal data. , which effectively avoids the problem that abnormal data cannot be analyzed in time due to data formats and data fields that do not meet the analysis requirements.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. In other words, on the premise of no creative labor, other drawings can also be obtained from these drawings.

图1为本发明实施例提供的一种异常数据上云方法的实施流程示意图;1 is a schematic diagram of an implementation flow of a method for uploading abnormal data to the cloud according to an embodiment of the present invention;

图2为本发明实施例提供的一种异常数据上云方法中提取数据要求的实施流程示意图;FIG. 2 is a schematic flowchart of an implementation process of extracting data requirements in a method for uploading abnormal data to the cloud according to an embodiment of the present invention;

图3为本发明实施例提供的一种异常数据上云方法中调取目标数据内容的实施流程示意图;3 is a schematic diagram of an implementation flow of retrieving target data content in a method for uploading abnormal data to the cloud according to an embodiment of the present invention;

图4为本发明实施例提供的一种异常数据上云方法中扩展数据要求中的数据字段的实施流程示意图;4 is a schematic flowchart of implementing a data field in an extended data requirement in a method for uploading abnormal data to the cloud according to an embodiment of the present invention;

图5为本发明实施例提供的一种异常数据上云方法中沿用本地数据要求生成异常数据的实施流程示意图;FIG. 5 is a schematic diagram of an implementation process of generating abnormal data by following local data requirements in a method for uploading abnormal data to the cloud provided by an embodiment of the present invention;

图6为本发明实施例提供的一种异常数据上云方法的实施流程示意图;6 is a schematic diagram of an implementation flow of a method for uploading abnormal data to the cloud according to an embodiment of the present invention;

图7为本发明实施例提供的一种异常数据上云方法中云服务器更新数据要求的实施流程示意图;FIG. 7 is a schematic flowchart of implementing a cloud server update data requirement in a method for uploading abnormal data to the cloud according to an embodiment of the present invention;

图8为本发明实施例提供的一种异常数据上云装置的结构示意图;8 is a schematic structural diagram of an apparatus for uploading abnormal data to a cloud according to an embodiment of the present invention;

图9为本发明实施例提供的一种异常数据上云装置的结构示意图;9 is a schematic structural diagram of an apparatus for uploading abnormal data to a cloud according to an embodiment of the present invention;

图10为本发明实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

如图1所示,为本发明实施例提供的一种异常数据上云方法的实施流程示意图,以边缘侧设备的执行为例,该方法具体可以包括以下步骤:As shown in FIG. 1, it is a schematic diagram of the implementation flow of a method for uploading abnormal data to the cloud according to an embodiment of the present invention. Taking the execution of an edge-side device as an example, the method may specifically include the following steps:

步骤S101、接收云网络发送的异常数据获取请求,异常数据获取请求中携带至少一个数据要求。Step S101: Receive an abnormal data acquisition request sent by a cloud network, where the abnormal data acquisition request carries at least one data requirement.

为了使云网络接收到的异常数据更加符合分析的需求,在异常数据获取请求中,会加入至少一个数据要求,本步骤中的数据要求也就是对于数据的格式、数据中需要包含的数据字段的要求。In order to make the abnormal data received by the cloud network more in line with the analysis requirements, at least one data requirement will be added to the abnormal data acquisition request. Require.

步骤S102、从异常数据获取请求中提取目标数据要求;目标数据要求包含有数据格式和至少一个数据字段。Step S102, extracting target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field.

边缘侧设备在接收到异常数据获取请求后,首先需要将异常数据获取请求中的数据要求提取出来,由于边缘侧设备可能会有多个,而云网络发送异常数据获取请求可能是同时发送给多个边缘侧设备的,而每个边缘侧设备中与异常事件相关的数据内容可能是不同的数据字段,那么针对不同的边缘侧设备,可以设置不同的数据要求,具体的,异常数据获取请求中还可以携带有设备标识,且每个设备标识与数据要求之间一一对应。After the edge-side device receives the abnormal data acquisition request, it first needs to extract the data requirements in the abnormal data acquisition request. Since there may be multiple edge-side devices, the abnormal data acquisition request sent by the cloud network may be sent to multiple devices at the same time. For each edge-side device, and the data content related to abnormal events in each edge-side device may be different data fields, different data requirements can be set for different edge-side devices. Specifically, in the abnormal data acquisition request It can also carry device identifiers, and each device identifier has a one-to-one correspondence with data requirements.

在一个具体的例子中,以有3个边缘侧设备为例,异常数据获取请求可以为{设备标识1,数据要求1;设备标识2,数据要求2;设备标识3,数据要求3}。In a specific example, taking three edge-side devices as an example, the abnormal data acquisition request may be {device ID 1, data request 1; device ID 2, data request 2; device ID 3, data request 3}.

对应的,若边缘侧设备有多个时,本步骤具体的执行可以如图2所示,为本发明实施例提供的一种异常数据上云方法中提取数据要求的实施流程示意图,具体可以包括以下步骤:Correspondingly, if there are multiple edge-side devices, the specific execution of this step may be as shown in FIG. 2 , which is a schematic diagram of the implementation flow of data extraction requirements in a method for uploading abnormal data to the cloud provided by the embodiment of the present invention, which may specifically include: The following steps:

步骤S201、查找与边缘侧设备的标识对应的目标设备标识。Step S201 , searching for a target device identification corresponding to the identification of the edge side device.

由于异常数据获取请求中包含了多个数据请求,且每个数据请求都对应着一个设备标识,为了找到与边缘侧设备相匹配的数据要求,本步骤中会从异常数据获取请求中查找与边缘侧设备的标识对应的设备标识,作为目标设备标识。Since the abnormal data acquisition request contains multiple data requests, and each data request corresponds to a device ID, in order to find the data requirements that match the edge-side device, in this step, the abnormal data acquisition request will be The device ID corresponding to the ID of the side device is used as the target device ID.

一般,边缘侧设备的标识可以是某个边缘侧设备区别于其他边缘侧设备的唯一标识,比如边缘侧设备的地址码,而本实施例中的设备标识可以是前述的唯一标识,也可以是某一类边缘侧设备都具有的标识。Generally, the identifier of the edge-side device may be a unique identifier of an edge-side device that is different from other edge-side devices, such as the address code of the edge-side device, and the device identifier in this embodiment may be the aforementioned unique identifier, or it may be An identifier that a certain type of edge-side device has.

对于设备标识是边缘侧设备的唯一标识的情况,本步骤只需要查找与边缘侧设备的标识相同的设备标识作为目标设备标识。In the case where the device identifier is the unique identifier of the edge-side device, this step only needs to search for the device identifier that is the same as the edge-side device identifier as the target device identifier.

对于设备标识是某一类边缘侧设备都具有的标识的情况,则需要使边缘侧设备的标识中具有该边缘侧设备所属设备类型的标识,比如,边缘侧设备的标识中包含三个字段,即a、b、c,其中,b字段标识该边缘侧设备的类型,那么本步骤中的设备标识则可以是b字段,对于该情况,本步骤则需要将与边缘侧设备的标识中的b字段中的内容相同的设备标识,作为目标设备标识。In the case where the device ID is an ID possessed by a certain type of edge-side device, the ID of the edge-side device needs to include the ID of the device type to which the edge-side device belongs. For example, the ID of the edge-side device contains three fields. That is, a, b, and c, where the b field identifies the type of the edge device, then the device identification in this step can be the b field. In this case, this step needs to match the b in the edge device identification The device ID with the same content in the field is used as the target device ID.

步骤S202、提取与目标设备标识对应的数据要求作为目标数据要求。Step S202, extracting the data requirement corresponding to the target device identifier as the target data requirement.

在确定好目标设备标识后,本步骤便可以从异常数据获取请求中提取与目标设备标识对应的数据要求作为目标数据要求。After the target device identifier is determined, in this step, the data requirement corresponding to the target device identifier can be extracted from the abnormal data acquisition request as the target data requirement.

需要说明的是,目标数据要求中可以包括数据格式以及至少一个数据字段,数据格式指的是生成数据时所要依据的格式,比如数据中包括有哪些数据类型、每个数据类型所占据的数据位;而数据字段则指的是数据中需要包含哪些内容,比如压力、温度等。It should be noted that the target data requirements may include a data format and at least one data field. The data format refers to the format based on which data is generated, such as which data types are included in the data, and the data bits occupied by each data type. ; The data field refers to what content needs to be included in the data, such as pressure, temperature, etc.

还是以前述包含有3个边缘侧设备的情况为例,若步骤S201中确定的目标设备标识为设备标识2,那么本步骤则是将设备标识2对应的数据要求2提取出来,作为目标数据要求。Or take the aforementioned situation including 3 edge side devices as an example, if the target device identification determined in step S201 is device identification 2, then this step is to extract the data requirement 2 corresponding to the device identification 2 as the target data requirement. .

步骤S103、从存储的与异常事件相关的数据记录中,调取与目标数据要求中数据字段对应的目标数据内容。Step S103: From the stored data record related to the abnormal event, retrieve the target data content corresponding to the data field in the target data request.

由于前述步骤中确定好的目标数据要求中包含有至少一个数据字段,那么本步骤中,便可以从存储的与异常事件相关的数据记录中,调取与目标数据要求中的数据字段对应的目标数据内容。Since the target data request determined in the preceding steps includes at least one data field, in this step, the target data corresponding to the data field in the target data request can be retrieved from the stored data records related to the abnormal event. data content.

需要说明的是,异常事件指的是边缘侧设备定义的发生异常的事件,由于异常事件发生时,边缘侧设备会将与异常事件相关的数据记录进行存储,比如异常事件发生时采集的一些测点的数据,或者是异常事件发生前后采集的一些测点的数据。It should be noted that an abnormal event refers to an abnormal event defined by an edge-side device. When an abnormal event occurs, the edge-side device will store data records related to the abnormal event, such as some measurements collected when the abnormal event occurs. point data, or the data of some measurement points collected before and after an abnormal event occurs.

具体的,数据要求中可以包含多个数据字段,那么调取目标数据内容的具体执行可以如图3所示,为本发明实施例提供的一种异常数据上云方法中调取目标数据内容的实施流程示意图,具体可以包括以下步骤:Specifically, the data request may contain multiple data fields, and the specific execution of retrieving the target data content may be as shown in FIG. 3 , which is the method for retrieving the target data content in the cloud method for abnormal data provided by the embodiment of the present invention. A schematic diagram of the implementation process, which may specifically include the following steps:

步骤S301、提取目标数据要求中的所有数据字段。Step S301, extract all data fields in the target data request.

步骤S302、从数据要求包含的所有数据字段中确定边缘侧设备所支持的目标数据字段。Step S302: Determine the target data field supported by the edge-side device from all the data fields included in the data request.

一般,在目标数据要求中,会预先设置有多个数据字段,而边缘侧设备中与异常事件相关的数据记录中可能不会存在所有数据字段对应的数据,也就是边缘侧设备不支持这些可能不会存在所有数据字段,此时,边缘侧设备只需要将数据要求中包含的边缘侧设备所支持的数据字段确定为目标数据字段即可。Generally, in the target data requirements, multiple data fields are preset, and the data records related to abnormal events in the edge-side device may not contain data corresponding to all data fields, that is, the edge-side device does not support these possibilities. Not all data fields exist. In this case, the edge-side device only needs to determine the data field supported by the edge-side device included in the data request as the target data field.

在一个具体的例子中,比如目标数据要求中包含了压力的数据字段和温度的数据字段,而边缘侧设备中与异常事件相关的数据记录只有压力数据,这种情况下,边缘侧设备就只支持压力的数据字段,不支持温度的数据字段,此时就可以将压力的数据字段确定为目标数据字段。In a specific example, for example, the target data request contains the pressure data field and the temperature data field, and the data records related to abnormal events in the edge-side device only have pressure data. In this case, the edge-side device only If the data field of pressure is supported, but the data field of temperature is not supported, then the data field of pressure can be determined as the target data field.

步骤S303、调取目标数据字段对应的数据内容作为目标数据内容。Step S303, fetching the data content corresponding to the target data field as the target data content.

在确定好目标数据字段后,则可以将存储的与异常事件相关的数据记录中,目标数据字段对应的数据内容作为目标数据内容。After the target data field is determined, the data content corresponding to the target data field in the stored data records related to the abnormal event may be used as the target data content.

步骤S104、将调取到的目标数据内容按照数据格式生成异常数据。Step S104 , generating abnormal data according to the data format of the content of the retrieved target data.

需要说明的是,数据格式与数据字段有一定的关系,数据格式会为每个数据字段准备对应的数据位,由于数据字段中的数据内容会有对应的数据类型,比如压力的数据字段的数据类型为浮点型,也就是float,那么其所要占据的数据位就是32位。It should be noted that the data format has a certain relationship with the data field. The data format will prepare corresponding data bits for each data field, because the data content in the data field will have a corresponding data type, such as the data of the pressure data field. The type is a floating point type, that is, float, then the data bits to be occupied by it are 32 bits.

当然,数据格式中还会为每个数据字段安排前后顺序,也就是高低位,在一个具体的例子中,本步骤调取到3个数据字段的目标数据内容,比如是压力的数据字段的目标数据内容、温度的数据字段的目标数据内容以及湿度的数据字段的目标数据内容,三者都是浮点型,那么该数据格式便可以是{压力的数据字段(32位),温度的数据字段(32位),湿度的数据字段(32位)}。Of course, the data format also arranges the sequence of each data field before and after, that is, the high and low bits. In a specific example, this step retrieves the target data content of the three data fields, such as the target of the pressure data field. The data content, the target data content of the temperature data field and the target data content of the humidity data field are all floating point types, then the data format can be {pressure data field (32 bits), temperature data field (32 bits), data field for humidity (32 bits)}.

因此,本步骤中生成异常数据的过程便可以是将目标数据内容放到对应的数据字段的数据位中。Therefore, the process of generating abnormal data in this step may be to put the target data content into the data bits of the corresponding data field.

步骤S105、发送异常数据至云网络。Step S105, sending abnormal data to the cloud network.

将异常数据发送至云网络时,可以将异常数据直接发送到异常数据获取请求的发送方,比如云服务器,当然,为了减缓边缘侧设备与云服务器之间的网络压力,可以将异常数据发送到异常数据获取请求的发送方所在云网络的kafka集群中,云服务器在需要获取异常数据时,直接从kafka集群进行获取即可。需要说明的是,kafka集群的工作机制可以参考相关技术,此处不再赘述。When sending abnormal data to the cloud network, the abnormal data can be sent directly to the sender of the abnormal data acquisition request, such as the cloud server. Of course, in order to reduce the network pressure between the edge device and the cloud server, the abnormal data can be sent to the In the Kafka cluster of the cloud network where the sender of the abnormal data acquisition request is located, the cloud server can directly acquire the abnormal data from the Kafka cluster when it needs to acquire abnormal data. It should be noted that the working mechanism of the kafka cluster can refer to related technologies, which will not be repeated here.

本发明实施例提供的技术方案,边缘侧设备接收到云网络发送的异常数据获取请求后,先从异常数据获取请求中提取数据要求,其中,数据要求包含有数据格式以及至少一个数据字段,然后从存储的与异常事件相关的数据记录中,调取与数据格式中数据字段对应的目标数据内容,再将调取到的目标数据内容按照数据格式生成异常数据,最后将生成的异常数据发送至云网络,由于边缘侧设备在生成异常数据时,是按照云网络发送的异常数据获取请求中的数据要求生成的,此时云网络接收到的异常数据的数据格式和数据字段便是符合云网络对异常数据进行分析的需求的,现对于现有技术中云网络接收到的不同采集方式以及不同采集字段的数据,利用本实施例的技术方案生成的异常数据明显会加快对异常数据的分析速度,有效避免了因数据格式以及数据字段不满足分析需求造成的无法及时对异常数据进行分析的问题。In the technical solution provided by the embodiment of the present invention, after receiving the abnormal data acquisition request sent by the cloud network, the edge side device first extracts the data requirements from the abnormal data acquisition request, wherein the data requirements include a data format and at least one data field, and then From the stored data records related to abnormal events, retrieve the target data content corresponding to the data fields in the data format, and then generate abnormal data according to the data format from the retrieved target data content, and finally send the generated abnormal data to In the cloud network, when the edge-side device generates abnormal data, it is generated according to the data requirements in the abnormal data acquisition request sent by the cloud network. At this time, the data format and data fields of the abnormal data received by the cloud network are consistent with the cloud network. For the needs of analyzing abnormal data, for the data of different collection methods and different collection fields received by the cloud network in the prior art, the abnormal data generated by the technical solution of this embodiment will obviously speed up the analysis speed of the abnormal data. , which effectively avoids the problem that abnormal data cannot be analyzed in time due to data formats and data fields that do not meet the analysis requirements.

由于云网络发送的异常数据获取请求是针对大部分边缘侧设备的,其数据要求中的数据字段可能无法涵盖边缘侧设备中与异常事件相关的数据记录,也就是边缘侧设备的所支持的所有数据字段与数据要求的数据字段不一致,比如边缘侧设备中与异常事件相关的数据记录有压力的数据字段、温度的数据字段以及湿度的数据字段,但是云网络发送的异常数据获取请求的数据要求中的数据字段只有压力的数据字段和温度的数据字段,针对这种情况,本实施例还提供了一种扩展数据要求中的数据字段的方案。Since the abnormal data acquisition request sent by the cloud network is aimed at most edge-side devices, the data fields in the data request may not cover the data records related to abnormal events in the edge-side device, that is, all the data records supported by the edge-side device. The data fields are inconsistent with the data fields required by the data. For example, the data records related to abnormal events in the edge-side device contain pressure data fields, temperature data fields, and humidity data fields, but the abnormal data sent by the cloud network The data requirements of the request The data fields in the data field are only pressure data fields and temperature data fields. In view of this situation, this embodiment also provides a solution for extending the data fields in the data requirements.

具体可以如图4所示,为本发明实施例提供的一种异常数据上云方法中扩展数据要求中的数据字段的实施流程示意图,具体可以包括以下步骤:Specifically, as shown in FIG. 4, it is a schematic diagram of the implementation flow of the data fields in the extended data requirements in a method for uploading abnormal data to the cloud provided by an embodiment of the present invention, which may specifically include the following steps:

步骤S401、获取边缘侧设备所支持的所有数据字段。Step S401: Acquire all data fields supported by the edge-side device.

本步骤中获取边缘侧设备所支持的所有数据字段的特征定义可以参考图3所示的方案,此处不再赘述。In this step, the feature definitions of all the data fields supported by the edge-side device can be obtained with reference to the solution shown in FIG. 3 , and details are not repeated here.

需要说明的是,本步骤中获取的所有数据字段为边缘侧设备能够支持的数据字段,支持的含义可以参考步骤S302中定义的含义,此处不再赘述。It should be noted that all the data fields obtained in this step are data fields that can be supported by the edge-side device, and the supported meanings can refer to the meanings defined in step S302, which will not be repeated here.

步骤S402、判断边缘侧设备的所支持的所有数据字段是否与数据要求的数据字段一致。Step S402, judging whether all the data fields supported by the edge-side device are consistent with the data fields required by the data.

需要说明的是,在本步骤中,若边缘侧设备的所支持的所有数据字段与数据要求的数据字段完全一样,则判断为一致;若边缘侧设备的所支持的所有数据字段中有与数据要求的数据字段不同的数据字段,则判断为不一致。It should be noted that, in this step, if all the data fields supported by the edge side device are exactly the same as the data fields required by the data, it is determined to be consistent; if all the data fields supported by the edge side device have the same data Data fields with different required data fields are judged to be inconsistent.

步骤上403、若边缘侧设备的所支持的所有数据字段与数据要求的数据字段不一致,将边缘侧设备的所支持的所有数据字段中区别于数据要求的数据字段确定为扩展数据字段。Step 403: If all the data fields supported by the edge device are inconsistent with the data fields required by the data, determine the data fields different from the data requirements among all the data fields supported by the edge device as the extended data fields.

在判断结果为边缘侧设备的所支持的所有数据字段与数据要求的数据字段不一致时,也就是若边缘侧设备的所支持的所有数据字段中有与数据要求的数据字段不同的数据字段,为了提高云网络中的异常数据涵盖的与异常事件相关的数据记录的全面性,可以将有区别的数据字段加入到数据要求中,因此,本步骤中便可以先将边缘侧设备的所支持的所有数据字段中区别于数据要求的数据字段确定为扩展数据字段。When the judgment result is that all the data fields supported by the edge-side device are inconsistent with the data fields required by the data, that is, if all the data fields supported by the edge-side device have data fields that are different from the data fields required by the data, in order to To improve the comprehensiveness of data records related to abnormal events covered by the abnormal data in the cloud network, differentiated data fields can be added to the data requirements. Therefore, in this step, all data supported by edge devices can be Among the data fields, data fields different from the data requirements are determined as extended data fields.

步骤S404、将所述扩展数据字段加入接收到的所述数据要求中,对所述数据格式进行更新,以利用更新后数据格式进行生成异常数据。Step S404: Add the extended data field to the received data request, and update the data format to generate abnormal data using the updated data format.

具体的,本步骤中将扩展数据字段加入到数据要求中的过程可以分为两个过程,一是将扩展数据字段加入到数据要求原有的数据字段形成的集合中,使更新后的数据要求不仅包括原有的数据字段,还包括扩展数据字段;二是还需要将扩展数据字段加入到数据格式中,以使数据格式中有扩展数据字段的存放位置,那么此时就需要先判断扩展数据字段的数据类型,仍以浮点型为例,其需要占据32个数据位,扩展数据字段的位置可以但不仅限于是在原有的数据字段之后,那么此时数据格式就需要在后边增加32个数据位,以存放扩展数据字段对应的数据内容。Specifically, the process of adding the extended data field to the data request in this step can be divided into two processes. One is to add the extended data field to the set formed by the original data field of the data request, so that the updated data request It includes not only the original data field, but also the extended data field; secondly, the extended data field needs to be added to the data format, so that the data format has the storage location of the extended data field, then it is necessary to judge the extended data first. The data type of the field is still taking the floating point type as an example, which needs to occupy 32 data bits. The position of the extended data field can be, but is not limited to, after the original data field. At this time, the data format needs to be added after 32 Data bits to store the data content corresponding to the extended data field.

由于异常数据的上云并非一次性工作,而是需要重复地进行,那么边缘侧设备中可能会存储有历史异常数据获取请求,为了提高异常数据的发送效率,边缘侧设备还可以沿用历史异常数据获取请求中的数据要求,本实施例可以将历史异常数据获取请求中的数据要求称为本地数据要求,需要说明的是,历史异常数据获取请求指的是在本次接收云网络发送的异常数据获取请求之前接收到的历史异常数据获取请求,为了实施本实施例中的方案,边缘侧设备每次接收到云网络发送的异常数据获取请求之后,都会按照接收到的时间存储到边缘侧设备的存储器中。Since abnormal data uploading to the cloud is not a one-time job, but needs to be repeated, the edge-side device may store historical abnormal data acquisition requests. In order to improve the transmission efficiency of abnormal data, the edge-side device can also use historical abnormal data. The data requirements in the acquisition request. In this embodiment, the data requirements in the historical abnormal data acquisition request may be referred to as local data requirements. It should be noted that the historical abnormal data acquisition request refers to the abnormal data sent by the cloud network received this time. The historical abnormal data acquisition request received before the acquisition request, in order to implement the solution in this embodiment, every time the edge-side device receives the abnormal data acquisition request sent by the cloud network, it will be stored in the edge-side device according to the received time. in memory.

具体沿用的过程可以如图5所示,为本发明实施例提供的一种异常数据上云方法中沿用本地数据要求生成异常数据的实施流程示意图,具体可以包括以下步骤:The specific follow-up process can be shown in FIG. 5 , which is a schematic diagram of the implementation process of using local data to generate abnormal data in a method for uploading abnormal data to the cloud provided by an embodiment of the present invention, which may specifically include the following steps:

步骤S501、判断边缘侧设备是否存储有历史异常数据获取请求对应的本地数据要求。Step S501, judging whether the edge-side device stores the local data requirement corresponding to the historical abnormal data acquisition request.

本步骤中,判断边缘侧设备是否存储有历史异常数据获取请求对应的本地数据要求可以直接从边缘侧设备的存储器中直接查询即可,如果查询到了异常数据获取请求,则判断存储有历史异常数据获取请求;若没有查询到异常数据获取请求,则判断未存储有历史异常数据获取请求。In this step, to determine whether the edge-side device stores the local data requirements corresponding to the historical abnormal data acquisition request, it can be directly queried from the memory of the edge-side device. If the abnormal data acquisition request is queried, it is determined that historical abnormal data is stored. Acquisition request; if no abnormal data acquisition request is found, it is determined that no historical abnormal data acquisition request is stored.

步骤S502、若存储有本地数据要求,按照本地数据要求生成异常数据。Step S502, if the local data requirements are stored, generate abnormal data according to the local data requirements.

由于边缘侧设备每次接收到云网络发送的异常数据获取请求之后,都会按照接收到的时间存储到边缘侧设备的存储器中,因此,此时存储器中可能有不同时间接收到的历史异常数据获取请求,本步骤生成异常数据所依据的本地数据要求,可以是接收的时间最新的历史异常数据获取请求中的数据要求。Since every time the edge-side device receives the abnormal data acquisition request sent by the cloud network, it will be stored in the memory of the edge-side device according to the time of receipt. Therefore, at this time, there may be historical abnormal data acquisition received at different times in the memory. request, the local data requirement on which the abnormal data is generated in this step may be the data requirement in the historical abnormal data acquisition request with the latest received time.

需要说明的是,本步骤生成异常数据的过程与前述生成异常数据的过程只是依据的数据要求不同,因此,可以参考前述生成异常数据的过程,此处不再赘述。It should be noted that the process of generating abnormal data in this step is only based on different data requirements from the aforementioned process of generating abnormal data. Therefore, you can refer to the aforementioned process of generating abnormal data, which will not be repeated here.

另外,由于本地数据要求为云网络以往发送给边缘侧设备的,若云网络对于异常数据的需求发生了变化,边缘侧设备存储的本地数据要求可能就不再符合当前的需求,为了避免出现这种情况,在判断存储有本地数据要求时,按照本地数据要求生成异常数据之前,可以先判断本地数据要求与新的数据要求是否一致;若不一致,将新的数据要求更新为本地数据要求,以保证边缘侧设备的本地数据要求为最新的状态。In addition, since the local data requirements are sent by the cloud network to the edge devices in the past, if the cloud network's requirements for abnormal data change, the local data requirements stored by the edge devices may no longer meet the current requirements. In this case, when judging that there are local data requirements stored, before generating abnormal data according to the local data requirements, you can first determine whether the local data requirements are consistent with the new data requirements; if they are inconsistent, update the new data requirements to local data requirements. Ensure that the local data requirements of edge devices are up to date.

步骤S503、若未存储有本地数据要求,从云网络发送的异常数据获取请求中提取数据要求。Step S503: If there is no local data requirement stored, extract the data requirement from the abnormal data acquisition request sent by the cloud network.

需要说明的是,本步骤生成异常数据的过程可以参考前述生成异常数据的过程,此处不再赘述。It should be noted that, for the process of generating abnormal data in this step, reference may be made to the aforementioned process of generating abnormal data, which will not be repeated here.

如图6所示,为本发明实施例提供的一种异常数据上云方法的实施流程示意图,应用于云服务器,具体可以包括以下步骤:As shown in FIG. 6, it is a schematic diagram of the implementation flow of a method for uploading abnormal data to the cloud according to an embodiment of the present invention, which is applied to a cloud server, and may specifically include the following steps:

步骤S601、调取预先存储的目标数据要求,目标数据要求为与边缘侧设备具有映射关系的数据要求。Step S601: Retrieve a pre-stored target data requirement, where the target data requirement is a data requirement having a mapping relationship with the edge-side device.

需要说明的是,在云服务器一端,会设置有默认的数据要求,默认的数据要求是面向所有边缘的设备的,若云服务器想要获取某一个边缘侧设备的异常数据时,可以先判断该边缘侧设备是否是新的边缘侧设备,也就是以前未请求过异常数据的边缘侧设备,此处判断的依据是云服务器一端是否存在与边缘侧设备具有映射关系的数据要求,若没有,则将默认的数据要求确定为目标数据要求,并将目标数据要求与边缘侧设备进行映射(此处具体映射时可以利用边缘侧设备的标识,使边缘侧设备的标识与目标数据要求进行映射);若有,则将与边缘侧设备具有映射关系的数据要求确定为目标数据要求。It should be noted that on the cloud server side, default data requirements will be set. The default data requirements are for all edge devices. If the cloud server wants to obtain abnormal data from a certain edge device, it can first determine the Whether the edge-side device is a new edge-side device, that is, an edge-side device that has not requested abnormal data before, the judgment here is based on whether there is a data request that has a mapping relationship with the edge-side device on the cloud server side. If not, then Determine the default data requirement as the target data requirement, and map the target data requirement with the edge-side device (here, the identifier of the edge-side device can be used to map the identifier of the edge-side device with the target data requirement); If there is, the data requirement that has a mapping relationship with the edge-side device is determined as the target data requirement.

步骤S602、根据目标数据要求生成异常数据获取请求。Step S602, generating an abnormal data acquisition request according to the target data requirement.

步骤S603、将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照异常数据获取请求中的目标数据要求生成异常数据。Step S603: Send the abnormal data acquisition request to the edge-side device, so that the edge-side device generates abnormal data according to the target data requirements in the abnormal data acquisition request from the stored data records related to the abnormal event.

异常数据获取请求的相关说明以及边缘侧设备根据异常数据获取请求生成异常数据的过程可以参考前述实施例,此处不再赘述。For the relevant description of the abnormal data acquisition request and the process of generating abnormal data according to the abnormal data acquisition request by the edge device, reference may be made to the foregoing embodiments, which will not be repeated here.

步骤S604、接收边缘侧设备发送的异常数据。Step S604: Receive abnormal data sent by the edge-side device.

本步骤中接收异常数据可以根据边缘侧设备的发送方式的不同而有所区别,若边缘侧设备直接将异常数据发送至异常数据获取请求的发送方(即云服务器),云服务器就直接接受即可;若边缘侧设备发送异常数据至异常数据获取请求的发送方所在云网络中kafka集群,云服务器则可以通过kafka集群中进行接收。The abnormal data received in this step may be different according to the sending method of the edge-side device. If the edge-side device directly sends the abnormal data to the sender of the abnormal data acquisition request (ie, the cloud server), the cloud server directly accepts the abnormal data. Yes; if the edge-side device sends abnormal data to the Kafka cluster in the cloud network where the sender of the abnormal data acquisition request is located, the cloud server can receive it through the Kafka cluster.

针对前述图4的方案针对的边缘侧设备的所支持的所有数据字段与数据要求的数据字段不一致的情况,本实施例还提供了在云服务器更新数据要求的方案。For the situation that all data fields supported by the edge-side device targeted by the solution in FIG. 4 are inconsistent with the data fields required by the data, this embodiment also provides a solution for updating the data requirements on the cloud server.

如图7所示,为本发明实施例提供的一种异常数据上云方法中云服务器更新数据要求的实施流程示意图,具体可以包括以下步骤:As shown in FIG. 7 , it is a schematic flowchart of the implementation process of the cloud server update data requirement in a method for uploading abnormal data to the cloud provided by an embodiment of the present invention, which may specifically include the following steps:

步骤S701、判断接收到的异常数据中的数据字段是否超出目标数据要求的数据字段。Step S701, judging whether the data field in the received abnormal data exceeds the data field required by the target data.

步骤S702、若超出,将异常数据中不属于目标数据要求的数据字段确定为扩展数据字段。Step S702: If it exceeds, determine a data field in the abnormal data that does not meet the target data requirement as an extended data field.

需要说明的是,超出就是指接收到的异常数据中的数据字段有目标数据要求中的数据字段不包括的数据字段,也就是不属于目标数据要求的数据字段,此时便可以将异常数据中不属于目标数据要求的数据字段确定为扩展数据字段。It should be noted that exceeding means that the data fields in the received abnormal data have data fields that are not included in the data fields in the target data requirements, that is, data fields that do not belong to the target data requirements. Data fields that do not belong to the target data requirements are determined to be extended data fields.

步骤S703、将扩展数据字段增加到目标数据要求中。Step S703, adding the extended data field to the target data requirement.

具体增加的过程可以参考对步骤S404的相关说明,此处不再赘述。For the specific adding process, reference may be made to the relevant description of step S404, which will not be repeated here.

与上述方法实施例相对应,本发明实施例还提供了一种异常数据上云装置,如图8所示,为本发明实施例提供的一种异常数据上云装置的结构示意图,该装置包括:Corresponding to the above method embodiments, an embodiment of the present invention further provides an apparatus for uploading abnormal data to the cloud. As shown in FIG. 8 , it is a schematic structural diagram of an apparatus for uploading abnormal data to the cloud provided by the embodiment of the present invention. The apparatus includes: :

第一接收模块801,用于接收云网络发送的异常数据获取请求;异常数据获取请求中携带至少一个数据要求;Thefirst receiving module 801 is configured to receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;

提取模块802,用于从异常数据获取请求中提取目标数据要求;目标数据要求包含有数据格式和至少一个数据字段;anextraction module 802, configured to extract target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;

第一调取模块803,用于从存储的与异常事件相关的数据记录中,调取与目标数据要求中数据字段对应的目标数据内容;Thefirst retrieval module 803 is used to retrieve the target data content corresponding to the data field in the target data requirement from the stored data records related to the abnormal event;

第一生成模块804,用于将调取到的目标数据内容按照数据格式生成异常数据;Thefirst generation module 804 is used to generate abnormal data according to the data format of the retrieved target data content;

第一发送模块805,用于发送异常数据至云网络。Thefirst sending module 805 is configured to send abnormal data to the cloud network.

异常数据上云装置包括处理器和存储器,上述第一接收模块801、提取模块802、第一调取模块803、第一生成模块804、第一发送模块805等均作为程序模块存储在存储器中,由处理器执行存储在存储器中的上述程序模块来实现相应的功能。The abnormal data cloud device includes a processor and a memory, and the above-mentionedfirst receiving module 801, extractingmodule 802, first retrievingmodule 803,first generating module 804, first sendingmodule 805, etc. are all stored in the memory as program modules, The corresponding functions are implemented by the processor executing the above-mentioned program modules stored in the memory.

与上述方法实施例相对应,本发明实施例还提供了一种异常数据上云装置,如图9所示,为本发明实施例提供的一种异常数据上云装置的结构示意图,该装置包括:Corresponding to the above method embodiments, an embodiment of the present invention further provides an apparatus for uploading abnormal data to the cloud. As shown in FIG. 9 , it is a schematic structural diagram of an apparatus for uploading abnormal data to the cloud provided by the embodiment of the present invention. :

第二调取模块901,用于调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;Thesecond retrieval module 901 is configured to retrieve pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;

第二生成模块902,用于根据所述目标数据要求生成异常数据获取请求;Asecond generating module 902, configured to generate an abnormal data acquisition request according to the target data requirement;

第二发送模块903,用于将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照异常数据获取请求中的数据要求生成异常数据;Thesecond sending module 903 is configured to send the abnormal data acquisition request to the edge-side device, so that the edge-side device generates abnormal data according to the data requirements in the abnormal data acquisition request from the stored data records related to the abnormal event;

第二接收模块904,用于接收边缘侧设备发送的异常数据。Thesecond receiving module 904 is configured to receive abnormal data sent by the edge-side device.

本发明实施例还提供了一种存储介质(计算机可读存储介质)。这里的存储介质存储有一个或者多个程序。其中,存储介质可以包括易失性存储器,例如随机存取存储器;存储器也可以包括非易失性存储器,例如只读存储器、快闪存储器、硬盘或固态硬盘;存储器还可以包括上述种类的存储器的组合。The embodiment of the present invention also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. Wherein, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid-state hard disk; the memory may also include the above-mentioned types of memory. combination.

当存储介质中一个或者多个程序可被一个或者多个处理器执行,以实现上述在电子设备侧执行的异常数据上云方法。When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned method for uploading abnormal data to the cloud executed on the electronic device side is implemented.

处理器用于执行存储器中存储的异常数据上云程序,以实现以下在电子设备侧执行的异常数据上云方法的步骤:The processor is configured to execute the abnormal data cloud program stored in the memory, so as to realize the following steps of the abnormal data cloud method executed on the electronic device side:

接收云网络发送的异常数据获取请求;异常数据获取请求中携带至少一个数据要求;Receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;

从异常数据获取请求中提取目标数据要求;目标数据要求包含有数据格式和至少一个数据字段;Extract the target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;

从存储的与异常事件相关的数据记录中,调取与目标数据要求中数据字段对应的目标数据内容;From the stored data record related to the abnormal event, retrieve the target data content corresponding to the data field in the target data request;

将调取到的目标数据内容按照数据格式生成异常数据;Generate abnormal data according to the data format of the retrieved target data content;

发送异常数据至云网络。Send abnormal data to cloud network.

在本发明的可选实施方式中,异常数据获取请求中携带有设备标识,每个设备标识与数据要求之间一一对应;In an optional embodiment of the present invention, the abnormal data acquisition request carries a device identifier, and there is a one-to-one correspondence between each device identifier and the data requirement;

从异常数据获取请求中提取数据要求,包括:Extract data requirements from abnormal data fetch requests, including:

查找与边缘侧设备的标识对应的目标设备标识;Find the target device ID corresponding to the ID of the edge device;

提取与目标设备标识对应的数据要求作为目标数据要求。Extract the data requirement corresponding to the target device identification as the target data requirement.

在本发明的可选实施方式中,数据要求中包含有多个数据字段;In an optional embodiment of the present invention, the data request includes a plurality of data fields;

调取与目标数据要求中数据字段对应的目标数据内容,包括:Retrieve the target data content corresponding to the data field in the target data request, including:

提取目标数据要求中的所有数据字段;Extract all data fields in the target data request;

从所有数据字段中确定边缘侧设备所支持的目标数据字段;Determine the target data field supported by the edge-side device from all data fields;

调取目标数据字段对应的数据内容作为目标数据内容。The data content corresponding to the target data field is called as the target data content.

在本发明的可选实施方式中,发送异常数据至云网络,包括:In an optional embodiment of the present invention, sending abnormal data to the cloud network includes:

发送异常数据至异常数据获取请求的发送方;Send abnormal data to the sender of the abnormal data acquisition request;

或者,or,

发送异常数据至异常数据获取请求的发送方所在云网络中kafka集群。Send abnormal data to the kafka cluster in the cloud network where the sender of the abnormal data acquisition request is located.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

获取边缘侧设备所支持的所有数据字段;Get all data fields supported by edge devices;

判断边缘侧设备的所支持的所有数据字段是否与数据要求的数据字段一致;Determine whether all the data fields supported by the edge-side device are consistent with the data fields required by the data;

若边缘侧设备的所支持的所有数据字段与数据要求的数据字段不一致,将边缘侧设备的所支持的所有数据字段中区别于数据要求的数据字段确定为扩展数据字段;If all the data fields supported by the edge-side device are inconsistent with the data fields required by the data, determine the data fields that are different from the data requirements among all the data fields supported by the edge-side device as extended data fields;

将所述扩展数据字段加入接收到的所述数据要求中,对所述数据格式进行更新,以利用更新后数据格式进行生成异常数据。The extended data field is added to the received data request, and the data format is updated to generate abnormal data using the updated data format.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

判断边缘侧设备是否存储有历史异常数据获取请求对应的本地数据要求;Determine whether the edge-side device stores the local data requirements corresponding to the historical abnormal data acquisition request;

若存储有本地数据要求,按照本地数据要求生成异常数据;If there are local data requirements for storage, abnormal data will be generated according to the local data requirements;

若未存储有本地数据要求,从云网络发送的异常数据获取请求中提取数据要求。If no local data requirements are stored, the data requirements are extracted from the abnormal data acquisition request sent by the cloud network.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

若存储有本地数据要求,判断本地数据要求与新的数据要求是否一致;If there are local data requirements stored, determine whether the local data requirements are consistent with the new data requirements;

若本地数据要求与新的数据要求不一致,将新的数据要求更新为本地数据要求。If the local data request is inconsistent with the new data request, update the new data request to the local data request.

或者,or,

调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;retrieving pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;

根据所述目标数据要求生成异常数据获取请求;Generate an abnormal data acquisition request according to the target data requirements;

将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照异常数据获取请求中的数据要求生成异常数据;Send the abnormal data acquisition request to the edge-side device, so that the edge-side device generates abnormal data according to the data requirements in the abnormal data acquisition request from the stored data records related to the abnormal event;

接收边缘侧设备发送的异常数据。Receive abnormal data sent by edge devices.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

判断接收到的异常数据中的数据字段是否超出所述目标数据要求的数据字段;Determine whether the data field in the received abnormal data exceeds the data field required by the target data;

若超出,将异常数据中不属于所述目标数据要求的数据字段确定为扩展数据字段;If it exceeds, the data fields in the abnormal data that do not belong to the target data requirements are determined as extended data fields;

将扩展数据字段增加到目标数据要求中。Add extended data fields to target data requirements.

本发明实施例提供了一种处理器,处理器用于运行程序,其中,程序运行时执行:接收云网络发送的异常数据获取请求;异常数据获取请求中携带至少一个数据要求;从异常数据获取请求中提取目标数据要求;目标数据要求包含有数据格式和至少一个数据字段;从存储的与异常事件相关的数据记录中,调取与目标数据要求中数据字段对应的目标数据内容;将调取到的目标数据内容按照数据格式生成异常数据;发送异常数据至云网络。或者,调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;根据所述目标数据要求生成异常数据获取请求;将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照异常数据获取请求中的数据要求生成异常数据;接收边缘侧设备发送的异常数据。An embodiment of the present invention provides a processor, where the processor is used to run a program, wherein when the program is running, it executes: receiving an abnormal data acquisition request sent by a cloud network; the abnormal data acquisition request carries at least one data request; and the abnormal data acquisition request is obtained from the abnormal data. Extract the target data requirements from the target data requirements; the target data requirements include a data format and at least one data field; from the stored data records related to abnormal events, retrieve the target data content corresponding to the data fields in the target data requirements; The target data content of the server generates abnormal data according to the data format; sends the abnormal data to the cloud network. Or, retrieve a pre-stored target data requirement, where the target data requirement is a data requirement that has a mapping relationship with the edge-side device; generate an abnormal data acquisition request according to the target data requirement; send the abnormal data acquisition request to the edge side device, so that the edge side device records the stored data related to the abnormal event to generate abnormal data according to the data requirements in the abnormal data acquisition request; and receives the abnormal data sent by the edge side device.

图10为本发明实施例提供的一种电子设备的结构示意图,图10所示的电子设备100包括:至少一个处理器1001、以及与处理器1001连接的至少一个存储器1002、总线1003;其中,处理器1001、存储器1002通过总线1003完成相互间的通信;处理器用于调用存储器中的程序指令,以执行上述的异常数据上云方法。本文中的电子设备可以是服务器、PC、PAD、手机等。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Theelectronic device 100 shown in FIG. 10 includes: at least oneprocessor 1001, and at least onememory 1002 and abus 1003 connected to theprocessor 1001; wherein, Theprocessor 1001 and thememory 1002 communicate with each other through thebus 1003; the processor is used to call program instructions in the memory to execute the above-mentioned method for uploading abnormal data to the cloud. The electronic devices herein can be servers, PCs, PADs, mobile phones, and the like.

本发明还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:The present invention also provides a computer program product that, when executed on a data processing device, is adapted to execute a program initialized with the following method steps:

接收云网络发送的异常数据获取请求;异常数据获取请求中携带至少一个数据要求;Receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;

从异常数据获取请求中提取目标数据要求;目标数据要求包含有数据格式和至少一个数据字段;Extract the target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;

从存储的与异常事件相关的数据记录中,调取与目标数据要求中数据字段对应的目标数据内容;From the stored data record related to the abnormal event, retrieve the target data content corresponding to the data field in the target data request;

将调取到的目标数据内容按照数据格式生成异常数据;Generate abnormal data according to the data format of the retrieved target data content;

发送异常数据至云网络。Send abnormal data to cloud network.

在本发明的可选实施方式中,异常数据获取请求中携带有设备标识,每个设备标识与数据要求之间一一对应;In an optional embodiment of the present invention, the abnormal data acquisition request carries a device identifier, and there is a one-to-one correspondence between each device identifier and the data requirement;

从异常数据获取请求中提取数据要求,包括:Extract data requirements from abnormal data fetch requests, including:

查找与边缘侧设备的标识对应的目标设备标识;Find the target device ID corresponding to the ID of the edge device;

提取与目标设备标识对应的数据要求作为目标数据要求。Extract the data requirement corresponding to the target device identification as the target data requirement.

在本发明的可选实施方式中,数据要求中包含有多个数据字段;In an optional embodiment of the present invention, the data request includes a plurality of data fields;

调取与目标数据要求中数据字段对应的目标数据内容,包括:Retrieve the target data content corresponding to the data field in the target data request, including:

提取目标数据要求中的所有数据字段;Extract all data fields in the target data request;

从所有数据字段中确定边缘侧设备所支持的目标数据字段;Determine the target data field supported by the edge-side device from all data fields;

调取目标数据字段对应的数据内容作为目标数据内容。The data content corresponding to the target data field is called as the target data content.

在本发明的可选实施方式中,发送异常数据至云网络,包括:In an optional embodiment of the present invention, sending abnormal data to the cloud network includes:

发送异常数据至异常数据获取请求的发送方;Send abnormal data to the sender of the abnormal data acquisition request;

或者,or,

发送异常数据至异常数据获取请求的发送方所在云网络中kafka集群。Send abnormal data to the kafka cluster in the cloud network where the sender of the abnormal data acquisition request is located.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

获取边缘侧设备所支持的所有数据字段;Get all data fields supported by edge devices;

判断边缘侧设备的所支持的所有数据字段是否与数据要求的数据字段一致;Determine whether all the data fields supported by the edge-side device are consistent with the data fields required by the data;

若边缘侧设备的所支持的所有数据字段与数据要求的数据字段不一致,将边缘侧设备的所支持的所有数据字段中区别于数据要求的数据字段确定为扩展数据字段;If all the data fields supported by the edge-side device are inconsistent with the data fields required by the data, determine the data fields that are different from the data requirements among all the data fields supported by the edge-side device as extended data fields;

将所述扩展数据字段加入接收到的所述数据要求中,对所述数据格式进行更新,以利用更新后数据格式进行生成异常数据。The extended data field is added to the received data request, and the data format is updated to generate abnormal data using the updated data format.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

判断边缘侧设备是否存储有历史异常数据获取请求对应的本地数据要求;Determine whether the edge-side device stores the local data requirements corresponding to the historical abnormal data acquisition request;

若存储有本地数据要求,按照本地数据要求生成异常数据;If there are local data requirements for storage, abnormal data will be generated according to the local data requirements;

若未存储有本地数据要求,从云网络发送的异常数据获取请求中提取数据要求。If no local data requirements are stored, the data requirements are extracted from the abnormal data acquisition request sent by the cloud network.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

若存储有本地数据要求,判断本地数据要求与新的数据要求是否一致;If there are local data requirements stored, determine whether the local data requirements are consistent with the new data requirements;

若本地数据要求与新的数据要求不一致,将新的数据要求更新为本地数据要求。If the local data request is inconsistent with the new data request, update the new data request to the local data request.

或者,or,

调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;retrieving pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;

根据所述目标数据要求生成异常数据获取请求;Generate an abnormal data acquisition request according to the target data requirements;

将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照异常数据获取请求中的数据要求生成异常数据;Send the abnormal data acquisition request to the edge-side device, so that the edge-side device generates abnormal data according to the data requirements in the abnormal data acquisition request from the stored data records related to the abnormal event;

接收边缘侧设备发送的异常数据。Receive abnormal data sent by edge devices.

在本发明的可选实施方式中,方法还包括:In an optional embodiment of the present invention, the method further comprises:

判断接收到的异常数据中的数据字段是否超出所述目标数据要求的数据字段;Determine whether the data field in the received abnormal data exceeds the data field required by the target data;

若超出,将异常数据中不属于所述目标数据要求的数据字段确定为扩展数据字段;If it exceeds, the data fields in the abnormal data that do not belong to the target data requirements are determined as extended data fields;

将扩展数据字段增加到目标数据要求中。Add extended data fields to target data requirements.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

在一个典型的配置中,设备包括一个或多个处理器(CPU)、存储器和总线。设备还可以包括输入/输出接口、网络接口等。In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. Devices may also include input/output interfaces, network interfaces, and the like.

存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。存储器是计算机可读介质的示例。Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (flash RAM), the memory including at least one memory chip. Memory is an example of a computer-readable medium.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change 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), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, excludes transitory computer-readable media, such as modulated data signals and carrier waves.

还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements, but also Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture or apparatus that includes the element.

本领域技术人员应明白,本发明的实施例可提供为方法、系统或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

以上仅为本发明的实施例而已,并不用于限制本发明。对于本领域技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本发明的权利要求范围之内。The above are only embodiments of the present invention, and are not intended to limit the present invention. Various modifications and variations of the present invention are possible for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.

Claims (10)

Translated fromChinese
1.一种异常数据上云方法,其特征在于,应用于边缘侧设备,所述方法包括:1. A method for uploading abnormal data to the cloud, characterized in that, applied to an edge side device, the method comprising:接收云网络发送的异常数据获取请求;所述异常数据获取请求中携带至少一个数据要求;Receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;从所述异常数据获取请求中提取目标数据要求;所述目标数据要求包含有数据格式和至少一个数据字段;Extract target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;从存储的与异常事件相关的数据记录中,调取与所述目标数据要求中数据字段对应的目标数据内容;From the stored data record related to the abnormal event, retrieve the target data content corresponding to the data field in the target data request;将调取到的目标数据内容按照所述数据格式生成异常数据;generating abnormal data according to the data format of the retrieved target data content;发送所述异常数据至云网络。Send the abnormal data to the cloud network.2.根据权利要求1所述的方法,其特征在于,所述异常数据获取请求中携带有设备标识,每个设备标识与数据要求之间一一对应;2. The method according to claim 1, wherein the abnormal data acquisition request carries a device identifier, and each device identifier corresponds to a data requirement one-to-one;所述从所述异常数据获取请求中提取所述数据要求,包括:The extracting the data requirements from the abnormal data acquisition request includes:查找与所述边缘侧设备的标识对应的目标设备标识;Find the target device identification corresponding to the identification of the edge side device;提取与所述目标设备标识对应的数据要求作为目标数据要求。The data requirement corresponding to the target device identification is extracted as the target data requirement.3.根据权利要求1所述的方法,其特征在于,所述数据要求中包含有多个数据字段;3. The method according to claim 1, wherein the data request includes a plurality of data fields;所述调取与所述目标数据要求中数据字段对应的目标数据内容,包括:The fetching of the target data content corresponding to the data field in the target data request includes:提取所述目标数据要求中的所有数据字段;extracting all data fields in the target data request;从所述所有数据字段中确定所述边缘侧设备所支持的目标数据字段;Determine a target data field supported by the edge-side device from all the data fields;调取所述目标数据字段对应的数据内容作为目标数据内容。The data content corresponding to the target data field is retrieved as the target data content.4.根据权利要求1所述的方法,其特征在于,所述方法还包括:4. The method according to claim 1, wherein the method further comprises:获取所述边缘侧设备所支持的所有数据字段;Obtain all data fields supported by the edge-side device;判断所述边缘侧设备的所支持的所有数据字段是否与所述数据要求的数据字段一致;Judging whether all data fields supported by the edge-side device are consistent with the data fields required by the data;若所述边缘侧设备的所支持的所有数据字段与所述数据要求的数据字段不一致,将所述边缘侧设备的所支持的所有数据字段中区别于所述数据要求的数据字段确定为扩展数据字段;If all the data fields supported by the edge-side device are inconsistent with the data fields required by the data, determine the data fields that are different from the data requirements among all the data fields supported by the edge-side device as extended data field;将所述扩展数据字段加入接收到的所述数据要求中,对所述数据格式进行更新,以利用更新后数据格式进行生成异常数据。The extended data field is added to the received data request, and the data format is updated to generate abnormal data using the updated data format.5.一种异常数据上云方法,其特征在于,应用于云服务器,所述方法包括:5. A method for uploading abnormal data to the cloud, characterized in that, applied to a cloud server, the method comprising:调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;retrieving pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;根据所述目标数据要求生成异常数据获取请求;Generate an abnormal data acquisition request according to the target data requirements;将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照所述异常数据获取请求中的目标数据要求生成异常数据;sending the abnormal data acquisition request to the edge-side device, so that the edge-side device generates abnormal data according to the target data requirements in the abnormal data acquisition request from the stored data records related to the abnormal event;接收所述边缘侧设备发送的异常数据。Receive abnormal data sent by the edge-side device.6.根据权利要求5所述的方法,其特征在于,所述方法还包括:6. The method according to claim 5, wherein the method further comprises:判断接收到的异常数据中的数据字段是否超出所述目标数据要求的数据字段;Determine whether the data field in the received abnormal data exceeds the data field required by the target data;若超出,将异常数据中不属于所述目标数据要求的数据字段确定为扩展数据字段;If it exceeds, the data fields in the abnormal data that do not belong to the target data requirements are determined as extended data fields;将所述扩展数据字段增加到所述目标数据要求中。The extension data field is added to the target data requirement.7.一种异常数据上云装置,其特征在于,所述装置包括:7. A device for uploading abnormal data to the cloud, wherein the device comprises:第一接收模块,用于接收云网络发送的异常数据获取请求;所述异常数据获取请求中携带至少一个数据要求;a first receiving module, configured to receive an abnormal data acquisition request sent by the cloud network; the abnormal data acquisition request carries at least one data requirement;提取模块,用于从所述异常数据获取请求中提取目标数据要求;所述目标数据要求包含有数据格式和至少一个数据字段;an extraction module, used for extracting target data requirements from the abnormal data acquisition request; the target data requirements include a data format and at least one data field;第一调取模块,用于从存储的与异常事件相关的数据记录中,调取与所述目标数据要求中数据字段对应的目标数据内容;The first retrieval module is used to retrieve the target data content corresponding to the data field in the target data requirement from the stored data records related to the abnormal event;第一生成模块,用于将调取到的目标数据内容按照所述数据格式生成异常数据;The first generation module is used to generate abnormal data according to the data format according to the content of the fetched target data;第一发送模块,用于发送所述异常数据至云网络。The first sending module is configured to send the abnormal data to the cloud network.8.一种异常数据上云装置,其特征在于,所述装置包括:8. A device for uploading abnormal data to the cloud, wherein the device comprises:第二调取模块,用于调取预先存储的目标数据要求,所述目标数据要求为与所述边缘侧设备具有映射关系的数据要求;a second retrieval module, configured to retrieve pre-stored target data requirements, where the target data requirements are data requirements that have a mapping relationship with the edge-side device;第二生成模块,用于根据所述目标数据要求生成异常数据获取请求;a second generating module, configured to generate an abnormal data acquisition request according to the target data requirement;第二发送模块,用于将异常数据获取请求发送给边缘侧设备,以使边缘侧设备将存储的与异常事件相关的数据记录按照所述异常数据获取请求中的数据要求生成异常数据;a second sending module, configured to send the abnormal data acquisition request to the edge-side device, so that the edge-side device records the stored data related to the abnormal event to generate abnormal data according to the data requirements in the abnormal data acquisition request;第二接收模块,用于接收所述边缘侧设备发送的异常数据。The second receiving module is configured to receive abnormal data sent by the edge-side device.9.一种电子设备,其特征在于,包括:至少一个处理器、以及与处理器连接的至少一个存储器、总线;其中,所述处理器、所述存储器通过所述总线完成相互间的通信;所述处理器用于调用所述存储器中的程序指令,以执行权利要求1~6中任一项所述的方法。9. An electronic device, comprising: at least one processor, and at least one memory and a bus connected to the processor; wherein, the processor and the memory communicate with each other through the bus; The processor is configured to invoke program instructions in the memory to execute the method of any one of claims 1-6.10.一种存储介质,其特征在于,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1~6中任一项所述的方法。10. A storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize any one of claims 1 to 6 method described in item.
CN202011545051.4A2020-12-232020-12-23Abnormal data cloud method and device, electronic equipment and storage mediumPendingCN114745291A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011545051.4ACN114745291A (en)2020-12-232020-12-23Abnormal data cloud method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011545051.4ACN114745291A (en)2020-12-232020-12-23Abnormal data cloud method and device, electronic equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN114745291Atrue CN114745291A (en)2022-07-12

Family

ID=82273851

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011545051.4APendingCN114745291A (en)2020-12-232020-12-23Abnormal data cloud method and device, electronic equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN114745291A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109313687A (en)*2016-01-242019-02-05赛义德·卡姆兰·哈桑 AI-based computer security
CN109710817A (en)*2018-12-142019-05-03深圳壹账通智能科技有限公司 Electronic equipment information input method, device, computer equipment and storage medium
WO2019149019A1 (en)*2018-01-302019-08-08深圳壹账通智能科技有限公司Data interaction method and apparatus, computer device, and storage medium
US20190324797A1 (en)*2018-04-182019-10-24Alibaba Group Holding LimitedTask processing method, apparatus, and system
CN110472114A (en)*2019-07-032019-11-19平安科技(深圳)有限公司Abnormal data method for early warning, device, computer equipment and storage medium
CN111177178A (en)*2019-12-032020-05-19腾讯科技(深圳)有限公司Data processing method and related equipment
CN111835562A (en)*2020-07-012020-10-27北京爱笔科技有限公司Log uploading method, log query method and log query system
CN112003686A (en)*2020-07-242020-11-27新华三大数据技术有限公司Message format negotiation method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109313687A (en)*2016-01-242019-02-05赛义德·卡姆兰·哈桑 AI-based computer security
WO2019149019A1 (en)*2018-01-302019-08-08深圳壹账通智能科技有限公司Data interaction method and apparatus, computer device, and storage medium
US20190324797A1 (en)*2018-04-182019-10-24Alibaba Group Holding LimitedTask processing method, apparatus, and system
CN109710817A (en)*2018-12-142019-05-03深圳壹账通智能科技有限公司 Electronic equipment information input method, device, computer equipment and storage medium
CN110472114A (en)*2019-07-032019-11-19平安科技(深圳)有限公司Abnormal data method for early warning, device, computer equipment and storage medium
CN111177178A (en)*2019-12-032020-05-19腾讯科技(深圳)有限公司Data processing method and related equipment
CN111835562A (en)*2020-07-012020-10-27北京爱笔科技有限公司Log uploading method, log query method and log query system
CN112003686A (en)*2020-07-242020-11-27新华三大数据技术有限公司Message format negotiation method and device

Similar Documents

PublicationPublication DateTitle
US10560465B2 (en)Real time anomaly detection for data streams
CN107145489B (en)Information statistics method and device for client application based on cloud platform
CN104537076B (en)A kind of file read/write method and device
CN108011929A (en)Data request processing method, apparatus, computer equipment and storage medium
US10860604B1 (en)Scalable tracking for database udpates according to a secondary index
CN110659259B (en)Database migration method, server and computer storage medium
CN112965879A (en)Data processing method and device, electronic equipment and readable storage medium
CN111258978A (en) a method of data storage
CN108932184A (en)monitoring device and method
US11336588B2 (en)Metadata driven static determination of controller availability
CN111562889B (en)Data processing method, device, system and storage medium
CN110134738A (en) Distributed storage system resource estimation method and device
CN112839076B (en)Data storage method, data reading method, gateway, electronic equipment and storage medium
CN110888847A (en)Recycle bin system and file recycling method
WO2017148382A1 (en)Method and apparatus for accessing storage device by virtual machine in cloud computing management platform
CN112860720B (en)Storage capacity updating method and device
CN114153703A (en) Exception localization method, device, electronic device and program product for microservices
CN114116908A (en)Data management method and device and electronic equipment
CN114860432B (en) A method and device for determining memory failure information
CN115374109B (en) Data access method, apparatus, computing device and system
CN114745291A (en)Abnormal data cloud method and device, electronic equipment and storage medium
CN114254051A (en) A big data computing method, device and big data platform
CN111459411B (en)Data migration method, device, equipment and storage medium
CN116049246A (en)Resource data query method and device, electronic equipment and storage medium
CN114691443A (en)Cross section data sending method and device, electronic equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication

Application publication date:20220712

WD01Invention patent application deemed withdrawn after publication

[8]ページ先頭

©2009-2025 Movatter.jp