[go: up one dir, main page]

CN116578618A - Method, device, storage medium and electronic device for generating target reflow instances - Google Patents

Method, device, storage medium and electronic device for generating target reflow instances Download PDF

Info

Publication number
CN116578618A
CN116578618A CN202310281987.8A CN202310281987A CN116578618A CN 116578618 A CN116578618 A CN 116578618A CN 202310281987 A CN202310281987 A CN 202310281987A CN 116578618 A CN116578618 A CN 116578618A
Authority
CN
China
Prior art keywords
reflow
instance
target
message
reflux
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
CN202310281987.8A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202310281987.8A priority Critical patent/CN116578618A/en
Publication of CN116578618A publication Critical patent/CN116578618A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种目标回流实例的生成方法、装置、存储介质及电子装置,涉及智慧家庭技术领域,该目标回流实例的生成方法包括:在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。

This application discloses a method, device, storage medium, and electronic device for generating a target return instance, and relates to the field of smart home technology. The method for generating a target return instance includes: when it is determined that a service message that fails to process a service is detected, Determine the initial reflow instance corresponding to the business message, wherein the initial reflow instance is a reflow instance without reflow configuration; in response to the configuration instruction of the target object, determine from the preset configuration library for configuring the reflow instance instance configuration information, and use the configuration information to configure the initial reflow instance to generate a target reflow instance, wherein the target reflow instance is used to determine a reflow processing result after reflow processing is performed on the business message.

Description

目标回流实例的生成方法、装置、存储介质及电子装置Method, device, storage medium and electronic device for generating target reflow instances

技术领域technical field

本申请涉及智慧家庭技术领域,具体而言,涉及一种目标回流实例的生成方法、装置、存储介质及电子装置。The present application relates to the technical field of smart home, in particular, to a method, device, storage medium and electronic device for generating a target reflow instance.

背景技术Background technique

目前,随着智能家电领域的家电设备的智能化水平越来越高,家电设备所提供的家电功能也越来越多样化,相应地,家电业务消息的数量也在日益增加,在一般的技术方案中,由于ETL实时流的消息存在顺序依赖,在对家电设备的不同ETL实时流的消息进行处理时,由于输入消息乱序可能引起数据处理失败,对于处理失败的数据,需要进行回流处理。当前对于多种处理失败的回流数据,一般由人工为每种处理失败的回流数据单独配置回流实例,但是这种人工配置的回流实例仅能适配单一的数据类型,且受限于人工成本,数据回流处理的效率低下。At present, as the level of intelligence of home appliances in the field of smart home appliances is getting higher and higher, the home appliance functions provided by home appliances are becoming more and more diversified. Correspondingly, the number of home appliance business messages is also increasing. In the scheme, due to the order dependence of the messages of the ETL real-time stream, when processing the messages of different ETL real-time streams of home appliances, the out-of-order input messages may cause data processing failure, and the data that fails to be processed needs to be reflowed. Currently, for various reflow data that fail to be processed, the reflow instance is generally manually configured for each type of reflow data that fails to process. However, this manually configured reflow instance can only adapt to a single data type and is limited by labor costs. Data reflow processing is inefficient.

因此,相关技术中,存在人工配置的回流实例导致数据回流处理的效率低下的技术问题。Therefore, in the related art, there is a technical problem that manually configured reflow instances lead to low efficiency of data reflow processing.

针对相关技术中,如何解决人工配置的回流实例导致数据回流处理的效率低下的技术问题,尚未提出有效的解决方案。In the related art, how to solve the technical problem of inefficiency in data reflow processing caused by manually configured reflow instances has not yet been proposed an effective solution.

发明内容Contents of the invention

本申请实施例提供了一种目标回流实例的生成方法、装置、存储介质及电子装置,以至少解决相关技术中,如何解决人工配置的回流实例导致数据回流处理的效率低下的技术问题。Embodiments of the present application provide a method, device, storage medium, and electronic device for generating a target reflow instance, so as to at least solve the technical problem in the related art of how to solve the low efficiency of data reflow processing caused by manually configured reflow instances.

根据本申请实施例的一个实施例,提供了一种目标回流实例的生成方法,包括:在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。According to an embodiment of the embodiment of the present application, a method for generating a target return instance is provided, including: determining the initial return instance corresponding to the service message when it is determined that a business message that fails to process the service is detected, wherein , the initial reflow instance is a reflow instance without reflow configuration; in response to the configuration instruction of the target object, the configuration information used to configure the reflow instance is determined from the preset configuration library, and the configuration information is used to configure the reflow instance The initial reflow instance is configured to generate a target reflow instance, wherein the target reflow instance is used to determine a reflow processing result after reflow processing is performed on the business message.

在一个示例性实施例中,在使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,所述方法还包括:在确定所述目标回流实例的实例状态指示所述目标回流实例已经启用的情况下,创建所述目标回流实例对应的第一客户端;响应于所述第一客户端的查询指令,获取所述查询指令包含的实例名称;在确定所述实例名称与所述目标回流实例的实例名称一致的情况下,将所述目标回流实例的回流参数发送至所述第一客户端。In an exemplary embodiment, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, the method further includes: after determining that the instance status of the target reflow instance indicates that the target When the reflow instance has been enabled, create the first client corresponding to the target reflow instance; respond to the query instruction of the first client, obtain the instance name contained in the query instruction; If the instance names of the target reflow instances are the same, send the reflow parameters of the target reflow instance to the first client.

在一个示例性实施例中,在将所述目标回流实例的回流参数发送至所述第一客户端之后,所述方法还包括:如果接收到所述第一客户端用于指示继续回流的第一通知消息,则确定所述回流处理结果为未完成;如果接收到所述第一客户端用于指示结束回流的第二通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, after sending the reflow parameter of the target reflow instance to the first client, the method further includes: if receiving the first If a notification message is received, it is determined that the result of the reflow processing is not completed; if a second notification message from the first client indicating to end the reflow is received, it is determined that the result of the reflow processing is completed.

在一个示例性实施例中,将所述目标回流实例的回流参数发送至所述第一客户端,包括:确定所述目标回流实例对应的第一消息中间件接口;基于所述第一消息中间件接口建立用于传输所述回流参数的第一消息通道;通过所述第一消息通道将所述回流参数发送至所述第一客户端;其中,所述第一消息中间件接口允许对接不同中间件类型的客户端。In an exemplary embodiment, sending the reflow parameter of the target reflow instance to the first client includes: determining a first message middleware interface corresponding to the target reflow instance; The software interface establishes a first message channel for transmitting the backflow parameters; the backflow parameters are sent to the first client through the first message channel; wherein, the first message middleware interface allows docking with different Middleware type client.

