CN114911636A - Method and device for monitoring circulation of interactive data, storage medium and electronic device - Google Patents

Method and device for monitoring circulation of interactive data, storage medium and electronic device Download PDF

Info

Publication number
CN114911636A
CN114911636A CN202210283493.9A CN202210283493A CN114911636A CN 114911636 A CN114911636 A CN 114911636A CN 202210283493 A CN202210283493 A CN 202210283493A CN 114911636 A CN114911636 A CN 114911636A
Authority
CN
China
Prior art keywords
data
interaction
target
thread
data set
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
CN202210283493.9A
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
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210283493.9A priority Critical patent/CN114911636A/en
Publication of CN114911636A publication Critical patent/CN114911636A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for monitoring the circulation of interactive data, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that the message middleware sends a first data set to the data consumption equipment through a first thread, determining whether data in the first data set is successfully sent to the data consumption equipment by the message middleware through the first thread, and under the condition that a second data set which is not successfully sent to the data consumption equipment by the message middleware exists in the first data set, storing the second data set which is not successfully sent to the data consumption equipment in the first data set into a target database, wherein the second data set comprises interaction data in one or more interaction scenes in a group of interaction scenes; and sending the interaction data in part or all of the interaction scenes in the second data set stored in the target database to the data consumption equipment through the second thread.

Description

