CN116112531A - Data collection method, device, equipment and medium - Google Patents
Data collection method, device, equipment and medium Download PDFInfo
- Publication number
- CN116112531A CN116112531A CN202211666256.7A CN202211666256A CN116112531A CN 116112531 A CN116112531 A CN 116112531A CN 202211666256 A CN202211666256 A CN 202211666256A CN 116112531 A CN116112531 A CN 116112531A
- Authority
- CN
- China
- Prior art keywords
- equipment
- target
- cloud
- data
- task
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present disclosure relates to the field of data interfacing technologies, and in particular, to a data gathering method, apparatus, device, and medium. The method comprises the steps of obtaining target equipment and callback addresses by extracting a data collection task based on equipment cloud when a user triggers the data collection task, detecting whether the target equipment belongs to the current equipment cloud management range, connecting the target equipment if the target equipment is detected to belong to the current equipment cloud management range, obtaining target data collected by the target equipment, and sending the target data to the callback addresses. When the data collection task is obtained, judging whether the target equipment belongs to the current level, if so, connecting the target equipment, and feeding back the collected target data directly through a callback address without transmitting according to the original level limit, thereby effectively shortening the collection link, reducing the resource occupation, and if the target data has a problem, directly checking the target equipment and the equipment cloud to which the target equipment belongs, and improving the error checking efficiency.
Description
Technical Field
The present disclosure relates to the field of data interfacing technologies, and in particular, to a data gathering method, apparatus, device, and medium.
Background
At present, a lightweight cascading system is composed of devices of different levels or grades, wherein certain connection requirements exist between devices of the upper and lower continuous grades according to the requirement that the devices of the same grade are not connected, and one grade of device can be connected with a plurality of next grades of devices at the same time. In order to transfer data such as images and video streams between stages, in the lightweight cascade system, it is necessary to transfer data from one stage to one stage. For example, the device of the highest level needs to call the data collected by the device of the lowest level, the process is that the device of the lowest level feeds back the data to the device of the higher level, the device of the higher level feeds back the data to the device of the higher level, and so on, and finally the device of the highest level is reached. Therefore, if the pictures and the video streams are required to be collected, data of cross-level devices can be collected, and the data collection needs to pass through all intermediate levels, so that the link is long, the waste of resources such as bandwidth, CPU and the like is caused, and if problems occur in the collection process, the investigation process is difficult.
Therefore, how to optimize the transmission mode of data at the time of aggregation in a lightweight cascade system to shorten the aggregation link and save the resource consumption is a problem to be solved.
Disclosure of Invention
In view of this, the embodiments of the present application provide a data aggregation method, apparatus, device, and medium, so as to solve the problem of how to optimize a transmission manner of data during aggregation in a lightweight cascading system, so as to shorten an aggregation link and save resource consumption.
In a first aspect, an embodiment of the present application provides a data aggregation method, where the data aggregation method includes:
obtaining target equipment and callback addresses, wherein the target equipment and the callback addresses are obtained by extracting a data collection task based on equipment cloud when a user triggers the data collection task;
detecting whether the target equipment belongs to the management range of the current equipment cloud, and if the target equipment is detected to belong to the management range of the current equipment cloud, connecting the target equipment;
and acquiring target data acquired by the target equipment, and sending the target data to the callback address.
In a second aspect, an embodiment of the present application provides a data aggregating apparatus, including:
the task acquisition module is used for acquiring target equipment and callback addresses, wherein the target equipment and the callback addresses are obtained by extracting a data collection task based on equipment cloud when a user triggers the data collection task;
The task detection module is used for detecting whether the target equipment belongs to the management range of the current equipment cloud, and if the target equipment is detected to belong to the management range of the current equipment cloud, the task detection module is connected with the target equipment;
and the task feedback module is used for acquiring target data acquired by the target equipment and sending the target data to the callback address.
In a third aspect, embodiments of the present application provide a computer device, the computer device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor implementing the data aggregation method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the data aggregation method according to the first aspect.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
and acquiring a device cloud extraction data collection task based on the triggering of a data collection task by a user to obtain target devices and callback addresses, detecting whether the target devices belong to the management range of the current device cloud, if the target devices are detected to belong to the management range of the current device cloud, connecting the target devices, acquiring target data acquired by the target devices, and transmitting the target data to the callback addresses. When the data collection task is obtained, judging whether the target equipment belongs to the current level, if so, connecting the target equipment, and feeding back the collected target data directly through a callback address without transmitting according to the original level limit, thereby effectively shortening the collection link, reducing the resource occupation, and if the target data has a problem, directly checking the target equipment and the equipment cloud to which the target equipment belongs, and improving the error checking efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of an equipment cloud to which a data aggregation method according to an embodiment of the present application is applied;
fig. 2 is a flow chart of a data aggregation method according to an embodiment of the present application;
fig. 3 is a flowchart of determining a device cloud of a next stage in a data aggregation method according to a second embodiment of the present application;
fig. 4 is a schematic flow chart of a data aggregation method according to the third embodiment of the present application when the data aggregation method is applied to image data;
fig. 5 is a transmission schematic diagram of a data aggregation method applied to a lightweight cascade system for transmitting image data according to a third embodiment of the present application;
fig. 6 is a flow chart of a data aggregation method according to a fourth embodiment of the present application when applied to video data;
Fig. 7 is a transmission schematic diagram of video data transmission in a lightweight cascade system according to a data aggregation method provided in a fourth embodiment of the present application;
fig. 8 is a schematic structural diagram of a data collecting device according to a fifth embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to a sixth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
It should be understood that the sequence numbers of the steps in the following embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and the internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In order to illustrate the technical solution of the present application, the following description is made by specific examples.
The data collection method provided in the first embodiment of the present application may be applied to a corresponding lightweight cascade system, where the lightweight cascade system is composed of a plurality of devices with different levels, and the meaning of the level is that the previous-level device includes at least one next-level device. In the application, the device is provided with a networked application service taking machine terminal interaction as a core, namely a device cloud (device cloud, DC), wherein the device cloud takes an acquisition monitoring terminal, wireless communication and the like as an access means, and provides comprehensive informatization transmission for a user so as to meet informatization requirements of the user on aspects of monitoring, intelligent scheduling, data acquisition, measurement and the like.
Devices in the lightweight cascading system need to be connected through a network to meet the operation requirement of a device cloud, and devices supported by the device cloud include, but are not limited to, palm computers, desktop computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computer, UMPC), netbooks, cloud terminal devices, personal digital assistants (personal digital assistant, PDA) and other computer devices, and the computer devices can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), big data and artificial intelligent platforms and the like for users.
Referring to fig. 1, a schematic structural diagram of an equipment cloud applied to a data collection method according to an embodiment of the present application, where, as shown in fig. 1, an equipment cloud product mainly includes the following modules:
picture access service component (IS): for accessing a stream of pictures, such as snap shot photo data;
video access service component (MS): the video access service component is internally provided with other modules or units for realizing the function of forwarding the video stream, for example, the video stream is pushed to an internal real-time streaming protocol (Real Time Streaming Protocol, RTSP) Server, a real-time message transmission protocol (Real Time Messaging Protocol, RTMP) Server, a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) -FLV (Flash Video) Server, an HTTP-based adaptive code rate streaming media transmission protocol (HTTP Live Streaming, HLS) Server and other service modules at the same time, and the service modules are used for constructing the play address of the video stream, so that a user can acquire the video stream through the play address;
center Service (CS): the device IS used for performing equipment management, namely, scheduling tasks for taking picture streams to IS, scheduling tasks for taking video streams to MS, and upper and lower cascade information relation and cascade task scheduling;
Database service component (Data Base): for persistent storage devices, as well as device tasks, such as picture streaming tasks and video streaming tasks.
Of course, the device cloud can increase modules according to different task demands so as to achieve corresponding functions, and the device cloud only shows corresponding service modules used in a data scene such as a lightweight cascade system call picture and video, and is not limited to use in other data scenes.
For example, for a lightweight cascade system, due to cascade relationship of device clouds, devices supported by the device clouds may form a system with grading, for example, grading is performed according to a management functional department, the system includes a first-level unit device, a second-level unit device, a third-level unit device, and a fourth-level unit device, the corresponding device clouds of the first-level unit device may be set as a first-level device cloud, the device clouds of the second-level unit device may be a second-level device cloud, the device clouds of the third-level unit device may be a third-level device cloud, the device clouds of the fourth-level unit device may be a fourth-level device cloud, where the first-level device cloud is connected to at least one second-level device cloud, that is, the first-level unit device may manage at least one third-level unit device, the third-level device cloud may be connected to at least one fourth-level device cloud, the devices of each level may also be connected to a corresponding execution device, and the user may control the corresponding execution device to perform data acquisition through any one of the device clouds.
For example, the executing device may be a camera or the like for capturing pictures, videos, or the like, and after the executing device acquires the picture data, the executing device feeds back the picture data to the cloud of the executing device, and then the cloud of the executing device feeds back the picture data to the user who issues the task.
Referring to fig. 2, a flow chart of a data collection method provided in an embodiment of the present application is shown, where the data collection method may be applied to any one of the device clouds in the lightweight cascade system, and the device cloud may be the structure shown in fig. 1. For the picture and video data, a user sends a picture stream task or a video stream task to the equipment cloud, the corresponding equipment cloud analyzes the corresponding task, finds the execution equipment corresponding to the task, controls the execution equipment to acquire data, receives and forwards the data acquired by the execution equipment to the user, and then completes data collection.
As shown in fig. 2, the data aggregation method may include the steps of:
step S201, a target device and a callback address are acquired.
In the application, the target device and the callback address are obtained by extracting the data collection task based on the device cloud when the user triggers the data collection task. The user issues a data collection task to a device cloud, and the device cloud can extract a target device which the user wants to acquire data and a callback address provided by the user from the data collection task.
The target device is the above-mentioned executing device, i.e. a device for performing data collection in a data collection task, for example, a device for collecting images (including video cameras, still cameras, etc.), a device for collecting sound (including audio recorders, radio, etc.), and so on. The target device can be connected to a corresponding device cloud, in particular to the device in which the device cloud is located, by means of a wireless network or a hard-wired network.
The callback address may be a destination address for data transmission, and the callback address is provided by the user, may be an address of a client used by the user, or may be other addresses. The callback address is an address code constructed based on a plurality of preset network protocols, communication protocols and other agreed address formats, and the direct transmission of data can be realized by accessing the address code without indirectly transmitting the callback address through other network equipment, so that the link length is reduced, and the safety of data transmission is improved.
At this time, the user may issue a data collection task to the device cloud based on a client, and accordingly, the address of the client is a callback address, and of course, the user may specify a callback address and send the specified callback address to the device cloud when sending the data collection task.
The data collection method can be used for equipment cloud of any level in a lightweight cascade system, if a user sends a data collection task to equipment cloud of a certain level, the equipment cloud directly extracts the data collection task to obtain target equipment and a callback address, then the equipment cloud can also send the target equipment, the callback address and the like to equipment cloud of the next level, and the equipment cloud of the next level can directly obtain the target equipment and the callback address. Therefore, whether the device cloud directly issues the data collection task or not by the user, the target device and the callback address can be acquired.
Step S202, detecting whether the target equipment belongs to the management range of the current equipment cloud, and if the target equipment is detected to belong to the management range of the current equipment cloud, connecting the target equipment.
In the application, the management scope may refer to a scope of subordinate device clouds and execution devices that can be managed by the device cloud, that is, a next-level device cloud of the current-level device cloud and an execution device of the device cloud subordinate to the current-level device cloud, where the management scope may be implemented by a central management service component in the device cloud architecture, and specifically, the central management service component stores a corresponding management scope, so that the current device cloud can know the next-level device cloud and the execution device.
And searching and inquiring from a management list formed by all devices in the management range by using the name, the identity identification number (Identity Document, ID), the MAC code and the like of the target device so as to determine whether the target device is in the management range, wherein the corresponding target is in the management range after searching and inquiring, and the corresponding target is not in the management range after searching and inquiring.
If the corresponding target is searched and queried, the target device is determined to belong to the current device cloud management method, because the device on which the current device cloud depends can be connected with the target device, and in particular, the target device can be connected through a corresponding access protocol, a communication protocol and the like.
In addition, after the target equipment is connected, whether the connection is successful or not is verified, the verification mode can be that the current equipment cloud sends a verification request to the target equipment, a response result fed back by the target equipment corresponding to the verification request is obtained, if the response result meets a preset requirement, the connection success can be determined, if the response result is not obtained within a certain time, the link is determined to be unsuccessful, and then an unsuccessful message can be fed back to a user, so that the notification function is realized.
In one embodiment, each device cloud uses a central management service model to perform statistics of a management scope once each time a user issues a data collection task, that is, to count the device cloud and the execution device on line under the device cloud.
Because all equipment clouds and execution equipment are not required to be all-on-line, and corresponding tasks cannot be processed by the equipment clouds which are not on-line, real-time statistics of the equipment clouds on-line and the execution equipment on-line is required, and incapability of executing the tasks after the tasks are issued is avoided.
Specifically, when a data collection task issued by a user is acquired, a corresponding device cloud extracts corresponding target devices and callback addresses from the data collection task, then a central management service component of the device cloud determines whether the corresponding devices are online by sending a request to the devices in a subordinate list stored by the central management service component, classifies the online devices as management ranges, judges whether the target devices belong to the management ranges of the device cloud, if the target devices do not belong to the management ranges, further processing is needed, and if the target devices belong to the management ranges, the target devices are connected.
In the application, for the case that the target device does not belong to the management range, because of the cascade connection, the user wants to acquire the data of the target device, and generally performs task issuing on the device cloud to which the target device belongs or the device cloud higher than the device cloud, so that the target device may belong to the next-level device cloud of the current device cloud and even the device cloud lower than the current device cloud. See the examples below for specific procedures.
Step S203, target data acquired by the target equipment are acquired, and the target data are sent to the callback address.
In the application, the target device is used for collecting corresponding data, the type of the specific collected data is related to the type and configuration of the target device, and after the target device collects the target data, the target device is connected with the device cloud to which the target device belongs, so that the device cloud sent by the target device can be used for storing the target data through the database service component in the device cloud.
Because the target device generally does not have cross-device transmission capability, only target data can be transmitted to the affiliated device cloud, the target data is sent to the callback address by the affiliated device cloud, and the target data can be collected by a user.
According to the method and the device, a device cloud extraction data collection task based on the triggering of a data collection task by a user is obtained to obtain target devices and callback addresses, whether the target devices belong to the current device cloud management range is detected, if the target devices belong to the current device cloud management range is detected, the target devices are connected, target data collected by the target devices are obtained, and the target data are sent to the callback addresses. When the data collection task is obtained, judging whether the target equipment belongs to the current level, if so, connecting the target equipment, and feeding back the collected target data directly through a callback address without transmitting according to the original level limit, thereby effectively shortening the collection link, reducing the resource occupation, and if the target data has a problem, directly checking the target equipment and the equipment cloud to which the target equipment belongs, and improving the error checking efficiency.
The second embodiment of the present application provides a data aggregation method, which includes the following steps:
step S301, a target device and a callback address are acquired.
In step S302, it is detected whether the target device belongs to the management range of the current device cloud.
The content of step S301 to step S32 is the same as that of step S201 to step S202, and the description of step S201 to step S202 may be referred to herein, and will not be repeated.
Step S303, if the target device is detected not to belong to the management range of the current device cloud, acquiring the next-stage device cloud in the management range of the current device cloud, and sending the target device and the callback address to the next-stage device cloud.
In the application, when it is detected that the target device does not belong to the management range of the current device cloud, the next-stage device cloud in the management range of the current device cloud needs to be acquired, and whether the target device belongs to the next-stage device cloud is detected. In the above embodiments, the process of acquiring the management range in real time is focused on.
Optionally, acquiring a next-level device cloud in a management range of a current device cloud, and sending the target device and the callback address to the next-level device cloud, including:
Acquiring a lower-level equipment list, and determining all equipment clouds of the next level according to the lower-level equipment list;
and sending the target device and the callback address to all device clouds of the next stage.
The method comprises the steps that a lower-level device list is stored in each device cloud and is used for recording information of a next-level device cloud, execution devices and the like contained in the current device cloud, and the stored information can be stored by a database service component in the device cloud.
The device cloud of the next stage can be obtained by obtaining the device list of the next stage, and then the target device and the callback address can be sent to the device cloud of the next stage, and the device cloud of the next stage repeatedly executes the steps S201 to S203 in the above embodiment, so that the data collection task can be realized.
Because the target device does not belong to the subordinate of the current device cloud, the statistical content of the executing device is filtered when the subordinate device list is processed, and only the next-level device cloud is acquired.
Optionally, determining all device clouds of the next level according to the device list of the next level includes:
transmitting a response request to the equipment addresses of all the equipment clouds in the lower-level equipment list, wherein the equipment clouds corresponding to the equipment addresses return a response result after receiving the response request;
Receiving all response results, and detecting whether all response results are successful;
and determining the device cloud corresponding to the response result detected to be successful as the device cloud of the next stage.
As shown in fig. 3, a flowchart of determining a device cloud of a next stage in the data aggregation method according to the second embodiment of the present application is shown, where a list of the next stage devices is represented in a paging manner, so that it is required to determine whether the list is the last page of the list.
Only the specified equipment cloud of the next stage can be known through the lower-stage equipment list, and the success of executing the task can be improved through a mode of acquiring the equipment cloud of the next stage in real time because the equipment cloud is not all-antenna-connected.
The device addresses (colloquially understood as contact modes) of all the specified next-level device clouds can be obtained from the next-level device list, and the device addresses are used for accessing the current device clouds to determine whether the corresponding next-level device clouds are online or not.
Specifically, a response request is sent to the device address of each device cloud, and in general, after receiving the response request, the device cloud of the next stage will give a successful response result, but if the device cloud is disconnected, a successful response result cannot be given, so that it can be determined that the device cloud which does not give a successful response result is temporarily not the device cloud of the next stage. The process can reduce the task delivery to the offline equipment cloud, reduce the data transmission quantity and is beneficial to improving the efficiency.
Optionally, determining that the device cloud corresponding to the detected successful response result is the device cloud of the next stage includes:
determining the equipment cloud corresponding to the response result which is detected to be successful, and acquiring the equipment information of the corresponding equipment cloud;
associating the equipment information with the corresponding equipment cloud to obtain a next-level equipment cloud;
sending the target device and the callback address to all next-level device clouds comprises:
and sending the target device and the callback address to the corresponding device cloud according to the device information in all the next-level device clouds.
After determining the next-level device cloud, the current device cloud needs to send the target device and the callback address to the next-level device cloud.
Because the equipment cloud may change in the use process, after the equipment cloud of the next stage responds to the current equipment cloud, the current equipment cloud can analyze the equipment information of the equipment cloud of the next stage according to the response result, so that the target equipment and the callback address can be accurately sent to the corresponding equipment cloud of the next stage according to the equipment information.
Step S304, the next-level device cloud is used as the current device cloud, and the step of detecting whether the target device belongs to the management range of the current device cloud is repeatedly executed until the device cloud to which the target device belongs is detected.
In this application, if the target device still cannot be determined in step S303, the management range of the device cloud of the next level needs to be detected, and so on until the device cloud to which the target device belongs is detected.
Of course, there is a cloud of devices to which the target device cannot be found, which may indicate that the target device is wrong or the target device is offline, and at this time, feedback may be performed according to the callback address, and the feedback content may be "cannot find the target device", so that the user may intuitively observe the result.
Step S305, determining the device cloud to which the target device belongs as the target device cloud.
In step S306, the target device cloud connects to the target device to obtain the target data collected by the target device, and sends the target data to the callback address.
The step S305 may determine the target device cloud, and the step S202 and the step S203 in the foregoing embodiment may be executed for the target device cloud, so as to implement the content of the step S306 in the present embodiment, and the description of the step S202 and the step S203 may be referred to specifically, which is not described herein.
According to the method and the device for collecting the data, the device cloud extraction data collection task when the user triggers the data collection task is obtained to obtain the target device and the callback address, whether the target device belongs to the current device cloud management range is detected, if the fact that the target device does not belong to the current device cloud management range is detected, the next-stage device cloud in the current device cloud management range is obtained, the target device and the callback address are sent to the next-stage device cloud, the next-stage device cloud is used as the current device cloud, the step of detecting whether the target device belongs to the current device cloud management range is repeatedly executed until the device cloud to which the target device belongs is detected, the fact that the device cloud to which the target device belongs is the target device cloud is determined, the target device cloud is used for being connected with the target device, the target data collected by the target device are obtained, and the target data are sent to the callback address. According to the lightweight cascading system, information can be transmitted between equipment clouds of each stage, equipment clouds of final target equipment are used for connecting target equipment, collected target data are fed back directly through callback addresses, in the process, although the transmission target equipment and the callback addresses are transmitted through the stage one-stage transmission, transmission is not required according to original stage limitation when the data are returned, a gathering link is effectively shortened, resource occupation is reduced, and if the target data are in a problem, the target equipment and the equipment clouds of the target equipment can be directly checked, and error checking efficiency is improved.
On the basis of the above embodiments, the present application is provided with the following embodiments for the device cloud in fig. 1.
Optionally, the connection target device includes:
detecting a task format of a data collection task;
if the task format is a picture streaming task, calling a picture access service component of the current equipment cloud to connect with target equipment;
and if the task format is the video streaming task, calling a video access service component of the current equipment cloud to connect with the target equipment.
For the device cloud shown in fig. 1, according to different tasks, the picture access service component or the video access service component is connected with a corresponding target device.
As shown in fig. 4, a flow chart of a data collection method provided in the third embodiment of the present application when the data collection method is applied to picture data is shown, after a picture stream task scheduling flow, that is, a current level device cloud, receives a task, it is determined whether a target device (that is, an IPC device) corresponding to the picture stream task belongs to the current level device, if yes, the device is connected, and returns; otherwise, forwarding the picture flow task to the lower device cloud of the IPC device belonging to the picture flow task until the IPC device cloud belonging to the picture flow task.
Fig. 5 is a transmission schematic diagram of a data aggregation method applied to a lightweight cascade system for transmitting image data according to a third embodiment of the present application. The method comprises the steps of setting a certain device to belong to a device cloud of a four-level unit, wherein the upper level of a DC-four-level unit is a DC-three-level unit, the upper level of the DC-three-level unit is a DC-two-level unit, and the upper level of the DC-two-level unit is a DC-one-level unit.
The user triggers the picture flow task (carrying the data callback address), and the picture flow task is forwarded from the primary unit equipment cloud layer by layer to the quaternary unit equipment cloud belonging to the equipment corresponding to the picture flow task. And the picture access service component of the equipment cloud of the four-level unit is connected with the IPC equipment to acquire the snap shot picture, and then the picture data is reported through the callback address. And in the data callback process, the device cloud of the three-level unit and the two-level unit is spanned, the intermediate link is greatly shortened, and the bandwidth, the CPU and other resources are saved.
Optionally, if the data collection task is a video stream task, acquiring target data collected by the target device, and sending the target data to a callback address, including:
acquiring target data acquired by target equipment, and constructing a streaming address corresponding to the target data in the current equipment cloud;
And sending the streaming address to the callback address, wherein the streaming address is used for being triggered by a user to pull target data for playing.
The data volume of the video stream in the video stream task is very large, so that the broadband occupation can be greatly increased by adopting a mode of directly returning the video stream, and the efficiency is low.
Thus, based on the support of the device cloud, the device cloud may store the acquired video stream data in its database service component, and generate a streaming address, where the streaming address may be used to be triggered to acquire the corresponding video stream.
In the application, the streaming address is built based on a corresponding service module in a video access service assembly in the equipment cloud, different service modules correspond to different service protocols, and after the streaming address is generated based on a certain service module, the streaming address is fed back to a user, and the user can perform streaming playing through a player matched with the service protocol of the service module. Of course, the streaming address can be generated by using a plurality of service modules, that is, can be adapted to players with various protocols for streaming playing.
By the mode of directly sending the stream taking address to the callback address, the video stream task issued by the user can be fed back relatively quickly, and meanwhile, the user is facilitated to watch the collected video stream data.
As shown in fig. 6, a flow chart of a data collection method provided in the fourth embodiment of the present application when applied to video data is shown in fig. 6, where a video stream task scheduling flow is as follows, after receiving a video stream task, a current level device cloud determines whether an IPC device corresponding to the video stream task belongs to the current level device, if yes, the connection device fetches a stream, and returns a fetch address; otherwise, forwarding the task to the lower-level device cloud of the IPC device belonging to the video streaming task until the device cloud belonging to the video streaming task. Wherein the streaming address is characterized as URL (RTSP/RTMP/HTTP-FLV/HLS).
As shown in fig. 7, a transmission schematic diagram of video data transmission in a lightweight cascade system is provided for a data aggregation method according to a fourth embodiment of the present application, where a device cloud of a device belonging to a four-level unit is set, an upper level of a DC-four-level unit is a DC-three-level unit, an upper level of the DC-three-level unit is a DC-two-level unit, and an upper level of the DC-two-level unit is a DC-one-level unit.
The user triggers a video stream task, the video stream task is forwarded to a four-level unit device cloud belonging to a device corresponding to the video stream task layer by layer from a device cloud of a level one unit, then a video access service component of the level four unit is connected with an IPC device, pulls up the video stream and simultaneously pushes up modules such as an internal RTSP Server, an RTMP Server, an HTTP-FLV Server, an HLS Server and the like, and then a stream capturing address (namely RTSP/RTMP/HTTP-FLV/HLS) of the played video is returned.
After the user obtains the URL for playing the video, the corresponding player is used for selecting the corresponding protocol URL, and the video stream is pulled to be played directly to the video access service component of the four-level unit. The stream transmission process spans the equipment cloud of the three-level unit and the two-level unit, so that an intermediate link is greatly shortened, and the bandwidths of the three-level unit and the two-level unit, CPU and other resources are saved.
Fig. 8 shows a block diagram of a data collection device according to a fifth embodiment of the present application, where the data collection device is applied to any one of the device clouds in the lightweight cascade system, and the device cloud may be the structure shown in fig. 1. For the picture and video data, a user sends a picture stream task or a video stream task to the equipment cloud, the corresponding equipment cloud analyzes the corresponding task, finds the execution equipment corresponding to the task, controls the execution equipment to acquire data, receives and forwards the data acquired by the execution equipment to the user, and then completes data collection. For convenience of explanation, only portions relevant to the embodiments of the present application are shown.
Referring to fig. 8, the data collection device includes:
the task obtaining module 81 is configured to obtain a target device and a callback address, where the target device and the callback address are obtained by extracting a data collection task based on a device cloud when a user triggers the data collection task;
The task detection module 82 is configured to detect whether the target device belongs to a current management scope of a device cloud, and if it is detected that the target device belongs to the current management scope of the device cloud, connect the target device;
and the task feedback module 83 is configured to acquire target data acquired by the target device, and send the target data to the callback address.
Optionally, the data collecting device further includes:
the subordinate device cloud acquisition module is used for acquiring a next-stage device cloud in the current device cloud management range after detecting whether the target device belongs to the current device cloud management range, and transmitting the target device and the callback address to the next-stage device cloud if the target device is detected not to belong to the current device cloud management range;
the target equipment cloud determining module is used for taking the next-stage equipment cloud as the current equipment cloud, repeatedly executing the step of detecting whether the target equipment belongs to the management range of the current equipment cloud or not until the equipment cloud to which the target equipment belongs is detected, determining the equipment cloud to which the target equipment belongs as the target equipment cloud, connecting the target equipment cloud to obtain target data acquired by the target equipment, and sending the target data to the callback address.
Optionally, the subordinate device cloud acquisition module includes:
a list acquisition unit, configured to acquire a lower-level device list, and determine all device clouds of a next level according to the lower-level device list;
and the task issuing unit is used for sending the target device and the callback address to all device clouds of the next stage.
Optionally, the list acquisition unit includes:
a response request sending subunit, configured to send a response request to device addresses of all device clouds in the lower device list, where a device cloud corresponding to the device address returns a response result after receiving the response request;
the response result detection subunit is used for receiving all response results and detecting whether all response results are successful or not;
and the next-stage equipment cloud determining subunit is used for determining the equipment cloud corresponding to the detected successful response result as the next-stage equipment cloud.
Optionally, the next-stage device cloud determining subunit includes:
the equipment information acquisition subunit is used for determining equipment cloud corresponding to the response result which is detected to be successful and acquiring equipment information of the corresponding equipment cloud;
the association subunit is used for associating the equipment information with the corresponding equipment cloud to obtain a next-level equipment cloud;
The task issuing unit comprises:
and the task issuing subunit is used for sending the target equipment and the callback address to the corresponding equipment cloud according to the equipment information in all the next-level equipment clouds.
Optionally, the task detection module 82 includes:
the format detection unit is used for detecting the task format of the data collection task;
the first calling unit is used for calling the picture access service component of the current equipment cloud to connect with the target equipment if the task format is a picture stream task;
and the second calling unit is used for calling the video access service component of the current equipment cloud to connect the target equipment if the task format is a video stream task.
Optionally, if the data aggregation task is a video streaming task, the task feedback module 83 includes:
the stream taking address construction unit is used for acquiring target data acquired by the target equipment and constructing a stream taking address corresponding to the target data in the current equipment cloud;
and the task feedback unit is used for sending the streaming address to the callback address, wherein the streaming address is used for being triggered by the user to pull the target data for playing.
It should be noted that, because the content of information interaction, execution process and the like between the modules, units and sub-units is based on the same conception as the embodiment of the method of the present application, specific functions and technical effects thereof may be found in the embodiment of the method, and will not be described herein again.
Fig. 9 is a schematic structural diagram of a computer device according to a sixth embodiment of the present application. As shown in fig. 9, the computer device of this embodiment includes: at least one processor (only one shown in fig. 9), a memory, and a computer program stored in the memory and executable on the at least one processor, the processor executing the computer program to perform the steps of any of the various data collection method embodiments described above.
The computer device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that fig. 9 is merely an example of a computer device and is not intended to limit the computer device, and that a computer device may include more or fewer components than shown, or may combine certain components, or different components, such as may also include a network interface, a display screen, an input device, and the like.
The processor may be a CPU, but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory includes a readable storage medium, an internal memory, etc., where the internal memory may be the memory of the computer device, the internal memory providing an environment for the execution of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may be an external storage device of the computer device, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. that are provided on the computer device. Further, the memory may also include both internal storage units and external storage devices of the computer device. The memory is used to store an operating system, application programs, boot loader (BootLoader), data, and other programs such as program codes of computer programs, and the like. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above-described embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of the method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The present application implementing all or part of the flow of the method of the above embodiment may also be implemented by a computer program product, which when run on a computer device causes the computer device to execute the steps of the method embodiment described above.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in this application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other ways. For example, the apparatus/computer device embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (10)
1. A data collection method, the data collection method comprising:
obtaining target equipment and callback addresses, wherein the target equipment and the callback addresses are obtained by extracting a data collection task based on equipment cloud when a user triggers the data collection task;
Detecting whether the target equipment belongs to the management range of the current equipment cloud, and if the target equipment is detected to belong to the management range of the current equipment cloud, connecting the target equipment;
and acquiring target data acquired by the target equipment, and sending the target data to the callback address.
2. The data collection method according to claim 1, further comprising, after detecting whether the target device belongs to a management range of a current device cloud:
if the target device is detected not to belong to the management range of the current device cloud, acquiring the device cloud of the next stage in the management range of the current device cloud, and sending the target device and the callback address to the device cloud of the next stage;
and taking the next-stage equipment cloud as the current equipment cloud, repeatedly executing the step of detecting whether the target equipment belongs to the management range of the current equipment cloud or not until the equipment cloud of the target equipment is detected, determining the equipment cloud of the target equipment as the target equipment cloud, wherein the target equipment cloud is used for connecting the target equipment so as to acquire target data acquired by the target equipment, and transmitting the target data to the callback address.
3. The data aggregation method according to claim 2, wherein the obtaining a next-level device cloud within the management range of the current device cloud, and transmitting the target device and the callback address to the next-level device cloud, includes:
acquiring a lower-level equipment list, and determining all equipment clouds of the next level according to the lower-level equipment list;
and sending the target device and the callback address to all device clouds of the next stage.
4. A data aggregation method according to claim 3, wherein said determining all next level device clouds from said list of next level devices comprises:
sending a response request to the equipment addresses of all the equipment clouds in the subordinate equipment list, wherein the equipment clouds corresponding to the equipment addresses return a response result after receiving the response request;
receiving all response results, and detecting whether all response results are successful;
and determining the device cloud corresponding to the response result detected to be successful as the device cloud of the next stage.
5. The data aggregation method according to claim 4, wherein the determining that the device cloud corresponding to the response result detected as successful is the device cloud of the next stage includes:
Determining the equipment cloud corresponding to the response result which is detected to be successful, and acquiring the equipment information of the corresponding equipment cloud;
associating the equipment information with the corresponding equipment cloud to obtain a next-level equipment cloud;
sending the target device and the callback address to all device clouds of the next stage comprises:
and according to the device information in all the next-level device clouds, sending the target device and the callback address to the corresponding device clouds.
6. The data aggregation method of claim 1, wherein the connecting the target device comprises:
detecting a task format of the data collection task;
if the task format is a picture streaming task, invoking a picture access service component of the current equipment cloud to connect the target equipment;
and if the task format is a video streaming task, calling a video access service component of the current equipment cloud to connect the target equipment.
7. The method for aggregating data according to claim 6, wherein if the data aggregating task is a video streaming task, obtaining target data collected by the target device, and sending the target data to the callback address, comprises:
Acquiring target data acquired by the target equipment, and constructing a streaming address corresponding to the target data in the current equipment cloud;
and sending the streaming address to the callback address, wherein the streaming address is used for being triggered by the user to pull the target data for playing.
8. A data collection device, the data collection device comprising:
the task acquisition module is used for acquiring target equipment and callback addresses, wherein the target equipment and the callback addresses are obtained by extracting a data collection task based on equipment cloud when a user triggers the data collection task;
the task detection module is used for detecting whether the target equipment belongs to the management range of the current equipment cloud, and if the target equipment is detected to belong to the management range of the current equipment cloud, the task detection module is connected with the target equipment;
and the task feedback module is used for acquiring target data acquired by the target equipment and sending the target data to the callback address.
9. A computer device, characterized in that it comprises a processor, a memory and a computer program stored in the memory and executable on the processor, which processor implements the data aggregation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the data aggregation method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211666256.7A CN116112531A (en) | 2022-12-23 | 2022-12-23 | Data collection method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211666256.7A CN116112531A (en) | 2022-12-23 | 2022-12-23 | Data collection method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116112531A true CN116112531A (en) | 2023-05-12 |
Family
ID=86258966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211666256.7A Pending CN116112531A (en) | 2022-12-23 | 2022-12-23 | Data collection method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116112531A (en) |
-
2022
- 2022-12-23 CN CN202211666256.7A patent/CN116112531A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107566786B (en) | Method and device for acquiring monitoring video and terminal equipment | |
CN111510395B (en) | Service message reporting method, device, equipment and medium | |
CN104104707B (en) | Webpage data update method, terminal, cache server and system | |
CN112291520B (en) | Abnormal event identification method and device, storage medium and electronic device | |
CN111459782B (en) | Method and device for monitoring service system, cloud platform system and server | |
CN112925661A (en) | Message processing method and device, computer equipment and storage medium | |
CN113015165A (en) | Internet of things platform device access method, device and system | |
CN108023941B (en) | Voice control method and device and electronic equipment | |
JP5962117B2 (en) | Video selection method in an environment with multiple image compression methods | |
CN111859127A (en) | Subscription method and device of consumption data and storage medium | |
CN111177513B (en) | Determination method and device of abnormal access address, electronic equipment and storage medium | |
CN108989881A (en) | A kind of main broadcaster's state determines method and device | |
CN110177024B (en) | Monitoring method of hotspot equipment, client, server and system | |
CN112969172B (en) | Communication flow control method based on cloud mobile phone | |
CN113868471A (en) | Data matching method and system based on monitoring equipment relationship | |
CN113473166A (en) | Data storage system and method | |
CN110971529A (en) | Data transmission method and device, electronic equipment and storage medium | |
US11308212B1 (en) | Adjudicating files by classifying directories based on collected telemetry data | |
CN116112531A (en) | Data collection method, device, equipment and medium | |
CN111694986A (en) | Video recommendation method and device, electronic equipment and storage medium | |
US10922349B1 (en) | Filtering remote access monitoring data | |
CN111522642B (en) | Method for acquiring and inquiring state monitoring data of wind turbine generator, and electronic equipment | |
CN110535853B (en) | Video request scheduling method, device, server and storage medium | |
JP6219621B2 (en) | Communication verification device | |
WO2016033986A1 (en) | Method and apparatus for implementing deep packet inspection |
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 |