在一个示例性实施例中,在使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,所述方法还包括:在确定所述目标回流实例的实例状态指示所述目标回流实例已经启用的情况下,创建所述目标回流实例对应的第二客户端;获取所述第二客户端对所述业务消息的查询结果;在确定所述查询结果指示所述业务消息中存在待回流处理的业务消息的情况下,如果确定所述待回流处理的业务消息与所述目标回流实例存在对应关系,则确定所述回流处理结果为未完成。In an exemplary embodiment, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, the method further includes: after determining that the instance status of the target reflow instance indicates that the target When the reflow instance has been enabled, create a second client corresponding to the target reflow instance; obtain the query result of the second client for the business message; determine that the query result indicates that the business message exists In the case of a service message to be reflowed, if it is determined that there is a corresponding relationship between the service message to be reflowed and the target reflow instance, it is determined that the reflow processing result is not completed.

在一个示例性实施例中,获取所述第二客户端对所述业务消息的查询结果,包括:确定所述目标回流实例对应的第二消息中间件接口;基于所述第二消息中间件接口建立用于传输所述查询结果的第二消息通道;接收通过所述第二消息通道传输的所述查询结果;其中,所述第二消息中间件接口允许对接不同中间件类型的客户端。In an exemplary embodiment, obtaining the query result of the service message from the second client includes: determining the second message middleware interface corresponding to the target reflow instance; based on the second message middleware interface Establishing a second message channel for transmitting the query result; receiving the query result transmitted through the second message channel; wherein, the second message middleware interface allows docking with clients of different middleware types.

在一个示例性实施例中,使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,所述方法还包括:在确定所述目标回流实例的实例状态指示所述目标回流实例结束启用的情况下,销毁所述目标回流实例对应的第一客户端;如果接收到用于指示所述第一客户端销毁成功的第三通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, the method further includes: after determining that the instance status of the target reflow instance indicates that the target reflow instance When the instance is terminated, the first client corresponding to the target reflow instance is destroyed; if a third notification message indicating that the first client is destroyed successfully is received, it is determined that the reflow processing result is completed.

在一个示例性实施例中,使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,所述方法还包括:在确定所述目标回流实例的实例状态指示所述目标回流实例结束启用的情况下,销毁所述目标回流实例对应的第二客户端;如果接收到用于指示所述第二客户端销毁成功的第四通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, the method further includes: after determining that the instance status of the target reflow instance indicates that the target reflow instance When the instance is terminated, the second client corresponding to the target reflow instance is destroyed; if a fourth notification message indicating that the second client is destroyed successfully is received, it is determined that the reflow processing result is completed.

在一个示例性实施例中,使用所述配置信息对所述初始回流实例进行配置,包括:从所述预设配置库内确定出所述初始回流实例的预设回流次数,所述初始回流实例的初始回流时间间隔;在确定所述预设回流次数不大于预设阈值的情况下,基于所述预设回流次数和预设阈值的差值设置所述回流间隔时间的递增时间,并根据初始回流时间间隔和所述递增时间的和值确定出所述目标回流实例的回流时间间隔;在确定所述预设回流次数大于预设阈值的情况下,将所述回流间隔时间设置为默认递增时间,并根据初始回流时间间隔和所述默认递增时间的和值确定出所述目标回流实例的回流时间间隔。In an exemplary embodiment, using the configuration information to configure the initial reflow instance includes: determining the preset reflow times of the initial reflow instance from the preset configuration library, and the initial reflow instance The initial backflow time interval; in the case of determining that the preset number of backflows is not greater than the preset threshold, set the incremental time of the backflow interval based on the difference between the preset number of backflows and the preset threshold, and according to the initial The sum of the backflow time interval and the increment time determines the backflow time interval of the target backflow instance; when it is determined that the preset number of backflow times is greater than a preset threshold, the backflow interval is set as the default increment time , and determine the reflow time interval of the target reflow instance according to the sum of the initial reflow time interval and the default increment time.

根据本申请实施例的另一方面,还提供了一种目标回流实例的生成装置,其特征在于,包括:确定模块,用于在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;配置模块,用于响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。According to another aspect of the embodiment of the present application, there is also provided a device for generating a target return instance, which is characterized in that it includes: a determining module, configured to determine the out of the The initial reflow instance corresponding to the above business message, wherein, the initial reflow instance is a reflow instance without reflow configuration; the configuration module is used to determine from the preset configuration library in response to the configuration instruction of the target object. configuration information of the reflow instance described above, and use the configuration information to configure the initial reflow instance to generate a target reflow instance, wherein the target reflow instance is used to determine the reflow processing after the reflow processing is performed on the business message result.

根据本申请实施例的又一方面,还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述目标回流实例的生成方法。According to yet another aspect of the embodiments of the present application, a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the above-mentioned target reflow instance when running generation method.

根据本申请实施例的又一方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,上述处理器通过计算机程序执行上述的目标回流实例的生成方法。According to yet another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the above-mentioned processor executes the above-mentioned Generate method for target reflow instance.

在本申请实施例中,可以在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例;进而响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成用于确定对所述业务消息进行回流处理后的回流处理结果的目标回流实例;采用上述技术方案,解决了人工配置的回流实例导致数据回流处理的效率低下的技术问题,进而提高了数据回流处理的效率。In the embodiment of the present application, when it is determined that a business message that fails to process a business is detected, the initial reflow instance corresponding to the business message can be determined; then, in response to the configuration instruction of the target object, it can be determined from the preset configuration library Obtain configuration information for configuring the reflow instance, and use the configuration information to configure the initial reflow instance, so as to generate a target reflow instance for determining a reflow processing result after reflow processing is performed on the business message; By adopting the above technical solution, the technical problem of low efficiency of data reflow processing caused by manually configured reflow instances is solved, thereby improving the efficiency of data reflow processing.

附图说明Description of drawings

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

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

图1是本申请实施例的一种目标回流实例的生成方法的硬件环境示意图;FIG. 1 is a schematic diagram of a hardware environment of a method for generating a target reflow instance according to an embodiment of the present application;

图2是根据本申请实施例的目标回流实例的生成方法的流程图;FIG. 2 is a flowchart of a method for generating a target reflow instance according to an embodiment of the present application;

图3是本申请实施例的使用目标回流实例进行回流消息处理的流程示意图;FIG. 3 is a schematic flow diagram of processing a reflow message using a target reflow instance according to an embodiment of the present application;

图4是根据本申请实施例的重试次数的示意图;FIG. 4 is a schematic diagram of the number of retries according to an embodiment of the present application;

图5是根据本申请实施例的一种目标回流实例的生成装置的结构框图(一);FIG. 5 is a structural block diagram (1) of a generating device for a target reflow example according to an embodiment of the present application;

图6是根据本申请实施例的一种目标回流实例的生成装置的结构框图(二)。Fig. 6 is a structural block diagram (2) of a device for generating a target reflow example according to an embodiment of the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

接下来,通过以下实施例对本申请实施例的部分技术名词进行解释:Next, some technical terms of the embodiments of the present application are explained by the following examples:

MQ:全称是Message Queue,消息队列中间件,用于提供消息的订阅、存储、发布等功能,如Kafka、RocketMQ等。其中,部分类型的MQ客户端自身仅支持有限次数的重复投递。MQ: The full name is Message Queue, message queue middleware, used to provide message subscription, storage, publishing and other functions, such as Kafka, RocketMQ, etc. Among them, some types of MQ clients only support a limited number of repeated delivery.