Method and device for monitoring circulation of interactive data, storage medium and electronic device
Technical Field
The invention relates to the field of communication, in particular to a method and a device for monitoring circulation of interactive data, a storage medium and an electronic device.
Background
With the rapid development of the internet of things, more and more families have intelligent home appliances, when a user uses the intelligent home appliances, for example, in a voice interaction scene, when a voice background program processes a request of the user, parameters and a response of the request are sent to a message queue KAFKA in an asynchronous manner, and then are transferred to databases of different types through KAFKA streaming, during the processing, data may not be successfully written into the databases due to unexpected situations such as data format problems, excessive network pressure, excessive IO load and the like, and data loss may be caused.
In the prior art, in the process of sending data to data consumption equipment by message middleware, data which is not successfully sent cannot be subjected to additional recording, so that the problem of data loss is solved.
Accordingly, there is a need for improvement in the related art to overcome the disadvantages of the related art.
Disclosure of Invention
The embodiment of the invention provides a method and a device for monitoring the circulation of interactive data, a storage medium and an electronic device, which are used for at least solving the problem that data is lost because the unsuccessfully sent data cannot be subjected to additional recording in the process of sending the data to data consumption equipment by a message middleware.
According to an aspect of an embodiment of the present invention, a method for monitoring a flow of interactive data is provided, including: under the condition that message middleware sends a first data set to a data consumption device through a first thread, determining whether data in the first data set is successfully sent to the data consumption device through the first thread by the message middleware, wherein the first data set comprises interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenes of the target interaction device, which are subscribed by the data consumption device; storing a second data set of the first data set that is not successfully sent to the data consumption device in a target database if the second data set exists in the first data set that is not successfully sent to the data consumption device by the message middleware, wherein the second data set comprises interaction data in one or more interaction scenarios in the set of interaction scenarios; sending interaction data in part or all of the interaction scenes in the second data set stored in the target database to the data consumption equipment through a second thread, wherein the first thread and the second thread are asynchronous threads.
Further, the storing the second data set of the first data set that was not successfully sent to the data consumption device in a target database includes: and under the condition that the first data set is a data set acquired from log information of the target interaction device, storing interaction data in the same interaction scene included in the second data set on the same block of storage position in the target database, wherein the recording positions of at least part of interaction data in the same interaction scene in the group of interaction scenes in the log information are not adjacent.
Further, before determining whether the data in the first data set is successfully sent by the message middleware to the data consumption device via the first thread, the method further comprises: and storing the interactive data in each interactive scene in the group of interactive scenes included in the first data set into a plurality of cache spaces corresponding to the message middleware through the message middleware, wherein each cache space in the plurality of cache spaces is used for caching the interactive data in one interactive scene in the group of interactive scenes.
Further, before determining whether the data in the first data set is successfully sent by the message middleware to the data consumption device via the first thread, the method further comprises: and sequentially reading the interactive data in each interactive scene in the group of interactive scenes from the multi-block cache space through the message middleware, and sending the interactive data read from the multi-block cache space to the data consumption equipment through the first thread.
Further, the sending, by a second thread, interaction data in part or all of the interaction scenarios included in the second data set stored in the target database to the data consumption device includes: and sending the interaction data in each of the partial or all interaction scenes stored in the target database to the data consumption equipment through the second thread by taking the interaction data in one interaction scene as a unit.
Further, the sending, by a second thread, interaction data in part or all of the interaction scenarios included in the second data set stored in the target database to the data consumption device includes: under the condition that the data consumption equipment is detected to need to process interactive data in a target interactive scene, determining whether interactive data in the target interactive scene which is not sent successfully is stored in the target database; and under the condition that the interaction data in the target interaction scene which is not successfully sent is determined to be stored in the target database, sending the interaction data in the target interaction scene stored in the target database to the data consumption equipment through the second thread.
Further, the determining whether interaction data in the target interaction scenario which is not successfully sent is stored in the target database in the case that it is detected that the data consumption device needs to process the interaction data in the target interaction scenario includes: under the condition that the data consumption device is detected to need to process the interaction data in the target interaction scene, comparing the interaction data in the target interaction scene on the data consumption device with the interaction data in the target interaction scene on a group of consumption devices, wherein the message middleware is used for respectively sending the first data set to the data consumption device and the group of consumption devices; when the interaction data in the target interaction scene on the data consumption device is different from the interaction data in the target interaction scene on at least N consumption devices in the group of consumption devices, determining that the interaction data in the target interaction scene on the data consumption device is incomplete, and determining whether the interaction data in the target interaction scene which is not successfully sent is stored in the target database, wherein N is a positive integer greater than or equal to 1.
According to another aspect of the embodiments of the present invention, there is also provided a device for monitoring circulation of interactive data, including: the data processing device comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining whether data in a first data set is successfully sent to a data consumption device by message middleware through a first thread under the condition that the message middleware sends the first data set to the data consumption device through the first thread, the first data set comprises interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenes of the target interaction device, which are subscribed by the data consumption device; a storage module, configured to store, in a target database, a second data set that is not successfully sent to the data consumption device in the first data set if there is the second data set that is not successfully sent to the data consumption device by the message middleware in the first data set, where the second data set includes interaction data in one or more interaction scenarios in the group of interaction scenarios; a sending module, configured to send, through a second thread, interaction data in a part or all of the interaction scenes included in the second data set stored in the target database to the data consumption device, where the first thread and the second thread are asynchronous threads.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned method for monitoring the circulation of the interactive data when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for monitoring the circulation of the interactive data through the computer program.
According to the method and the device, under the condition that the message middleware sends the first data set to the data consumption equipment through the first thread, whether the data in the first data set is successfully sent to the data consumption equipment by the message middleware through the first thread is determined, and under the condition that the second data set which is not successfully sent to the data consumption equipment by the message middleware exists in the first data set, the second data set is stored in the target database, and the interaction data in part or all of the interaction scenes in the second data set stored in the target database is sent to the data consumption equipment through the second thread. By adopting the technical scheme, when the message middleware has data which is not successfully transmitted to the data consumption equipment, the data which is not successfully transmitted is subjected to data supplement and recording, and data loss is avoided. The problem that data are lost due to the fact that the data which are not successfully sent cannot be subjected to additional recording in the process that the message middleware sends the data to the data consumption equipment is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a computer terminal of a method for monitoring a flow of interactive data according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for flow monitoring of interactive data according to an embodiment of the present invention;
FIG. 3 is a block diagram of a method for flow monitoring of interactive data according to an embodiment of the present invention;
fig. 4 is a block diagram (one) of the structure of the device for monitoring the circulation of the interactive data according to the embodiment of the present invention.
Fig. 5 is a block diagram (ii) of the structure of the interactive data flow monitoring apparatus according to the embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal or a similar computing device. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of the computer terminal of the method for monitoring the circulation of the interactive data according to the embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1), wherein the processors 102 may include, but are not limited to, a Microprocessor (MPU) or a Programmable Logic Device (PLD), and a memory 104 for storing data, and in an exemplary embodiment, the computer terminal may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of an application software and a module, such as a computer program corresponding to the method for monitoring the circulation of the interactive data in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In order to solve the above problem, in this embodiment, a method for monitoring the circulation of interactive data is provided, and fig. 2 is a flowchart of the method for monitoring the circulation of interactive data according to the embodiment of the present invention, where the flowchart includes the following steps:
step S202, under the condition that a message middleware sends a first data set to a data consumption device through a first thread, determining whether data in the first data set is successfully sent to the data consumption device through the first thread by the message middleware, wherein the first data set comprises interactive data of a target interactive device in use, and the interactive data in the first data set is interactive data in a group of interactive scenes of the target interactive device, which is subscribed by the data consumption device;
in an exemplary embodiment, the message middleware includes, but is not limited to, KAFKA, which is an open source streaming platform developed by the Apache software foundation and written in Scala and Java. The message middleware is low in delay, high in reliability, scalable and easy to use.
It should be noted that, in an exemplary embodiment, the interaction data may be interaction data generated by a user performing voice interaction with a target interaction device, where the target interaction device includes, but is not limited to, a smart speaker, a smart refrigerator, a smart air conditioner, and the set of interaction scenarios includes, but is not limited to: voice interaction scenarios, control interaction scenarios, etc.
Step S204, under the condition that a second data set which is not successfully sent to the data consumption equipment by the message middleware exists in the first data set, storing the second data set which is not successfully sent to the data consumption equipment in the first data set into a target database, wherein the second data set comprises interaction data in one or more interaction scenes in the group of interaction scenes;
it should be noted that, in an exemplary embodiment, the target database is REDIS, where REDIS a remote dictionary service, is an open-source log-type Key-Value database written in ANSIC language, supporting network, and can be based on memory or be persistent, and provides API in multiple languages.
Step S206, sending, by a second thread, interaction data in part or all of the interaction scenes included in the second data set stored in the target database to the data consumption device, where the first thread and the second thread are asynchronous threads.
Through the steps, under the condition that the message middleware sends the first data set to the data consumption equipment through the first thread, whether the data in the first data set is successfully sent to the data consumption equipment by the message middleware through the first thread is determined, and under the condition that the second data set which is not successfully sent to the data consumption equipment by the message middleware exists in the first data set, the second data set is stored in the target database, and the interaction data in part or all of the interaction scenes in the second data set stored in the target database is sent to the data consumption equipment through the second thread. By adopting the technical scheme, when the message middleware has data which is not successfully transmitted to the data consumption equipment, the data which is not successfully transmitted is subjected to data supplement and recording, and data loss is avoided. The problem that data are lost due to the fact that the data which are not successfully sent cannot be subjected to additional recording in the process that the message middleware sends the data to the data consumption equipment is solved.
In an exemplary embodiment, before performing step S202, the message middleware may store, in a plurality of cache spaces corresponding to the message middleware, the interactive data in each interactive scene in the group of interactive scenes included in the first data set, respectively, where each cache space in the plurality of cache spaces is used to cache the interactive data in a corresponding interactive scene in the group of interactive scenes.
It should be noted that if the message middleware is KAFKA, the above-mentioned cache space is equivalent to a topic in KAFKA, where KAFKA abstracts a set of data into a topic. That is, one topic corresponds to a classification of data, a producer sends data to a specific topic, and consumers subscribe the topic and then perform consumption processing.
In an exemplary embodiment, before determining whether the data in the first data set is successfully sent to the data consuming device by the message middleware through the first thread, the message middleware is further required to sequentially read the interaction data in each interaction scenario in the group of interaction scenarios from the multi-block cache space, and send the interaction data read from the multi-block cache space to the data consuming device through the first thread.
Specifically, the message middleware sequentially reads the interaction data of one interaction scene in a group of interaction scenes from each cache space in the plurality of cache spaces, and sequentially sends the interaction data of one interaction scene to the data consumption device through the first thread.
In an exemplary embodiment, the storing the second data set of the first data set that is not successfully sent to the data consuming device in the target database may be implemented by: and when the first data set is the data set acquired from the log information of the target interaction device, storing interaction data in the same interaction scene included in the second data set in the same block of storage position in the target database. It should be noted that, at least some of the interactive data in the same interactive scene in the set of interactive scenes are not adjacent to each other in the log information.
That is to say, when the second data set is stored in the target database, since the second data set has data of different interactive scenes, the interactive data in the second data set having the same interactive scene is stored in the same block of storage location in the target database in order to facilitate subsequent entry from the hierarchy of the interactive scenes.
There are various implementations of the step S206, and in an exemplary embodiment, the following implementations may be implemented: and sending the interaction data in each of the partial or all interaction scenes stored in the target database to the data consumption equipment through the second thread by taking the interaction data in one interaction scene as a unit.
In an exemplary embodiment, the following may also be implemented: under the condition that the data consumption equipment is detected to need to process interactive data in a target interactive scene, determining whether interactive data in the target interactive scene which is not sent successfully is stored in the target database; and under the condition that the interaction data in the target interaction scene which is not successfully sent is determined to be stored in the target database, sending the interaction data in the target interaction scene stored in the target database to the data consumption equipment through the second thread.
Specifically, in an exemplary embodiment, in a case that it is detected that the data consumption device needs to process the interaction data in the target interaction scenario, determining whether the interaction data in the target interaction scenario that is not successfully sent is stored in the target database may be implemented by: under the condition that the data consumption device is detected to need to process the interaction data in the target interaction scene, comparing the interaction data in the target interaction scene on the data consumption device with the interaction data in the target interaction scene on a group of consumption devices, wherein the message middleware is used for respectively sending the first data set to the data consumption device and the group of consumption devices; when the interaction data in the target interaction scene on the data consumption device is different from the interaction data in the target interaction scene on at least N consumption devices in the group of consumption devices, determining that the interaction data in the target interaction scene on the data consumption device is incomplete, and determining whether the interaction data in the target interaction scene which is not successfully sent is stored in the target database, wherein N is a positive integer greater than or equal to 1.
In an optional embodiment, a first quantity of data sent by the message middleware to the data consumption device and a second quantity of data received by the data consumption device can be counted, and then under the condition that the first quantity is not equal to the second quantity, the difference between the first quantity and the second quantity is sent to a manager through the communication software, so that the manager is informed of how much data is not successfully sent.
Further, a third quantity of the data which is subsidized and recorded to the data consumption equipment through the target database can be determined, and then the difference between the fourth quantity and the third quantity is sent to the manager through the communication software to inform the manager that a plurality of data are unsupplemented and recorded successfully, wherein the fourth quantity is the difference between the first quantity and the second quantity.
It is to be understood that the above-described embodiments are only a few, but not all, embodiments of the present invention. In order to better understand the method for monitoring the circulation of the interactive data, the following description is given to the above process with reference to an embodiment, but the method is not limited to the technical solution of the embodiment of the present invention, specifically:
in an optional embodiment, fig. 3 is a block diagram of a method for monitoring a flow of interactive data according to an embodiment of the present invention, and specifically, the embodiment of the present invention includes the following components:
(1) the voice application program sends data to the theme appointed by KAFKA in an asynchronous mode, so that the blockage to the main thread can be reduced;
(2) the data processing application is used in the process of processing data, if the abnormity is detected, the data is persisted to the REDIS database in a locking mode, and the data loss caused by excessive application flow data is avoided;
(3) counting the number of KAFKA flows transferred to each database at intervals, and notifying workers by mails;
(4) in data circulation, if circulation fails, data are written into the REDIS database, after a period of time, the data in the REDIS database are additionally recorded into each database, data additional recording is completed, and staff are informed of the additionally recorded data and the number of the additional recording failures through mails.
It should be noted that the completion of the data entry function is an independent thread, which does not affect the original service, and meanwhile, after an exception occurs, the data entry thread can receive a message in near real time to process data, thereby ensuring the real-time performance of data entry.
That is, according to the embodiment of the application, when the data flow is abnormal, the data flow can be rapidly counted without affecting the main flow, and the staff is notified in an email mode, and if the data flow is found to be failed in the data flow process, automatic additional recording can be performed, the staff is notified of the successful additional recording and the unrecorded data volume, and the staff receives the unsupplemented data volume, can inquire the corresponding data in the REDIS, check the data structure or perform batch processing, and perform warehousing again.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for monitoring the circulation of the interactive data is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of which is already given is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware or a combination of software and hardware are also possible and contemplated.
Fig. 4 is a block diagram (a) of a structure of an apparatus for monitoring a flow of interactive data according to an embodiment of the present invention, the apparatus including:
a determining module 42, configured to determine, in a case that the message middleware sends a first data set to the data consuming device through a first thread, whether data in the first data set is successfully sent to the data consuming device through the first thread by the message middleware, where the first data set includes interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenarios of the target interaction device, to which the data consuming device subscribes;
a storage module 44, configured to store, in a target database, a second data set that is not successfully sent to the data consumption device in the first data set if there is a second data set that is not successfully sent to the data consumption device by the message middleware, where the second data set includes interaction data in one or more interaction scenarios in the group of interaction scenarios;
a sending module 46, configured to send, by a second thread, interaction data in part or all of the interaction scenarios included in the second data set stored in the target database to the data consuming device, where the first thread and the second thread are asynchronous threads.
Through the device, under the condition that the message middleware sends the first data set to the data consumption equipment through the first thread, whether the data in the first data set is successfully sent to the data consumption equipment by the message middleware through the first thread is determined, and under the condition that the second data set which is not successfully sent to the data consumption equipment by the message middleware exists in the first data set, the second data set is stored in the target database, and the interaction data in part or all of the interaction scenes in the second data set stored in the target database is sent to the data consumption equipment through the second thread. By adopting the technical scheme, when the message middleware has data which is not successfully transmitted to the data consumption equipment, the data which is not successfully transmitted is subjected to data supplement and recording, and data loss is avoided. The problem that data are lost due to the fact that the data which are not successfully sent cannot be subjected to additional recording in the process that the message middleware sends the data to the data consumption equipment is solved.
In an exemplary embodiment, the storage module 44 is further configured to, in a case that the first data set is a data set obtained from log information of the target interaction device, store interaction data in a same interaction scenario included in the second data set on a same block of storage location in the target database, where recording locations of at least part of interaction data in the same interaction scenario in the group of interaction scenarios in the log information are not adjacent.
In an exemplary embodiment, the storage module 44 is further configured to store, by the message middleware, the interaction data in each interaction scene in the group of interaction scenes included in the first data set into a plurality of cache spaces corresponding to the message middleware, respectively, where each cache space in the plurality of cache spaces is used to cache the interaction data in a corresponding interaction scene in the group of interaction scenes.
Fig. 5 is a block diagram (ii) of a structure of an interactive data flow monitoring apparatus according to an embodiment of the present invention, where the apparatus includes: a processing module 48.
In an exemplary embodiment, the processing module 48 is further configured to sequentially read, by the message middleware, the interaction data in each interaction scene in the group of interaction scenes from the multi-block cache space, and send, by the first thread, the interaction data read from the multi-block cache space to the data consuming device.
In an exemplary embodiment, the sending module 46 is further configured to send, by using the second thread, the interaction data in each of the part or all of the interaction scenarios stored in the target database to the data consuming device in units of interaction data in one interaction scenario.
In an exemplary embodiment, the sending module 46 is further configured to, in a case that it is detected that the data consumption device needs to process the interaction data in the target interaction scenario, determine whether interaction data in the target interaction scenario which is not successfully sent is stored in the target database; and under the condition that the interaction data in the target interaction scene which is not successfully sent is determined to be stored in the target database, sending the interaction data in the target interaction scene stored in the target database to the data consumption equipment through the second thread.
In an exemplary embodiment, the processing module 48 is further configured to, in case that it is detected that the data consumption device needs to process the interaction data in the target interaction scenario, compare the interaction data in the target interaction scenario on the data consumption device with the interaction data in the target interaction scenario on a set of consumption devices, wherein the message middleware is configured to send the first data set to the data consumption device and the set of consumption devices, respectively; when the interaction data in the target interaction scene on the data consumption device is different from the interaction data in the target interaction scene on at least N consumption devices in the group of consumption devices, determining that the interaction data in the target interaction scene on the data consumption device is incomplete, and determining whether the interaction data in the target interaction scene which is not successfully sent is stored in the target database, wherein N is a positive integer greater than or equal to 1.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, in the case that the message middleware sends a first data set to the data consumption device through a first thread, determining whether data in the first data set is successfully sent to the data consumption device through the first thread by the message middleware, wherein the first data set comprises interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenes of the target interaction device, which is subscribed by the data consumption device;
s2, in the case that a second data set which is not successfully sent to the data consumption device by the message middleware exists in the first data set, storing the second data set which is not successfully sent to the data consumption device in the first data set into a target database, wherein the second data set comprises interaction data in one or more interaction scenes in the group of interaction scenes;
s3, sending the interaction data in part or all of the interaction scenes in the second data set stored in the target database to the data consumption device through a second thread, wherein the first thread and the second thread are asynchronous threads.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, in the case that the message middleware sends a first data set to the data consumption device through a first thread, determining whether data in the first data set is successfully sent to the data consumption device through the first thread by the message middleware, wherein the first data set comprises interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenes of the target interaction device, which is subscribed by the data consumption device;
s2, in the case that a second data set which is not successfully sent to the data consumption device by the message middleware exists in the first data set, storing the second data set which is not successfully sent to the data consumption device in the first data set into a target database, wherein the second data set comprises interaction data in one or more interaction scenes in the group of interaction scenes;
s3, sending the interaction data in part or all of the interaction scenes in the second data set stored in the target database to the data consumption device through a second thread, wherein the first thread and the second thread are asynchronous threads.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for monitoring the circulation of interactive data is characterized by comprising the following steps:
under the condition that message middleware sends a first data set to a data consumption device through a first thread, determining whether data in the first data set is successfully sent to the data consumption device through the first thread by the message middleware, wherein the first data set comprises interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenes of the target interaction device, which are subscribed by the data consumption device;
storing a second data set of the first data set that is not successfully sent to the data consumption device in a target database if the second data set exists in the first data set that is not successfully sent to the data consumption device by the message middleware, wherein the second data set comprises interaction data in one or more interaction scenarios in the set of interaction scenarios;
sending interaction data in part or all of the interaction scenes in the second data set stored in the target database to the data consumption equipment through a second thread, wherein the first thread and the second thread are asynchronous threads.
2. The method of claim 1, wherein storing the second set of data of the first set of data that was not successfully sent to the data consumption device in a target database comprises:
and under the condition that the first data set is a data set acquired from log information of the target interaction device, storing interaction data in the same interaction scene included in the second data set on the same block of storage position in the target database, wherein the recording positions of at least part of interaction data in the same interaction scene in the group of interaction scenes in the log information are not adjacent.
3. The method of claim 1, wherein prior to determining whether the data in the first set of data was successfully sent by the message middleware to the data consumption device via the first thread, the method further comprises:
storing, by the message middleware, the interactive data in each interactive scene in the group of interactive scenes included in the first data set into a plurality of cache spaces corresponding to the message middleware, respectively, where each cache space in the plurality of cache spaces is used to cache the interactive data in a corresponding interactive scene in the group of interactive scenes.
4. The method of claim 3, wherein prior to determining whether the data in the first set of data was successfully sent by the message middleware to the data consumption device via the first thread, the method further comprises:
and reading the interactive data in each interactive scene in the group of interactive scenes from the multi-block cache space in sequence through the message middleware, and sending the interactive data read from the multi-block cache space to the data consumption equipment through the first thread.
5. The method according to any one of claims 1 to 4, wherein the sending, by the second thread, the interaction data in part or all of the interaction scenarios included in the second data set stored in the target database to the data consuming device comprises:
and sending the interaction data in each of the partial or all interaction scenes stored in the target database to the data consumption equipment through the second thread by taking the interaction data in one interaction scene as a unit.
6. The method according to any one of claims 1 to 4, wherein the sending, by the second thread, the interaction data in part or all of the interaction scenarios included in the second data set stored in the target database to the data consuming device comprises:
under the condition that the data consumption equipment is detected to need to process interactive data in a target interactive scene, determining whether interactive data in the target interactive scene which is not sent successfully is stored in the target database;
and under the condition that the interaction data in the target interaction scene which is not successfully sent is determined to be stored in the target database, sending the interaction data in the target interaction scene stored in the target database to the data consumption equipment through the second thread.
7. The method of claim 6, wherein the determining whether the interaction data in the target interaction scenario which is not successfully sent is stored in the target database in the case that the data consumption device is detected to need to process the interaction data in the target interaction scenario comprises:
under the condition that the data consumption device is detected to need to process the interaction data in the target interaction scene, comparing the interaction data in the target interaction scene on the data consumption device with the interaction data in the target interaction scene on a group of consumption devices, wherein the message middleware is used for respectively sending the first data set to the data consumption device and the group of consumption devices;
when the interaction data in the target interaction scene on the data consumption device is different from the interaction data in the target interaction scene on at least N consumption devices in the group of consumption devices, determining that the interaction data in the target interaction scene on the data consumption device is incomplete, and determining whether the interaction data in the target interaction scene which is not successfully sent is stored in the target database, wherein N is a positive integer greater than or equal to 1.
8. A circulation monitoring device of interactive data is characterized by comprising:
the data processing device comprises a determining module, a processing module and a processing module, wherein the determining module is used for determining whether data in a first data set is successfully sent to a data consumption device by message middleware through a first thread under the condition that the message middleware sends the first data set to the data consumption device through the first thread, the first data set comprises interaction data of a target interaction device in use, and the interaction data in the first data set is interaction data in a set of interaction scenes of the target interaction device, which are subscribed by the data consumption device;
a storage module, configured to store, in a target database, a second data set that is not successfully sent to the data consumption device in the first data set if there is the second data set that is not successfully sent to the data consumption device by the message middleware, where the second data set includes interaction data in one or more interaction scenarios in the set of interaction scenarios;
a sending module, configured to send, through a second thread, interaction data in part or all of the interaction scenes included in the second data set stored in the target database to the data consumption device, where the first thread and the second thread are asynchronous threads.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 7.
10. 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 of any of claims 1 to 7 by means of the computer program.
CN202210283493.9A 2022-03-22 2022-03-22 Method and device for monitoring circulation of interactive data, storage medium and electronic device Pending CN114911636A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210283493.9A CN114911636A (en) 2022-03-22 2022-03-22 Method and device for monitoring circulation of interactive data, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210283493.9A CN114911636A (en) 2022-03-22 2022-03-22 Method and device for monitoring circulation of interactive data, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN114911636A true CN114911636A (en) 2022-08-16

