CN113934591A - Data monitoring method and device, storage medium and electronic device - Google Patents

Data monitoring method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113934591A
CN113934591A CN202111137442.7A CN202111137442A CN113934591A CN 113934591 A CN113934591 A CN 113934591A CN 202111137442 A CN202111137442 A CN 202111137442A CN 113934591 A CN113934591 A CN 113934591A
Authority
CN
China
Prior art keywords
target
interface
database
function
data
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
CN202111137442.7A
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 CN202111137442.7A priority Critical patent/CN113934591A/en
Publication of CN113934591A publication Critical patent/CN113934591A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a data monitoring method and device, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that the target application is started, a target container bound by the target application is called back to obtain a call-back result; determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database; configuring a function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function; and monitoring the state data of the corresponding equipment of the target application through the functional interface. The problems that in the prior art, the target application is relatively poor in compatibility with a plurality of target containers, the corresponding functional interfaces cannot be determined to be called according to the target containers and the like are solved, the multiplexing of functional codes among different containers is improved, the writing of repeated codes is reduced, and the normalization and the consistency of codes of the functional interfaces corresponding to the target application are improved.

Description

Data monitoring method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a data monitoring method and apparatus, a storage medium, and an electronic apparatus.
Background
As technologies develop, a variety of excellent cross-platform development schemes are continuously generated, and in order to adopt a more excellent cross-platform scheme, coexistence of an old scheme and an old scheme at the same time is inevitable. Each cross-platform solution has its own container environment. Therefore, when the service code is developed, a large number of difference codes are required to be added due to different containers to realize the calling of the corresponding basic functions, and the difference codes are used for performing higher adaptation on different containers of the service code to be developed so as to ensure the use of the codes; however, when the service code is subsequently tested, the quality of the code needs to be ensured by manual examination, and the characteristics of numerous repeated codes and difficult maintenance are easily generated.
Aiming at the problems that in the related art, the target application is poor in compatibility with a plurality of target containers, the corresponding functional interface can not be determined according to the target containers, and the like, an effective technical scheme is not provided.
Disclosure of Invention
The embodiment of the invention provides a data monitoring method and device, a storage medium and an electronic device, which are used for at least solving the problems that in the related art, target applications are poor in compatibility with a plurality of target containers, corresponding function interface calling cannot be determined according to the target containers, and the like.
According to an embodiment of the present invention, there is provided a data listening method, including: under the condition that the target application is started, a target container bound by the target application is called back to obtain a call-back result; determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database; configuring a function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function; and monitoring the state data of the equipment corresponding to the target application through the functional interface.
In an exemplary embodiment, before monitoring, through the functional interface, status data corresponding to a device corresponding to the target application, the method further includes: acquiring indication information determined by a target object on a target application, wherein the indication information is used for indicating target state data corresponding to equipment change information required to be acquired by the target object; and determining a target function interface to be monitored according to the indication information.
In an exemplary embodiment, after determining the target function interface to be monitored according to the indication information, the method further includes: acquiring device parameters corresponding to the target function interface, wherein the device parameters include: the device identification to be monitored through the target function interface; and under the condition that the target function interface determines that the equipment parameters meet preset data monitoring conditions, feeding back a calling message to the basic component database and the packaging database through the information channel, wherein the calling message is used for indicating that calling interfaces are created in the basic component database and the packaging database according to indication information.
In an exemplary embodiment, when the target function interface determines that the device parameter meets a preset data monitoring condition, feeding back a call message to the base component database and the encapsulation database through the information channel includes: acquiring a target calling interface for creating the indication information in the packaging database; and under the condition that the function for executing the call is issued to the basic component database through the target call interface, acquiring a response message fed back by the basic component database, wherein the response message is used for indicating the basic component database to execute the corresponding monitoring operation according to the indication information.
In an exemplary embodiment, after obtaining the response message fed back by the base component database, the method further includes: under the condition that the component in the basic component database monitors that the data of the equipment changes, receiving the changed data uploaded by the component through the information channel; and analyzing the change data to obtain target state data corresponding to the indication information.
In an exemplary embodiment, after configuring, by using the information channel, a function type corresponding to each service function of the target application to determine a function interface corresponding to each service function, the method further includes: determining an interface creator corresponding to the functional interface, wherein the interface creator is used for indicating an interface definition object for service type encapsulation in an encapsulation database; and binding the interface creator with the functional interface.
In an exemplary embodiment, after monitoring, through the functional interface, status data corresponding to a device corresponding to the target application, the method further includes: determining an update frequency of the state data, wherein the update frequency is used for indicating the feedback times of the state data in a target period; and prompting the target object to reinitiate the indication information under the condition that the updating frequency is lower than a preset threshold value.
According to another embodiment of the present invention, there is provided a data listening device including: the callback module is used for carrying out callback on the target container bound by the target application under the condition that the target application is started to obtain a callback result; the determining module is used for determining a container configuration database corresponding to the target container according to the callback result and determining an information channel established by the container configuration database and a basic component database through a packaging database; the configuration module is used for configuring the function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function; and the monitoring module is used for monitoring the state data of the equipment corresponding to the target application through the functional interface.
In an exemplary embodiment, the apparatus further includes: the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring indication information determined by a target object on a target application, and the indication information is used for indicating target state data corresponding to device change information required to be acquired by the target object; and determining a target function interface to be monitored according to the indication information.
In an exemplary embodiment, the obtaining module is further configured to obtain an apparatus parameter corresponding to the target function interface, where the apparatus parameter includes: the device identification to be monitored through the target function interface; and under the condition that the target function interface determines that the equipment parameters meet preset data monitoring conditions, feeding back a calling message to the basic component database and the packaging database through the information channel, wherein the calling message is used for indicating that calling interfaces are created in the basic component database and the packaging database according to indication information.
In an exemplary embodiment, the obtaining module is further configured to obtain a target call interface for creating the indication information in the package database; and under the condition that the function for executing the call is issued to the basic component database through the target call interface, acquiring a response message fed back by the basic component database, wherein the response message is used for indicating the basic component database to execute the corresponding monitoring operation according to the indication information.
In an exemplary embodiment, the obtaining module further includes: the receiving unit is used for receiving the change data uploaded by the component through the information channel under the condition that the component in the basic component database monitors that the data of the equipment is changed; and analyzing the change data to obtain target state data corresponding to the indication information.
In an exemplary embodiment, the apparatus further includes: the binding module is used for determining an interface creator corresponding to the functional interface, wherein the interface creator is used for indicating an interface definition object for business type encapsulation in an encapsulation database; and binding the interface creator with the functional interface.
In an exemplary embodiment, the apparatus further includes: the prompting module is used for determining the updating frequency of the state data, wherein the updating frequency is used for indicating the feedback times of the state data in a target period; and prompting the target object to reinitiate the indication information under the condition that the updating frequency is lower than a preset threshold value.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the method and the device, under the condition that the target application is started, the target container bound by the target application is called back to obtain a call-back result; determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database; configuring a function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function; and monitoring the state data of the corresponding equipment of the target application through the functional interface. That is to say, through callback of a target container bound to a target application, an information channel between a created container configuration database, a packaging database and a basic component database is determined according to a callback result, and then a corresponding function interface is called according to the information channel to monitor state data of equipment corresponding to the target application, so that the problems that the target application is poor in compatibility with a plurality of target containers, calling of the corresponding function interface cannot be determined according to the target container and the like in the prior art can be solved, reuse of function codes among different containers is improved, writing of repeated codes is reduced, and normalization and consistency of codes of the function interface corresponding to the target application are improved.
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 data monitoring method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data snooping method according to an embodiment of the present invention;
FIG. 3 is a timing diagram of callable in accordance with an alternative embodiment of the present invention;
FIG. 4 is a system framework diagram of a function call according to an embodiment of the invention;
fig. 5 is a block diagram of a data listening device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
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.
The method provided by the embodiment of the application can be executed in a computer terminal or a similar operation device of an equipment terminal. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of a data monitoring method according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions 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 and a module of application software, such as a computer program corresponding to the data monitoring method 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 this embodiment, a data snooping method is provided, and fig. 2 is a flowchart of the data snooping method according to the embodiment of the present invention, where the flowchart includes the following steps:
step S202, under the condition that the target application is started, a target container bound by the target application is called back to obtain a call-back result;
optionally, the callback in this embodiment means that, when the target application is enabled, in order to ensure accurate monitoring of subsequent device message data, a target container bound to the target application is determined, a container configuration service corresponding to the target container is further determined, a corresponding information channel is created in a corresponding container configuration base through the container configuration service, a message sending channel from a base component database to the container configuration database is set, an encapsulation database is initialized, then different message sending channels are encapsulated through the encapsulation database, a functional interface of a service corresponding to the encapsulated message sending channel is created, and a corresponding interface creator is added.
Wherein the container configuration database comprises: a container configuration service and a container configuration base, the packaging database comprising: an encapsulation layer base and an encapsulation layer service.
Step S204, determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database;
step S206, configuring the function type corresponding to each service function of the target application by using the information channel to determine a function interface corresponding to each service function;
and step S208, monitoring the state data of the equipment corresponding to the target application through the functional interface.
Through the steps, under the condition that the target application is started, the target container bound by the target application is called back to obtain a call-back result; determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database; configuring a function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function; and monitoring the state data of the corresponding equipment of the target application through the functional interface. That is to say, through callback of a target container bound to a target application, an information channel between a created container configuration database, a packaging database and a basic component database is determined according to a callback result, and then a corresponding function interface is called according to the information channel to monitor state data of equipment corresponding to the target application, so that the problems that the target application is poor in compatibility with a plurality of target containers, calling of the corresponding function interface cannot be determined according to the target container and the like in the prior art can be solved, reuse of function codes among different containers is improved, writing of repeated codes is reduced, and normalization and consistency of codes of the function interface corresponding to the target application are improved.
In an exemplary embodiment, before monitoring, through the functional interface, status data corresponding to a device corresponding to the target application, the method further includes: acquiring indication information determined by a target object on a target application, wherein the indication information is used for indicating target state data corresponding to equipment change information required to be acquired by the target object; and determining a target function interface to be monitored according to the indication information.
It can be understood that different types of state data in the device need to call different functional interfaces for monitoring, and therefore, a corresponding target functional interface needs to be determined according to the target object, so that the target functional interface to be called meets the test requirement of the target object and the writing requirement of the code.
In an exemplary embodiment, after determining the target function interface to be monitored according to the indication information, the method further includes: acquiring device parameters corresponding to the target function interface, wherein the device parameters include: the device identification to be monitored through the target function interface; and under the condition that the target function interface determines that the equipment parameters meet preset data monitoring conditions, feeding back a calling message to the basic component database and the packaging database through the information channel, wherein the calling message is used for indicating that calling interfaces are created in the basic component database and the packaging database according to indication information.
That is to say, when acquiring the state data of the device corresponding to the target application through the target function interface, in order to ensure the rapid acquisition of the state data in the device to be monitored and the accuracy of acquiring the state data in the device, the device identifier of the device to be monitored is sent to the target function interface while the target function interface is called, wherein the device identifier is used for uniquely indicating the device, and under the condition that the target function interface determines that the device identifier meets the calling condition, the calling message is sent to the container configuration database, and is fed back to the basic component database and the encapsulation database through the information channel.
In an exemplary embodiment, when the target function interface determines that the device parameter meets a preset data monitoring condition, feeding back a call message to the base component database and the encapsulation database through the information channel includes: acquiring a target calling interface for creating the indication information in the packaging database; and under the condition that the function for executing the call is issued to the basic component database through the target call interface, acquiring a response message fed back by the basic component database, wherein the response message is used for indicating the basic component database to execute the corresponding monitoring operation according to the indication information.
In an exemplary embodiment, after obtaining the response message fed back by the base component database, the method further includes: under the condition that the component in the basic component database monitors that the data of the equipment changes, receiving the changed data uploaded by the component through the information channel; and analyzing the change data to obtain target state data corresponding to the indication information.
In short, an interface creator created in advance by combining a container configuration database creates a corresponding interface, sets an interface call return function, sets a data change monitor, further performs data encapsulation through an encapsulation layer base in the encapsulation database, determines an execution specific interface of the encapsulated data change monitor according to encapsulation layer services, determines a corresponding specific call function in a base component database, synchronizes an execution result to the encapsulation database after the function in the base component database is executed, and uploads the execution result to a display interface of a target application step by step through an information channel so as to prove that state data of equipment to be monitored by a target object can be acquired.
In an exemplary embodiment, after configuring, by using the information channel, a function type corresponding to each service function of the target application to determine a function interface corresponding to each service function, the method further includes: determining an interface creator corresponding to the functional interface, wherein the interface creator is used for indicating an interface definition object for service type encapsulation in an encapsulation database; and binding the interface creator with the functional interface.
In an exemplary embodiment, after monitoring, through the functional interface, status data corresponding to a device corresponding to the target application, the method further includes: determining an update frequency of the state data, wherein the update frequency is used for indicating the feedback times of the state data in a target period; and prompting the target object to reinitiate the indication information under the condition that the updating frequency is lower than a preset threshold value.
In order to better understand the process of the data snooping method, the following describes the flow of the data snooping method with reference to an alternative embodiment.
In an optional embodiment of the present invention, a function call method for data monitoring is mainly provided, where when an App is started, a container frame has a function call back for starting loading, and an information channel is created at this time, so as to construct an information transfer pipeline from a base component layer (layer D) through an encapsulation layer (layer C) -a container configuration layer (layer B) -a function interface layer (layer a), so as to implement smooth transfer of subsequent call synchronization return messages and monitored data change messages. Meanwhile, initialization work is also carried out on each layer under function call of container loading start, and a creator of a functional interface exists in a packaging layer. The creator of the functional interface can create an interface caller when it is necessary to call the interface, thereby executing the interface by calling the function of the base component (D-layer).
After the initialization and preparation work is finished, when the user clicks the function on the service page, the function is started to be called. The data flow of the present invention is illustrated here by taking the interface of registering listening for device state changes as an example. And the user enters a detail setting page, monitoring the change of the equipment is required to be started, and if the data change occurs, displaying a corresponding view effect display on the page.
The registered monitoring equipment changes the interface and returns the interface execution condition immediately after calling, the return is synchronous return, and each calling is returned only once. After the listener is successfully registered, the listener is given a message of device change when the state mode of the device changes, the message report at this time is asynchronous data change, and the asynchronous message report is real-time and allows for multiple reports.
As an alternative implementation, as shown in fig. 3, the timing diagram of the function call of the alternative embodiment of the present invention includes the following steps:
step 1, under the condition of starting APP, calling a bound target container in a container configuration layer (B layer); an information channel is established in a container configuration base in a container configuration layer (layer B), and a message sending channel from a basic component layer (layer D) to the container configuration layer (layer B) is set;
step 2, initializing a packaging layer (layer C) under the condition of determining a message sending channel, packaging the message sending channel through a packaging layer base and packaging layer services in the initialized packaging layer (layer C), forming an API (Application Programming Interface), and adding a corresponding Interface creator.
Step 3, determining that the requirement of monitoring equipment change when the target object enters a detail page of an equipment card page corresponding to the target application;
step 4, calling and subscribing the equipment change interface, and sending parameter information when calling and subscribing the corresponding function interface, wherein the parameter information comprises: device ID (i.e., device identification);
step 5, under the condition that the parameters are verified through the functional interface, continuing to call the container configuration service in the container configuration layer (layer B), and transferring and calling the content in the container configuration base library through the parent class;
step 6, an interface is created through an interface creator, a return function called by the interface is set, and a data change monitor corresponding to equipment data is set;
step 7, the packaging layer (layer C) determines a corresponding specific execution interface, calls a specific function to execute, synchronously returns the interface monitoring state to the device card page, and informs the target object that the function interface has completed monitoring response;
and 8, reporting the monitored data change step by step under the condition that the data change of the equipment is monitored.
As an alternative implementation, fig. 4 is a system framework diagram of function invocation according to an embodiment of the present invention. As shown in fig. 4, the code is processed hierarchically, and the request is issued from the service page, and is called to the encapsulation layer (C layer) through the functional interface layer (a layer) and the container configuration layer (B layer), and finally the function code (D layer) of the basic component layer is called. And moreover, codes of the layer B and the layer C are extracted from the base library, so that the code repetition is reduced, and the maintenance cost is reduced. After extraction, the container configuration layer (layer B) has few codes to be written, and only needs to configure the message channel name of the issued command and the message channel name of the upward feedback monitoring information; the packaging layer (C layer) can also reduce repeated codes due to the existence of the basic library, provides an Action class for each business function, processes the join and returns the executed result.
For code quality, the container configuration layer (layer B) can ensure the quality in a manual inspection mode because the code only has name configuration of two message channels; the encapsulation layer (layer C) creates a channel from the encapsulation layer (layer C) to the functional interface layer, realizes the transmission of subsequent asynchronous messages by establishing a message channel, and further realizes the division of functional codes by layering services to achieve the purpose of supporting a plurality of containers.
In summary, the optional embodiment of the present invention, by encapsulating functions and extracting configured codes from the layer container configuration library, can well isolate containers and simultaneously ensure the reuse of function codes, thereby well solving the problem of multiple containers, i.e. the optional embodiment of the present invention, by performing uniform base library extraction on container configuration and interface packaging, ensures that different services adopt the desired specification technology, reduces the writing of repeated codes, performs specification and standard on function plug-ins, enhances team communication efficiency, facilitates the maintenance and development of the whole software, improves team production efficiency, and reduces the loss of teams due to inconsistent specifications and writing codes with similar functions.
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 (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., 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 data monitoring device is further provided, and the data monitoring device is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a data snooping apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes:
(1) the callback module 52 is configured to perform callback on the target container bound by the target application under the condition that the target application is enabled, so as to obtain a callback result;
(2) a determining module 54, configured to determine, according to the callback result, a container configuration database corresponding to the target container, and determine an information channel established between the container configuration database and a base component database through a package database;
(3) a configuration module 56, configured to configure, by using the information channel, a function type corresponding to each service function of the target application, so as to determine a function interface corresponding to each service function;
(4) and the monitoring module 58 is configured to monitor the status data of the device corresponding to the target application through the functional interface.
By the device, under the condition that the target application is started, the target container bound by the target application is called back to obtain a call-back result; determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database; configuring a function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function; and monitoring the state data of the corresponding equipment of the target application through the functional interface. That is to say, through callback of a target container bound to a target application, an information channel between a created container configuration database, a packaging database and a basic component database is determined according to a callback result, and then a corresponding function interface is called according to the information channel to monitor state data of equipment corresponding to the target application, so that the problems that the target application is poor in compatibility with a plurality of target containers, calling of the corresponding function interface cannot be determined according to the target container and the like in the prior art can be solved, reuse of function codes among different containers is improved, writing of repeated codes is reduced, and normalization and consistency of codes of the function interface corresponding to the target application are improved.
In an exemplary embodiment, the apparatus further includes: the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring indication information determined by a target object on a target application, and the indication information is used for indicating target state data corresponding to device change information required to be acquired by the target object; and determining a target function interface to be monitored according to the indication information.
It can be understood that different types of state data in the device need to call different functional interfaces for monitoring, and therefore, a corresponding target functional interface needs to be determined according to the target object, so that the target functional interface to be called meets the test requirement of the target object and the writing requirement of the code.
In an exemplary embodiment, the obtaining module is further configured to obtain an apparatus parameter corresponding to the target function interface, where the apparatus parameter includes: the device identification to be monitored through the target function interface; and under the condition that the target function interface determines that the equipment parameters meet preset data monitoring conditions, feeding back a calling message to the basic component database and the packaging database through the information channel, wherein the calling message is used for indicating that calling interfaces are created in the basic component database and the packaging database according to indication information.
That is to say, when acquiring the state data of the device corresponding to the target application through the target function interface, in order to ensure the rapid acquisition of the state data in the device to be monitored and the accuracy of acquiring the state data in the device, the device identifier of the device to be monitored is sent to the target function interface while the target function interface is called, wherein the device identifier is used for uniquely indicating the device, and under the condition that the target function interface determines that the device identifier meets the calling condition, the calling message is sent to the container configuration database, and is fed back to the basic component database and the encapsulation database through the information channel.
In an exemplary embodiment, the obtaining module is further configured to obtain a target call interface for creating the indication information in the package database; and under the condition that the function for executing the call is issued to the basic component database through the target call interface, acquiring a response message fed back by the basic component database, wherein the response message is used for indicating the basic component database to execute the corresponding monitoring operation according to the indication information.
In an exemplary embodiment, the obtaining module further includes: the receiving unit is used for receiving the change data uploaded by the component through the information channel under the condition that the component in the basic component database monitors that the data of the equipment is changed; and analyzing the change data to obtain target state data corresponding to the indication information.
In short, an interface creator created in advance by combining a container configuration database creates a corresponding interface, sets an interface call return function, sets a data change monitor, further performs data encapsulation through an encapsulation layer base in the encapsulation database, determines an execution specific interface of the encapsulated data change monitor according to encapsulation layer services, determines a corresponding specific call function in a base component database, synchronizes an execution result to the encapsulation database after the function in the base component database is executed, and uploads the execution result to a display interface of a target application step by step through an information channel so as to prove that state data of equipment to be monitored by a target object can be acquired.
In an exemplary embodiment, the apparatus further includes: the binding module is used for determining an interface creator corresponding to the functional interface, wherein the interface creator is used for indicating an interface definition object for business type encapsulation in an encapsulation database; and binding the interface creator with the functional interface.
In an exemplary embodiment, the apparatus further includes: the prompting module is used for determining the updating frequency of the state data, wherein the updating frequency is used for indicating the feedback times of the state data in a target period; and prompting the target object to reinitiate the indication information under the condition that the updating frequency is lower than a preset threshold value.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
In an exemplary embodiment, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the target application is started, the target container bound by the target application is called back to obtain a call-back result;
s2, determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database;
s3, configuring the function type corresponding to each service function of the target application by using the information channel to determine the function interface corresponding to each service function;
and S4, monitoring the state data of the device corresponding to the target application through the functional interface.
In an exemplary embodiment, in the present embodiment, the 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.
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.
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.
In an exemplary embodiment, in the present embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that the target application is started, the target container bound by the target application is called back to obtain a call-back result;
s2, determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database;
s3, configuring the function type corresponding to each service function of the target application by using the information channel to determine the function interface corresponding to each service function;
and S4, monitoring the state data of the device corresponding to the target application through the functional interface.
In an exemplary embodiment, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
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, which may be centralized on a single computing device or distributed across a network of computing devices, and in one exemplary embodiment may be implemented using program code executable by a computing device, such that the steps shown and described may be executed by a computing device stored in a memory device and, in some cases, executed in a sequence different from that shown and described herein, or separately fabricated into individual integrated circuit modules, or multiple ones of them 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 data snooping, comprising:
under the condition that the target application is started, a target container bound by the target application is called back to obtain a call-back result;
determining a container configuration database corresponding to the target container according to the callback result, and determining an information channel established by the container configuration database and a basic component database through a packaging database;
configuring a function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function;
and monitoring the state data of the equipment corresponding to the target application through the functional interface.
2. The data monitoring method according to claim 1, wherein before monitoring the status data corresponding to the device corresponding to the target application through the functional interface, the method further comprises:
acquiring indication information determined by a target object on a target application, wherein the indication information is used for indicating target state data corresponding to equipment change information required to be acquired by the target object;
and determining a target function interface to be monitored according to the indication information.
3. The data interception method according to claim 2, wherein after determining the target function interface to be intercepted according to the indication information, the method further comprises:
acquiring device parameters corresponding to the target function interface, wherein the device parameters include: the device identification to be monitored through the target function interface;
and under the condition that the target function interface determines that the equipment parameters meet preset data monitoring conditions, feeding back a calling message to the basic component database and the packaging database through the information channel, wherein the calling message is used for indicating that calling interfaces are created in the basic component database and the packaging database according to indication information.
4. The data interception method according to claim 3, wherein feeding back a call message to the basic component database and the encapsulation database through the information channel when the target function interface determines that the device parameter meets a preset data interception condition, comprises:
acquiring a target calling interface for creating the indication information in the packaging database;
and under the condition that the function for executing the call is issued to the basic component database through the target call interface, acquiring a response message fed back by the basic component database, wherein the response message is used for indicating the basic component database to execute the corresponding monitoring operation according to the indication information.
5. The data listening method of claim 4, wherein after obtaining the response message fed back by the base component database, the method further comprises:
under the condition that the component in the basic component database monitors that the data of the equipment changes, receiving the changed data uploaded by the component through the information channel;
and analyzing the change data to obtain target state data corresponding to the indication information.
6. The data listening method according to claim 1, wherein after the information channel is used to configure the function type corresponding to each service function of the target application so as to determine the function interface corresponding to each service function, the method further comprises:
determining an interface creator corresponding to the functional interface, wherein the interface creator is used for indicating an interface definition object for service type encapsulation in an encapsulation database;
and binding the interface creator with the functional interface.
7. The data monitoring method according to claim 1, wherein after monitoring the status data of the device corresponding to the target application through the functional interface, the method further comprises:
determining an update frequency of the state data, wherein the update frequency is used for indicating the feedback times of the state data in a target period;
and prompting the target object to reinitiate the indication information under the condition that the updating frequency is lower than a preset threshold value.
8. A data listening device, comprising:
the callback module is used for carrying out callback on the target container bound by the target application under the condition that the target application is started to obtain a callback result;
the determining module is used for determining a container configuration database corresponding to the target container according to the callback result and determining an information channel established by the container configuration database and a basic component database through a packaging database;
the configuration module is used for configuring the function type corresponding to each service function of the target application by using the information channel so as to determine a function interface corresponding to each service function;
and the monitoring module is used for monitoring the state data of the equipment corresponding to the target application through the functional interface.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202111137442.7A 2021-09-27 2021-09-27 Data monitoring method and device, storage medium and electronic device Pending CN113934591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111137442.7A CN113934591A (en) 2021-09-27 2021-09-27 Data monitoring method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111137442.7A CN113934591A (en) 2021-09-27 2021-09-27 Data monitoring method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN113934591A true CN113934591A (en) 2022-01-14

Family

ID=79277088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111137442.7A Pending CN113934591A (en) 2021-09-27 2021-09-27 Data monitoring method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113934591A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080679A (en) * 2022-07-19 2022-09-20 苏州万店掌网络科技有限公司 Map component packaging method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115080679A (en) * 2022-07-19 2022-09-20 苏州万店掌网络科技有限公司 Map component packaging method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN108062367B (en) Data list uploading method and terminal thereof
CN102780613B (en) A kind of method and apparatus of distributed apparatus communication between plates
CN111338814A (en) Message processing method and device, storage medium and electronic device
CN104852971B (en) Plug-in protocol device and data communication method based on plug-in protocol
CN111885115A (en) Equipment binding change method and device
CN112995269B (en) Data processing method, computer device and readable storage medium
CN104811979A (en) Pressure testing method and device based on FOTA upgrading
CN115114044A (en) Message pushing method, device, equipment and medium
CN113934591A (en) Data monitoring method and device, storage medium and electronic device
CN106936660B (en) Data acquisition method and device
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN112416617A (en) Control method and device of Bluetooth equipment, storage medium and electronic device
CN112073488A (en) Method and device for processing request
CN112650815B (en) Method and device for synchronizing environment data, storage medium and electronic device
CN113190565B (en) Data updating method and device, storage medium and electronic device
CN114285739A (en) Node information batch configuration method, device, terminal and storage medium
CN111026739B (en) Batch data cleaning method and device, computer equipment and storage medium
CN114090074A (en) Method and device for configuring operating environment, storage medium and electronic device
CN115543491A (en) Microservice processing method and device
CN112698948A (en) Method and device for acquiring product resources, storage medium and electronic device
CN107784006B (en) Data processing method and device
CN112671915A (en) Message pushing processing method and intelligent device
CN109741805A (en) PDF reports method and device, storage medium and the electronic device automatically generated
CN110737598A (en) Method and device for testing page content based on page component characteristics
CN112732410B (en) Service node management method and device, 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