实时计算框架,对实时消费消息进行数据ETL处理,如Flink、Spark等。A real-time computing framework that performs data ETL processing on real-time consumption messages, such as Flink and Spark.

ETL:用来描述将数据从来源端经过抽取(extract)、转换(transform)、加载(load)至目的端的过程。ETL: Used to describe the process of extracting, transforming, and loading data from the source to the destination.

根据本申请实施例的一个方面,提供了一种目标回流实例的生成方法。该目标回流实例的生成方法广泛应用于智慧家庭(Smart Home)、智能家居、智能家用设备生态、智慧住宅(Intelligence House)生态等全屋智能数字化控制应用场景。可选地,在本实施例中,上述目标回流实例的生成方法可以应用于如图1所示的由终端设备102和服务器104所构成的硬件环境中。如图1所示,服务器104通过网络与终端设备102进行连接,可用于为终端或终端上安装的客户端提供服务(如应用服务等),可在服务器上或独立于服务器设置数据库,用于为服务器104提供数据存储服务,可在服务器上或独立于服务器配置云计算和/或边缘计算服务,用于为服务器104提供数据运算服务。According to an aspect of the embodiments of the present application, a method for generating a target reflow instance is provided. The generation method of the target reflow instance is widely used in smart home (Smart Home), smart home, smart home equipment ecology, smart house (Intelligence House) ecology and other intelligent digital control application scenarios in the whole house. Optionally, in this embodiment, the above-mentioned method for generating a target reflow instance may be applied to a hardware environment composed of a terminal device 102 and a server 104 as shown in FIG. 1 . As shown in Figure 1, the server 104 is connected to the terminal device 102 through the network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. To provide data storage services for the server 104, cloud computing and/or edge computing services may be configured on the server or independently of the server to provide data computing services for the server 104.

上述网络可以包括但不限于以下至少之一:有线网络,无线网络。上述有线网络可以包括但不限于以下至少之一:广域网,城域网,局域网,上述无线网络可以包括但不限于以下至少之一:WIFI(Wireless Fidelity,无线保真),蓝牙。终端设备102可以并不限定于为PC、手机、平板电脑、智能空调、智能烟机、智能冰箱、智能烤箱、智能炉灶、智能洗衣机、智能热水器、智能洗涤设备、智能洗碗机、智能投影设备、智能电视、智能晾衣架、智能窗帘、智能影音、智能插座、智能音响、智能音箱、智能新风设备、智能厨卫设备、智能卫浴设备、智能扫地机器人、智能擦窗机器人、智能拖地机器人、智能空气净化设备、智能蒸箱、智能微波炉、智能厨宝、智能净化器、智能饮水机、智能门锁等。The foregoing network may include but not limited to at least one of the following: a wired network and a wireless network. The above-mentioned wired network may include but not limited to at least one of the following: wide area network, metropolitan area network, and local area network, and the above-mentioned wireless network may include but not limited to at least one of the following: WIFI (Wireless Fidelity, Wireless Fidelity), Bluetooth. The terminal device 102 is not limited to PC, mobile phone, tablet computer, smart air conditioner, smart hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing device, smart dishwasher, smart projection device , smart TV, smart drying rack, smart curtain, smart video, smart socket, smart audio, smart speaker, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, Smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.

在本实施例中提供了一种目标回流实例的生成方法,应用于上述终端设备,图2是根据本申请实施例的目标回流实例的生成方法的流程图,该流程包括如下步骤:In this embodiment, a method for generating a target reflow instance is provided, which is applied to the above-mentioned terminal device. FIG. 2 is a flowchart of a method for generating a target reflow instance according to an embodiment of the present application. The process includes the following steps:

步骤S202,在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;Step S202, if it is determined that a business message that fails to process a service is detected, determine an initial reflow instance corresponding to the business message, wherein the initial reflow instance is a reflow instance that has not been configured for reflow;

步骤S204,响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。Step S204, in response to the configuration instruction of the target object, determine configuration information for configuring the reflow instance from the preset configuration library, and use the configuration information to configure the initial reflow instance to generate a target reflow instance , wherein the target reflow instance is used to determine a reflow processing result after reflow processing is performed on the service message.

通过上述步骤,通过在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例;进而响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成用于确定对所述业务消息进行回流处理后的回流处理结果的目标回流实例;采用上述技术方案,解决了人工配置的回流实例导致数据回流处理的效率低下的技术问题,进而提高了数据回流处理的效率。Through the above steps, in the case of detecting a business message that fails to process the business, determine the initial reflow instance corresponding to the business message; then, in response to the configuration instruction of the target object, determine from the preset configuration library for Configure the configuration information of the reflow instance, and use the configuration information to configure the initial reflow instance, so as to generate a target reflow instance for determining the reflow processing result after reflow processing the business message; adopt the above technology The solution solves the technical problem of low efficiency of data reflow processing caused by manually configured reflow instances, thereby improving the efficiency of data reflow processing.

在一个示例性实施例中,在完成上述步骤S204中使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例的方案之后,还可以在确定所述目标回流实例的实例状态指示所述目标回流实例已经启用的情况下,创建所述目标回流实例对应的第一客户端;响应于所述第一客户端的查询指令,获取所述查询指令包含的实例名称;在确定所述实例名称与所述目标回流实例的实例名称一致的情况下,将所述目标回流实例的回流参数发送至所述第一客户端。In an exemplary embodiment, after the configuration information is used to configure the initial reflow instance in the above step S204 to generate the scheme of the target reflow instance, the instance status indication of the target reflow instance may also be determined When the target reflow instance has been enabled, create the first client corresponding to the target reflow instance; respond to the query instruction of the first client, obtain the instance name contained in the query instruction; determine the instance If the name is consistent with the instance name of the target reflow instance, send the reflow parameters of the target reflow instance to the first client.

其中,需要说明的是,上述回流参数例如可以包括回流次数,回流时间间隔等,但不限于此。Wherein, it should be noted that, the above-mentioned reflow parameters may include, for example, the number of reflow times, the time interval of reflow, etc., but are not limited thereto.

在一个示例性实施例中,在将所述目标回流实例的回流参数发送至所述第一客户端之后,进一步提出了以下技术方案:如果接收到所述第一客户端用于指示继续回流的第一通知消息,则确定所述回流处理结果为未完成;如果接收到所述第一客户端用于指示结束回流的第二通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, after the reflow parameter of the target reflow instance is sent to the first client, the following technical solution is further proposed: For the first notification message, it is determined that the result of the reflow processing is not completed; if the second notification message used by the first client to indicate the end of reflow is received, it is determined that the result of the reflow processing is completed.

在一个示例性实施例中,通过以下步骤对将所述目标回流实例的回流参数发送至所述第一客户端的实现过程进行说明,具体包括:确定所述目标回流实例对应的第一消息中间件接口;基于所述第一消息中间件接口建立用于传输所述回流参数的第一消息通道;通过所述第一消息通道将所述回流参数发送至所述第一客户端;其中,所述第一消息中间件接口允许对接不同中间件类型的客户端。In an exemplary embodiment, the implementation process of sending the reflow parameters of the target reflow instance to the first client is described through the following steps, specifically including: determining the first message middleware corresponding to the target reflow instance interface; establish a first message channel for transmitting the return parameter based on the first message middleware interface; send the return parameter to the first client through the first message channel; wherein, the The first message middleware interface allows connecting clients of different middleware types.