Family

ID=82763030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210283493.9A Pending CN114911636A (en) 2022-03-22 2022-03-22 Method and device for monitoring circulation of interactive data, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114911636A (en)

Similar Documents

Publication Publication Date Title
US20160117211A1 (en) Error troubleshooting using a correlated knowledge base
CN111736938B (en) Information display method and device, storage medium and electronic device
CN110647460B (en) Test resource management method and device and test client
CN108874825B (en) Abnormal data verification method and device
CN111552669A (en) Data processing method and device, computing equipment and storage medium
CN112667426A (en) Log analysis method and device
CN111324533A (en) A/B test method and device and electronic equipment
CN107566480B (en) User activity information acquisition method and device for mobile terminal application and storage medium
CN114417200A (en) Network data acquisition method and device and electronic equipment
CN107612753B (en) Wireless information processing method and device and wireless access equipment
CN109901950A (en) A kind of method and device for evading application crash
CN112799910A (en) Hierarchical monitoring method and device
CN114911636A (en) Method and device for monitoring circulation of interactive data, storage medium and electronic device
CN109697072A (en) Information processing method, device and equipment
CN114157725B (en) Method, device, server, electronic equipment and storage medium for equipment linkage
CN114422576A (en) Session cleaning method and device, computer equipment and readable storage medium
CN115033927A (en) Method, device, equipment and medium for detecting data integrity
CN111769980A (en) Operation information display method and device, storage medium and electronic device
CN110908886A (en) Data sending method and device, electronic equipment and storage medium
EP4336883A1 (en) Modeling method, network element data processing method and apparatus, electronic device, and medium
CN113778800B (en) Error information processing method, device, system, equipment and storage medium
CN112769889B (en) Service data pushing method and device, storage medium and electronic device
CN117873827A (en) Log configuration information updating method and device, storage medium and electronic device
CN114780424A (en) Module testing method, system, storage medium and electronic device
CN116599826A (en) Container maintenance method, device and storage medium

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