在一个示例性实施例中,进一步的,在使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,还提出了以下技术方案:在确定所述目标回流实例的实例状态指示所述目标回流实例已经启用的情况下,创建所述目标回流实例对应的第二客户端;获取所述第二客户端对所述业务消息的查询结果;在确定所述查询结果指示所述业务消息中存在待回流处理的业务消息的情况下,如果确定所述待回流处理的业务消息与所述目标回流实例存在对应关系,则确定所述回流处理结果为未完成。In an exemplary embodiment, further, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, the following technical solution is also proposed: after determining the instance state of the target reflow instance In the case of indicating that the target backflow instance has been enabled, create a second client corresponding to the target backflow instance; obtain the query result of the second client for the business message; determine that the query result indicates the If there is a service message to be reflowed in the service message, if it is determined that there is a corresponding relationship between the service message to be reflowed and the target reflow instance, it is determined that the reflow processing result is not completed.

可选的,在确定所述查询结果指示所述业务消息中不存在待回流处理的业务消息的情况下,确定所述回流处理结果为完成。Optionally, in a case where it is determined that the query result indicates that there is no service message to be reflowed in the service message, it is determined that the reflow processing result is completed.

在一个示例性实施例中,进一步提出了获取所述第二客户端对所述业务消息的查询结果的实现过程,具体包括以下步骤:确定所述目标回流实例对应的第二消息中间件接口;基于所述第二消息中间件接口建立用于传输所述查询结果的第二消息通道;接收通过所述第二消息通道传输的所述查询结果;其中,所述第二消息中间件接口允许对接不同中间件类型的客户端。In an exemplary embodiment, it further proposes an implementation process of obtaining the query result of the service message from the second client, which specifically includes the following steps: determining the second message middleware interface corresponding to the target reflow instance; Establish a second message channel for transmitting the query result based on the second message middleware interface; receive the query result transmitted through the second message channel; wherein, the second message middleware interface allows docking Clients for different middleware types.

在一个示例性实施例中,在使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,进一步提出了其他技术方案,具体步骤包括:在确定所述目标回流实例的实例状态指示所述目标回流实例结束启用的情况下,销毁所述目标回流实例对应的第一客户端;如果接收到用于指示所述第一客户端销毁成功的第三通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, other technical solutions are further proposed, and the specific steps include: determining the instance of the target reflow instance If the state indicates that the target reflux instance is finished enabling, destroy the first client corresponding to the target reflux instance; if a third notification message indicating that the first client is destroyed successfully is received, then determine the The reflow processing result is complete.

在一个示例性实施例中,进一步的,使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例之后,还可以在确定所述实例状态指示所述目标回流实例结束启用的情况下,销毁所述目标回流实例对应的第二客户端;如果接收到用于指示所述第二客户端销毁成功的第四通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, further, after using the configuration information to configure the initial reflow instance to generate a target reflow instance, after determining that the instance status indicates that the target reflow instance has ended activation Next, destroy the second client corresponding to the target reflow instance; if a fourth notification message indicating that the second client is destroyed successfully is received, it is determined that the reflow processing result is completed.

在一个示例性实施例中,在上述步骤S206使用所述配置信息对所述初始回流实例进行配置的过程中,具体包括以下步骤:从所述预设配置库内确定出所述初始回流实例的预设回流次数,所述初始回流实例的初始回流时间间隔;在确定所述预设回流次数不大于预设阈值的情况下,基于所述预设回流次数和预设阈值的差值设置所述回流间隔时间的递增时间,并根据初始回流时间间隔和所述递增时间的和值确定出所述目标回流实例的回流时间间隔;在确定所述预设回流次数大于预设阈值的情况下,将所述回流间隔时间设置为默认递增时间,并根据初始回流时间间隔和所述默认递增时间的和值确定出所述目标回流实例的回流时间间隔。In an exemplary embodiment, the process of using the configuration information to configure the initial reflow instance in the above step S206 specifically includes the following steps: determining the configuration of the initial reflow instance from the preset configuration library The preset number of backflows, the initial backflow time interval of the initial backflow instance; when it is determined that the preset number of backflows is not greater than a preset threshold, set the The incremental time of the backflow interval time, and determine the backflow time interval of the target backflow instance according to the sum of the initial backflow time interval and the incremental time; when it is determined that the preset number of backflow times is greater than the preset threshold value, the The reflow interval time is set as a default increment time, and the reflow time interval of the target reflow instance is determined according to the sum of the initial reflow time interval and the default increment time.

其中,在基于所述预设回流次数和预设阈值的差值设置所述回流间隔时间的递增时间的过程中,例如可以设置所述回流间隔时间的递增时间随着预设回流次数和预设阈值的差值的增加而递增,或者也可以设置所述回流间隔时间的递增时间随着预设回流次数和预设阈值的差值的减小而递减,本申请对此不作限制。Wherein, in the process of setting the incremental time of the backflow interval based on the difference between the preset number of backflows and the preset threshold value, for example, the incremental time of the backflow interval can be set to increase with the preset number of backflows and the preset threshold. The difference between the thresholds increases, or the increment time of the backflow interval can also be set to decrease as the difference between the preset number of backflows and the preset threshold decreases, which is not limited in the present application.

在一个可选的实施例中,还可以直接将所述预设回流次数确定为所述目标回流实例的回流次数。In an optional embodiment, the preset number of reflows may also be directly determined as the number of reflows of the target reflow instance.

为了更好的理解上述目标回流实例的生成方法的过程,以下再结合可选实施例对上述目标回流实例的生成的实现方法流程进行说明,但不用于限定本申请实施例的技术方案。In order to better understand the process of the method for generating the above-mentioned target reflow instance, the flow of the implementation method for generating the above-mentioned target reflow instance will be described below in combination with optional embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application.

在本实施例中提供了一种使用目标回流实例进行回流消息处理的方法,图3是本申请实施例的使用目标回流实例进行回流消息处理的流程示意图,如图3所示,包含如下模块:In this embodiment, a method for processing reflow messages using a target reflow instance is provided. FIG. 3 is a schematic flow diagram of using a target reflow instance to process reflow messages in the embodiment of the present application. As shown in FIG. 3 , it includes the following modules:

模块1、reflux-config,消息回流策略配置模块,用于提供消息回流策略查询、配置及启停功能;回流实例(即上述目标回流实例)启停后:通知reflux-processor,创建或销毁该回流实例消息消费客户端;通知reflux-scheduler,创建或销毁该回流实例消息发送客户端。Module 1, reflux-config, message reflux policy configuration module, used to provide message reflux policy query, configuration, start and stop functions; after the reflux instance (that is, the above target reflux instance) is started and stopped: notify reflux-processor to create or destroy the reflux Instance message consumption client; notify reflux-scheduler to create or destroy the reflux instance message sending client.

其中,上述模块1还用于配置上述目标回流实例。Wherein, the above-mentioned module 1 is also used to configure the above-mentioned target reflow instance.

模块2、reflux-core,消息回流系统核心模块,用于提供统一的消息消费和生产接口,实现不同种类的MQ中间件收发消息,以SDK的方式提供。Module 2, reflux-core, the core module of the message reflux system, is used to provide a unified message consumption and production interface, realize different types of MQ middleware sending and receiving messages, and provide it in the form of SDK.

模块3、reflux-processor,消息回流系统处理模块,用于监听由业务流程发送过来的待回流消息,依据回流策略判断消息是否需要继续回流,计算下次回流的时间,并持久化到DB中。消息消费依赖reflux-core提供的统一消息消费接口。Module 3, reflux-processor, the message reflux system processing module, is used to monitor the messages to be reflux sent by the business process, judge whether the message needs to continue to reflux according to the reflux strategy, calculate the time of the next reflux, and persist it in the DB. Message consumption depends on the unified message consumption interface provided by reflux-core.

模块4、reflux-scheduler,回流消息发送调度器模块,用于循环查询待回流的消息,并推送到MQ中。消息推送依赖reflux-core提供的统一消息生产接口。Module 4, reflux-scheduler, the reflux message sending scheduler module, is used to circularly query the messages to be reflux and push them to MQ. Message push depends on the unified message production interface provided by reflux-core.

模块5、reflux-search,问题溯源模块,用于支持检索超过回流次数后仍然未能正常处理的数据,供问题溯源使用。Module 5, reflux-search, the problem traceability module, is used to support the retrieval of data that has not been processed normally after exceeding the number of reflows, and is used for problem traceability.

具体实现过程如下:The specific implementation process is as follows:

步骤1、在业务上游消息队列内,上游原始业务消息如下所示:Step 1. In the business upstream message queue, the upstream original business message is as follows:

步骤2、业务逻辑处理,即开始消费步骤1消息队列的消息,并做业务处理。Step 2, business logic processing, that is, start to consume the messages of the message queue in step 1, and do business processing.

步骤3、确定业务处理成功。In step 3, it is determined that the service processing is successful.

步骤4、确定业务处理失败,并封装原始消息到回流消息中,继而推送到步骤5的消息队列中。Step 4. Determine that the business processing fails, and encapsulate the original message into a return message, and then push it to the message queue in step 5.

其中,需要说明的是,步骤2中依赖的其他数据可能会因为延迟,查不到处理结果或者程序处理异常等原因,导致最终的业务处理失败。Among them, it should be noted that other data relied on in step 2 may fail in the final business processing due to reasons such as delay, failure to find the processing result, or abnormal program processing.

在一个实施例中,将原始消息封装成数据回流消息体(即上述待回流消息)的程序如下:In one embodiment, the procedure for encapsulating the original message into a data reflow message body (that is, the above-mentioned message to be reflowed) is as follows:

步骤5、存储业务处理异常后推送过来的回流消息。Step 5. Store the return message pushed after the business processing is abnormal.

步骤6、消息回流系统消费步骤5消息队列中的待回流消息msg。Step 6. The message return system consumes the message msg to be returned in the message queue in step 5.

步骤7、解析待回流消息msg,获取回流实例名称caseName、和原始消息体message。Step 7: Parse the message msg to be reflowed to obtain the reflow instance name caseName and the original message body message.

步骤8、根据步骤7中解析出来的回流实例名称caseName,查询回流策略缓存,获取该回流实例的回流策略配置,并计算得出该回流实例回流次数上限。Step 8. According to the backflow instance name caseName parsed in step 7, query the backflow policy cache, obtain the backflow policy configuration of the backflow instance, and calculate the upper limit of the backflow times of the backflow instance.

步骤9、计算回流次数:从待回流消息体中解析出消息已回流的次数,即reflux.times,待回流消息体如下所示:Step 9. Calculate the number of reflux times: parse the number of times the message has been refluxed from the message body to be refluxed, that is, reflux.times. The message body to be refluxed is as follows:

步骤10、根据步骤9中计算出的已回流次数与步骤8计算出来的回流次数上限,判断是否需要继续回流。Step 10. According to the number of reflows calculated in step 9 and the upper limit of the number of reflows calculated in step 8, it is judged whether to continue the reflow.

步骤11、在需要继续回流的情况下,计算下次回流时间并持久化到DB中:依据步骤8获取的回流策略计算出下次回流时间,并将步骤9计算出的回流次数加1后回填到原始消息中,最终持久化到DB中的结构如下所示:Step 11. If it is necessary to continue the reflow, calculate the next reflow time and persist it in the DB: calculate the next reflow time according to the reflow strategy obtained in step 8, and add 1 to the reflow times calculated in step 9 before backfilling Into the original message, the structure that is finally persisted in the DB is as follows:

步骤12、在不需要继续回流,即停止回流的情况下,将步骤7中的原始消息体,保存到该回流实例对应的异常数据表中,供业务问题溯源查询。Step 12. If the reflow does not need to be continued, that is, the reflow is stopped, the original message body in step 7 is saved in the exception data table corresponding to the reflow instance for traceability and query of business problems.

进一步的,还可以通过定时任务实现回流,具体的:Further, reflow can also be realized through scheduled tasks, specifically:

步骤13、触发每个回流实例的定时任务。Step 13. Trigger the timed task of each reflow instance.

步骤14、定时任务会循环查询DB中待回流的原始消息。Step 14, the scheduled task will cyclically query the original message to be reflowed in the DB.

步骤15、调用reflux-core提供的统一消息发送接口,将查询到的待回流数据推送到步骤16消息队列中。Step 15. Call the unified message sending interface provided by reflux-core, and push the queried data to be returned to the message queue in step 16.

步骤16、业务流程会持续消费该MQ。Step 16, the business process will continue to consume the MQ.

需要说明的是,还可以通过以下步骤实现回流策略的配置过程:It should be noted that the configuration process of the backflow policy can also be implemented through the following steps:

步骤17、创建回流实例配置。Step 17. Create a reflow instance configuration.

步骤18、查询回流实例配置详细信息。Step 18. Query the configuration details of the reflow instance.

步骤19、启用或关闭回流实例配置。Step 19. Enable or disable the reflow instance configuration.

步骤20、当启用回流实例时:需要通知reflux-processor和reflux-scheduler创建MQ客户端,该客户端由reflux-core提供的统一消息生产和发送接口。Step 20, when the reflux instance is enabled: reflux-processor and reflux-scheduler need to be notified to create an MQ client, which is the unified message production and sending interface provided by reflux-core.

步骤21、当关闭回流实例时:需要通知reflux-processor和reflux-scheduler销毁MQ客户端,该客户端由reflux-core提供的统一消息生产和发送接口。Step 21. When the reflux instance is closed: reflux-processor and reflux-scheduler need to be notified to destroy the MQ client, which is the unified message production and sending interface provided by reflux-core.

进一步的,在一个实施例中,如图4所示,消息回流系统可以支持实现多次回流,在配置回流实例时,可以配置最大重试次数,默认值为16次,该参数取值无最大限制,建议使用默认值。间隔时间根据重试次数阶梯变化,取值范围包括1秒~2小时。若最大重试次数小于等于16次,则间隔时间按照无序消息重试间隔时间阶梯变化。若最大重试次数大于16次,则超过16次的间隔时间均为2小时。Further, in one embodiment, as shown in Figure 4, the message backflow system can support multiple backflows. When configuring the backflow instance, you can configure the maximum number of retries. The default value is 16 times. There is no maximum value for this parameter. It is recommended to use the default value. The interval time changes step by step according to the number of retries, and the value ranges from 1 second to 2 hours. If the maximum number of retries is less than or equal to 16 times, the interval time will be changed stepwise according to the retry interval time of out-of-order messages. If the maximum number of retries is greater than 16, the interval between retries exceeding 16 is 2 hours.

通过上述实施例,本申请中由消息回流系统内部实现不同种类MQ的收发消息逻辑,以及使用回流实例实现消息回流,从而对经过处理后的异常消息(即上述业务处理失败的业务消息)进行重投,并基于异常数据持久化的功能将经过重投后仍然处理失败的消息永久持久化,同时,可以针对持久化后的消息提供检索,实现问题溯源。另外,针对目前的消息回流机制不支持动态调整回流策略的问题,本申请可以在更新回流策略后,每过一段时间根据数据库中的最新配置数据更新配置,从而在不需要重启业务ETL流程的情况下,实现配置动态调整。Through the above-mentioned embodiments, in this application, the logic of sending and receiving messages of different types of MQs is implemented inside the message return system, and the message return is realized by using the return flow instance, so as to re-process the abnormal message after processing (that is, the business message that the above-mentioned business processing failed). Throwing, and based on the function of abnormal data persistence, the message that still fails to be processed after re-throwing is permanently persisted. At the same time, it can provide retrieval for the persisted message to realize the source of the problem. In addition, in view of the problem that the current message backflow mechanism does not support dynamic adjustment of the backflow strategy, this application can update the configuration according to the latest configuration data in the database every once in a while after updating the backflow strategy, so that there is no need to restart the business ETL process. Next, realize the dynamic adjustment of the configuration.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is Better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the method of each embodiment of the present application.

图5是根据本申请实施例的一种目标回流实例的生成装置的结构框图(一);如图5所示,包括:Fig. 5 is a structural block diagram (1) of a generating device of a target reflow example according to an embodiment of the present application; as shown in Fig. 5 , it includes:

确定模块42,用于在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;The determining module 42 is configured to determine an initial reflow instance corresponding to the business message when it is determined that a business message that fails to be processed is detected, wherein the initial reflow instance is a reflow instance that has not been configured for reflow;

配置模块44,用于响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。The configuration module 44 is configured to determine the configuration information used to configure the reflow instance from the preset configuration library in response to the configuration instruction of the target object, and use the configuration information to configure the initial reflow instance to generate A target reflow instance, wherein the target reflow instance is used to determine a reflow processing result after reflow processing is performed on the service message.

通过上述装置,在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例;进而响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成用于确定对所述业务消息进行回流处理后的回流处理结果的目标回流实例。解决了相关技术中,人工配置的回流实例导致数据回流处理的效率低下的技术问题,进而提高了数据回流处理的效率。Through the above-mentioned device, when it is determined that a business message that fails to process a business is detected, the initial reflow instance corresponding to the business message is determined; and then in response to the configuration instruction of the target object, it is determined from the preset configuration library for configuration configuration information of the reflow instance, and use the configuration information to configure the initial reflow instance to generate a target reflow instance for determining a reflow processing result after reflow processing is performed on the business message. In related technologies, the technical problem of low efficiency of data reflow processing caused by manually configured reflow instances is solved, thereby improving the efficiency of data reflow processing.

在一个示例性实施例中,上述目标回流实例的生成装置还包括:第一创建模块,用于在确定所述目标回流实例的实例状态指示所述目标回流实例已经启用的情况下,创建所述目标回流实例对应的第一客户端;响应于所述第一客户端的查询指令,获取所述查询指令包含的实例名称;在确定所述实例名称与所述目标回流实例的实例名称一致的情况下,将所述目标回流实例的回流参数发送至所述第一客户端。In an exemplary embodiment, the above-mentioned device for generating a target reflow instance further includes: a first creation module, configured to create the target reflow instance when it is determined that the instance status of the target reflow instance indicates that the target reflow instance The first client corresponding to the target reflow instance; in response to the query instruction of the first client, obtain the instance name contained in the query instruction; when it is determined that the instance name is consistent with the instance name of the target reflow instance , sending the reflow parameters of the target reflow instance to the first client.

在一个示例性实施例中,上述第一创建模块,还用于:如果接收到所述第一客户端用于指示继续回流的第一通知消息,则确定所述回流处理结果为未完成;如果接收到所述第一客户端用于指示结束回流的第二通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, the above-mentioned first creation module is further configured to: determine that the result of the reflow process is incomplete if the first notification message from the first client indicating to continue the reflow process is received; if After receiving the second notification message from the first client indicating to end the reflow, it is determined that the reflow processing result is completed.

在一个示例性实施例中,上述第一创建模块,还用于:确定所述目标回流实例对应的第一消息中间件接口;基于所述第一消息中间件接口建立用于传输所述回流参数的第一消息通道;通过所述第一消息通道将所述回流参数发送至所述第一客户端;其中,所述第一消息中间件接口允许对接不同中间件类型的客户端。In an exemplary embodiment, the above-mentioned first creation module is further configured to: determine the first message middleware interface corresponding to the target reflow instance; establish a method for transmitting the reflow parameter based on the first message middleware interface The first message channel; the return parameter is sent to the first client through the first message channel; wherein, the first message middleware interface allows docking with clients of different middleware types.

在一个示例性实施例中,上述目标回流实例的生成装置还包括:第二创建模块,用于:在确定所述目标回流实例的实例状态指示所述目标回流实例已经启用的情况下,创建所述目标回流实例对应的第二客户端;获取所述第二客户端对所述业务消息的查询结果;在确定所述查询结果指示所述业务消息中存在待回流处理的业务消息的情况下,如果确定所述待回流处理的业务消息与所述目标回流实例存在对应关系,则确定所述回流处理结果为未完成。In an exemplary embodiment, the above-mentioned device for generating a target reflow instance further includes: a second creation module configured to: create the target reflow instance when it is determined that the instance status of the target reflow instance indicates that the target reflow instance has been enabled the second client corresponding to the target reflow instance; obtain the query result of the service message from the second client; if it is determined that the query result indicates that there is a service message to be processed in the service message, If it is determined that there is a corresponding relationship between the service message to be reflow processed and the target reflow instance, it is determined that the reflow processing result is not completed.

在一个示例性实施例中,上述第二创建模块,还用于:确定所述目标回流实例对应的第二消息中间件接口;基于所述第二消息中间件接口建立用于传输所述查询结果的第二消息通道;接收通过所述第二消息通道传输的所述查询结果;其中,所述第二消息中间件接口允许对接不同中间件类型的客户端。In an exemplary embodiment, the above-mentioned second creation module is further configured to: determine the second message middleware interface corresponding to the target reflow instance; establish a message for transmitting the query result based on the second message middleware interface The second message channel; receiving the query result transmitted through the second message channel; wherein, the second message middleware interface allows docking with clients of different middleware types.

在一个示例性实施例中,上述目标回流实例的生成装置还包括:第一销毁模块,用于在确定所述目标回流实例的实例状态指示所述目标回流实例结束启用的情况下,销毁所述目标回流实例对应的第一客户端;如果接收到用于指示所述第一客户端销毁成功的第三通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, the above-mentioned device for generating a target reflow instance further includes: a first destruction module configured to destroy the target reflow instance when it is determined that the instance status of the target reflow instance indicates that the The first client corresponding to the target reflow instance; if a third notification message indicating that the first client is destroyed successfully is received, it is determined that the reflow processing result is completed.

在一个示例性实施例中,进一步的,上述目标回流实例的生成装置还包括:第二销毁模块,用于在确定所述目标回流实例的实例状态指示所述目标回流实例结束启用的情况下,销毁所述目标回流实例对应的第二客户端;如果接收到用于指示所述第二客户端销毁成功的第四通知消息,则确定所述回流处理结果为完成。In an exemplary embodiment, further, the above-mentioned device for generating a target reflow instance further includes: a second destruction module, configured to, when it is determined that the instance state of the target reflow instance indicates that the target reflow instance has ended activation, Destroy the second client corresponding to the target reflow instance; if a fourth notification message indicating that the second client is destroyed successfully is received, determine that the reflow processing result is completed.

图6是根据本申请实施例的一种目标回流实例的生成装置的结构框图(二);如图6所示,上述配置模块44包括:设置单元52,用于从所述预设配置库内确定出所述初始回流实例的预设回流次数,所述初始回流实例的初始回流时间间隔;在确定所述预设回流次数不大于预设阈值的情况下,基于所述预设回流次数和预设阈值的差值设置所述回流间隔时间的递增时间,并根据初始回流时间间隔和所述递增时间的和值确定出所述目标回流实例的回流时间间隔;在确定所述预设回流次数大于预设阈值的情况下,将所述回流间隔时间设置为默认递增时间,并根据初始回流时间间隔和所述默认递增时间的和值确定出所述目标回流实例的回流时间间隔。Fig. 6 is a structural block diagram (2) of a device for generating a target reflow example according to an embodiment of the present application; as shown in Fig. 6, the above-mentioned configuration module 44 includes: a setting unit 52 for selecting from the preset configuration library Determine the preset number of reflows of the initial reflow instance, the initial reflow time interval of the initial reflow instance; when it is determined that the preset number of reflows is not greater than a preset threshold, based on the preset number of reflows and the preset Set the increment time of the backflow interval time by setting the difference of the threshold value, and determine the backflow time interval of the target backflow instance according to the sum value of the initial backflow time interval and the increment time; when determining that the preset number of backflow times is greater than In the case of a preset threshold, the reflow interval is set as a default increment time, and the reflow time interval of the target reflow instance is determined according to the sum of the initial reflow time interval and the default increment time.

本申请的实施例还提供了一种存储介质,该存储介质包括存储的程序,其中,上述程序运行时执行上述任一项的方法。An embodiment of the present application further provides a storage medium, the storage medium includes a stored program, wherein the above-mentioned program executes any one of the above-mentioned methods when running.

可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Optionally, in this embodiment, the above-mentioned storage medium may be configured to store program codes for performing the following steps:

S1,在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;S1. When it is determined that a service message that fails to process a business is detected, determine an initial reflow instance corresponding to the service message, where the initial reflow instance is a reflow instance that has not been configured for reflow;

S2,响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。S2. In response to a configuration instruction of the target object, determine configuration information for configuring the reflow instance from a preset configuration library, and use the configuration information to configure the initial reflow instance to generate a target reflow instance, Wherein, the target reflow instance is used to determine a reflow processing result after reflow processing is performed on the service message.

本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present application also provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.

可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:

S1,在确定监测到业务处理失败的业务消息的情况下,确定出所述业务消息对应的初始回流实例,其中,所述初始回流实例为没有进行回流配置的回流实例;S1. When it is determined that a service message that fails to process a business is detected, determine an initial reflow instance corresponding to the service message, where the initial reflow instance is a reflow instance that has not been configured for reflow;

S2,响应于目标对象的配置指令,从预设配置库内确定出用于配置所述回流实例的配置信息,并使用所述配置信息对所述初始回流实例进行配置,以生成目标回流实例,其中,所述目标回流实例用于确定对所述业务消息进行回流处理后的回流处理结果。S2. In response to a configuration instruction of the target object, determine configuration information for configuring the reflow instance from a preset configuration library, and use the configuration information to configure the initial reflow instance to generate a target reflow instance, Wherein, the target reflow instance is used to determine a reflow processing result after reflow processing is performed on the service message.

可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), Various media that can store program codes such as removable hard disks, magnetic disks, or optical disks.

可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not repeated in this embodiment.

显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned application can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present application is not limited to any specific combination of hardware and software.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only the preferred embodiment of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, some improvements and modifications can also be made. These improvements and modifications are also It should be regarded as the protection scope of this application.

Claims (12)

1. The method for generating the target reflux example is characterized by comprising the following steps:
under the condition that the service message of which the service processing is failed is determined to be monitored, determining an initial reflow instance corresponding to the service message, wherein the initial reflow instance is a reflow instance which is not subjected to reflow configuration; and responding to a configuration instruction of a target object, determining configuration information for configuring the reflow example from a preset configuration library, and configuring the initial reflow example by using the configuration information to generate a target reflow example, wherein the target reflow example is used for determining a reflow processing result after the business message is subjected to reflow processing.
2. The method for generating a target reflow instance according to claim 1, wherein after configuring the initial reflow instance using the configuration information to generate a target reflow instance, the method further comprises:
Under the condition that the instance state of the target reflux instance is determined to indicate that the target reflux instance is started, a first client corresponding to the target reflux instance is created;
responding to a query instruction of the first client, and acquiring an instance name contained in the query instruction;
and sending the reflow parameters of the target reflow instance to the first client under the condition that the instance name is consistent with the instance name of the target reflow instance.
3. The method for generating the target reflux instance according to claim 2, wherein after sending the reflux parameters of the target reflux instance to the first client, the method further comprises:
if a first notification message for indicating to continue the reflow by the first client is received, determining that the reflow processing result is incomplete;
and if a second notification message for indicating that the reflow is finished is received by the first client, determining that the reflow processing result is finished.
4. The method for generating the target reflux instance according to claim 2, wherein sending the reflux parameters of the target reflux instance to the first client includes:
Determining a first message middleware interface corresponding to the target reflux instance;
establishing a first message channel for transmitting the reflow parameters based on the first message middleware interface;
sending the reflow parameters to the first client through the first message channel;
wherein the first message middleware interface allows interfacing clients of different middleware types.
5. The method for generating a target reflow instance according to claim 1, wherein after configuring the initial reflow instance using the configuration information to generate a target reflow instance, the method further comprises:
under the condition that the instance state of the target reflux instance is determined to indicate that the target reflux instance is started, a second client corresponding to the target reflux instance is created;
acquiring a query result of the second client on the service message;
and under the condition that the query result indicates that the service message to be reflowed exists in the service messages, if the corresponding relation between the service message to be reflowed and the target reflow example is determined, determining that the reflow result is incomplete.
6. The method for generating the target reflux instance according to claim 5, wherein obtaining the query result of the second client for the service message comprises:
determining a second message middleware interface corresponding to the target reflux instance;
establishing a second message channel for transmitting the query result based on the second message middleware interface;
receiving the query result transmitted through the second message channel;
wherein the second message middleware interface allows interfacing clients of different middleware types.
7. The method for generating a target reflow instance according to claim 1, wherein after configuring the initial reflow instance using the configuration information to generate a target reflow instance, the method further comprises:
destroying a first client corresponding to the target reflux instance under the condition that the instance state of the target reflux instance indicates that the target reflux instance is started;
and if a third notification message for indicating that the first client is destroyed successfully is received, determining that the reflow processing result is finished.
8. The method for generating a target reflow instance according to claim 1, wherein after configuring the initial reflow instance using the configuration information to generate a target reflow instance, the method further comprises:
Destroying a second client corresponding to the target reflux instance under the condition that the instance state of the target reflux instance indicates that the target reflux instance is started;
and if a fourth known message for indicating that the second client is destroyed successfully is received, determining that the reflow processing result is finished.
9. The method for generating the target reflow instance according to claim 1, wherein configuring the initial reflow instance using the configuration information includes:
determining the preset reflow times of the initial reflow examples from the preset configuration library, wherein the initial reflow time interval of the initial reflow examples;
setting increasing time of the reflow interval time based on the difference value of the preset reflow times and the preset threshold value under the condition that the preset reflow times are not larger than the preset threshold value, and determining the reflow time interval of the target reflow example according to the sum value of the initial reflow time interval and the increasing time;
and setting the reflow interval time as a default increment time under the condition that the preset reflow times are larger than a preset threshold value, and determining the reflow time interval of the target reflow example according to the sum value of the initial reflow time interval and the default increment time.
10. A device for generating a target reflux instance, comprising:
the determining module is used for determining an initial reflow instance corresponding to the service message under the condition that the service message with failed service processing is determined, wherein the initial reflow instance is a reflow instance without reflow configuration;
the configuration module is used for responding to a configuration instruction of a target object, determining configuration information for configuring the reflow instance from a preset configuration library, and configuring the initial reflow instance by using the configuration information to generate a target reflow instance, wherein the target reflow instance is used for determining a reflow processing result after the business message is subjected to reflow processing.
11. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run performs the method of any of the preceding claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 9 by means of the computer program.
CN202310281987.8A 2023-03-21 2023-03-21 Method, device, storage medium and electronic device for generating target reflow instances Pending CN116578618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310281987.8A CN116578618A (en) 2023-03-21 2023-03-21 Method, device, storage medium and electronic device for generating target reflow instances

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310281987.8A CN116578618A (en) 2023-03-21 2023-03-21 Method, device, storage medium and electronic device for generating target reflow instances

Publications (1)

Publication Number Publication Date
CN116578618A true CN116578618A (en) 2023-08-11

Family

ID=87534731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310281987.8A Pending CN116578618A (en) 2023-03-21 2023-03-21 Method, device, storage medium and electronic device for generating target reflow instances

Country Status (1)

Country Link
CN (1) CN116578618A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760074A (en) * 2011-04-26 2012-10-31 Sap股份公司 High-load business process scalability
US20190103289A1 (en) * 2017-09-29 2019-04-04 Intel Corporation Techniques to reduce substrate reflow warpage
CN110187936A (en) * 2019-05-31 2019-08-30 口碑(上海)信息技术有限公司 Data backflow platform, system and method
WO2022048648A1 (en) * 2020-09-03 2022-03-10 第四范式(北京)技术有限公司 Method and apparatus for achieving automatic model construction, electronic device, and storage medium
US20220417342A1 (en) * 2019-11-29 2022-12-29 Bigo Technology Pte. Ltd. System and method for pushing information, and device and storage medium thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102760074A (en) * 2011-04-26 2012-10-31 Sap股份公司 High-load business process scalability
US20190103289A1 (en) * 2017-09-29 2019-04-04 Intel Corporation Techniques to reduce substrate reflow warpage
CN110187936A (en) * 2019-05-31 2019-08-30 口碑(上海)信息技术有限公司 Data backflow platform, system and method
US20220417342A1 (en) * 2019-11-29 2022-12-29 Bigo Technology Pte. Ltd. System and method for pushing information, and device and storage medium thereof
WO2022048648A1 (en) * 2020-09-03 2022-03-10 第四范式(北京)技术有限公司 Method and apparatus for achieving automatic model construction, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
EP3493485B1 (en) Method, apparatus and system for notification
WO2020206693A1 (en) Smart home scheduling method, apparatus and system, server and storage medium
CN105242547A (en) Linkage method and device of AllJoyn devices
CN114884975A (en) Service message processing method and device, storage medium and electronic device
CN115174512A (en) Message pushing method and device, storage medium and electronic device
US20180176745A1 (en) M2m group and notification resource creation and information exchange methods therefor, and storage medium
WO2015192466A1 (en) Notification message transmission method and device, and computer storage medium
CN114157725B (en) Method, device, server, electronic equipment and storage medium for equipment linkage
CN114286431B (en) Method and device for starting low-power mode, storage medium and electronic device
CN114326420A (en) Intelligent grouping method and device for equipment, intelligent equipment and storage medium
CN116418613A (en) Message reflow processing method and device, storage medium and electronic device
CN112422383B (en) Method and device for sending prompt information, storage medium and electronic device
CN112511579A (en) Event notification method, system, server device, computer storage medium
CN116578618A (en) Method, device, storage medium and electronic device for generating target reflow instances
CN109409883B (en) Cooperative processing method based on intelligent contract, household appliance and server
CN115297162B (en) Message sending method and device, storage medium and electronic device
CN115473753A (en) Control method and device of gateway equipment, storage medium and electronic device
CN115309062A (en) Device control method, device, storage medium and electronic device
CN114745429A (en) Message pushing execution method and device, storage medium and electronic equipment
CN115766643B (en) Message pushing system
CN115312050B (en) Instruction response method, storage medium and electronic device
CN115032917B (en) Device control method, storage medium and electronic device
CN115174296B (en) Equipment function access method and device, storage medium and electronic device
CN115296945B (en) Control method, system and device of equipment, storage medium and electronic device
CN115314549B (en) Offline equipment management method, storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination