CN109617824B - Data acquisition method and device and server - Google Patents

Data acquisition method and device and server Download PDF

Info

Publication number
CN109617824B
CN109617824B CN201811322239.5A CN201811322239A CN109617824B CN 109617824 B CN109617824 B CN 109617824B CN 201811322239 A CN201811322239 A CN 201811322239A CN 109617824 B CN109617824 B CN 109617824B
Authority
CN
China
Prior art keywords
internet
containers
data
server
data distribution
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.)
Active
Application number
CN201811322239.5A
Other languages
Chinese (zh)
Other versions
CN109617824A (en
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201811322239.5A priority Critical patent/CN109617824B/en
Publication of CN109617824A publication Critical patent/CN109617824A/en
Application granted granted Critical
Publication of CN109617824B publication Critical patent/CN109617824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

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)
  • Arrangements For Transmission Of Measured Signals (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a data acquisition method, a data acquisition device and a server. The method comprises the following steps: counting the number of the Internet of things devices accessed to the server; and adjusting the number of data distribution exchange containers according to the counted number of the Internet of things equipment accessing the server, wherein the data distribution exchange containers are used for receiving data acquired by at least one transmission data container, and the transmission data containers are used for receiving data acquired by at least one Internet of things equipment. The method of the embodiment of the invention realizes that the number of the data distribution exchange containers can be adaptively adjusted according to the number of the accessed Internet of things devices, supports a large number of Internet of things devices to be accessed into a network simultaneously, and can meet the requirement of mass data acquisition.

Description

Data acquisition method and device and server
Technical Field
The embodiment of the invention relates to the technical field of application of the Internet of things, in particular to a data acquisition method, a data acquisition device and a server.
Background
Data Acquisition (DAQ) refers to automatically acquiring non-electric quantity or electric quantity signals from analog and digital units to be tested, such as sensors and other devices to be tested, and sending the signals to an upper computer for analysis and processing. The collected data are various physical quantities such as temperature, water level, wind speed, pressure, etc. which have been converted into electrical signals, and may be analog quantities or digital quantities.
With the rapid development of the internet industry and the rise of the internet of things industry, internet of things equipment has been widely used for data acquisition. Because data acquisition is based on a data transmission protocol, data transmission acquisition is performed through a host port, and thus the bottleneck of data acquisition is the network bottleneck. Limited by the data processing capacity of the cluster switch, when the number of the access devices exceeds a preset threshold value, the data acquisition speed is inversely proportional to the number of the access devices, and the network bandwidth cannot be efficiently used. Under various big data application scenes, the access amount of the internet of things equipment greatly exceeds the limit of the traditional network data exchange, the limitation of network bottleneck is further aggravated, and even network paralysis can be caused.
In summary, the existing data acquisition method cannot support a large number of internet of things devices to access a network simultaneously, and cannot meet the requirement of mass data acquisition.
Disclosure of Invention
The embodiment of the invention provides a data acquisition method, a data acquisition device and a server, which are used for solving the problem that the prior art does not support a large number of Internet of things devices to access a network simultaneously.
In a first aspect, an embodiment of the present invention provides a data acquisition method, including:
counting the number of the Internet of things devices accessed to the server;
and adjusting the number of data distribution exchange containers according to the counted number of the Internet of things equipment accessing the server, wherein the data distribution exchange containers are used for receiving data acquired by at least one transmission data container, and the transmission data containers are used for receiving data acquired by at least one Internet of things equipment.
In one possible implementation, adjusting the number of data distribution switching containers according to the counted number of internet of things devices accessing the server includes:
if the counted number of the internet of things equipment accessing the server is larger than a first threshold value, increasing the number of the data distribution exchange containers according to the counted number of the internet of things equipment accessing the server, wherein the first threshold value is determined according to the number of the data distribution exchange containers in the current server.
In one possible implementation, adjusting the number of data distribution switching containers according to the counted number of internet of things devices accessing the server includes:
if the counted number of the internet of things equipment accessing the server is smaller than a second threshold value, the number of the data distribution exchange containers is reduced according to the counted number of the internet of things equipment accessing the server, and the second threshold value is determined according to the number of the data distribution exchange containers in the current server.
In one possible implementation, the method further includes:
counting the number of data distribution exchange containers and the number of transmission data containers;
and determining the number of the data distribution exchange containers according to the counted number of the data distribution exchange containers and the counted number of the transmission data containers.
In one possible implementation, determining the number of data distribution switch containers according to the counted number of data distribution switch containers and the number of transmission data containers includes:
if the ratio of the number of transmission data containers to the number of data distribution switching containers is greater than a third threshold, the number of data distribution switching containers is increased.
In one possible implementation, the method further includes:
if the number of the Internet of things devices connected with the transmission data container is reduced to a first preset number, destroying the transmission data container;
and if the number of the transmission data containers connected with the data distribution switching container is reduced to a second preset number, destroying the data distribution switching container.
In one possible implementation, before counting the number of internet of things devices accessing the server, the method further includes:
receiving an access request message sent by the Internet of things equipment, wherein the access request message comprises equipment coding information of the Internet of things equipment;
and determining whether the Internet of things equipment is allowed to access the server or not according to the equipment coding information.
In a second aspect, an embodiment of the present invention provides a data acquisition apparatus, including:
the statistical module is used for counting the number of the Internet of things equipment accessed to the server;
and the adjusting module is used for adjusting the number of data distribution exchange containers according to the counted number of the Internet of things equipment accessing the server, the data distribution exchange containers are used for receiving the data acquired by at least one transmission data container, and the transmission data containers are used for receiving the data acquired by at least one Internet of things equipment.
In a third aspect, an embodiment of the present invention provides a server, including:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the at least one processor to perform the data acquisition method of any one of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium is configured to implement the data acquisition method according to any one of the first aspect.
According to the data acquisition method, the data acquisition device and the server provided by the embodiment of the invention, the number of the internet of things equipment accessed to the server is counted, and the number of the data distribution exchange containers is adjusted according to the counted number of the internet of things equipment accessed to the server. Therefore, the number of the data distribution and exchange containers can be adaptively adjusted according to the number of the accessed Internet of things devices, the data acquisition requirement when massive Internet of things devices are simultaneously accessed to the network can be met, the response speed is high, and the data acquisition speed is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart of an embodiment of a data collection method provided by the present invention;
FIG. 2 is a schematic diagram illustrating an application of an embodiment of a data acquisition method according to the present invention;
FIG. 3 is a schematic structural diagram of an embodiment of a data acquisition device according to the present invention;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terms "comprising" and "having," and any variations thereof, in the description and claims of this invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The terms "first" and "second" in the present application are used for identification purposes only and are not to be construed as indicating or implying a sequential relationship, relative importance, or implicitly indicating the number of technical features indicated. "plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
Fig. 1 is a flowchart of an embodiment of a data acquisition method provided by the present invention. The method provided by the embodiment can be executed by a network side device, such as a server. As shown in fig. 1, the data acquisition method provided in this embodiment may include:
s101, counting the number of the Internet of things devices accessing the server.
In this embodiment, the internet of things device can be accessed into the server in a wireless communication manner such as bluetooth, infrared, wireless local area network, mobile communication network, and can also be accessed into the server in a wired communication manner, and this embodiment does not have special limitation on the manner in which the internet of things device is accessed into the server, and various access manners are all suitable for this embodiment.
The internet of things device in this embodiment may be various sensors, such as a temperature sensor, a water level sensor, a wind speed sensor, a pressure sensor, and the like. In this embodiment, the internet of things devices accessing the server may be the same kind of internet of things devices, or different kinds of internet of things devices.
In this embodiment, the server may count the number of the internet of things devices accessing the server in real time, or may count the number of the internet of things devices accessing the server once every 30 seconds, for example, by using a preset time interval as a counting period.
S102, adjusting the number of data distribution exchange containers according to the counted number of the Internet of things devices accessing the server, wherein the data distribution exchange containers are used for receiving data collected by at least one transmission data container, and the transmission data containers are used for receiving data collected by at least one Internet of things device.
In this embodiment, when the internet of things device needs to send the acquired data to the server, a transmission channel to the server needs to be established first. In this embodiment, when the internet of things device joins in a network, a corresponding transmission data container needs to be started or selected for receiving data collected by the internet of things device. The transmission data container in this embodiment is used to receive data collected by at least one internet of things device. When the idle transmission data containers exist, the Internet of things equipment selects one of the idle transmission data containers to establish a transmission channel. And when no idle transmission data container exists, the Internet of things equipment triggers the server to start a transmission data container and establish a transmission channel.
The data distribution switch container in this embodiment is configured to receive data collected by at least one transmission data container. And the data distribution exchange container exchanges data with other systems through network bandwidth to complete data distribution.
In this embodiment, the number of the data distribution switch containers is positively correlated with the number of the internet of things devices accessing the server. That is, as the number of internet of things devices accessing the server increases, the number of data distribution switch containers also increases; as the number of internet of things devices accessing the server decreases, the number of data distribution switch containers also decreases.
The data distribution switching container and the data transmission container in this embodiment may both be implemented by using a virtualized container technology, for example, may be implemented by using a Docker, and are small in occupied resources, fast in deployment, and fast in start.
Fig. 2 is an application schematic diagram of an embodiment of the data acquisition method provided by the present invention. As shown in fig. 2, the internet of things devices correspond to the transmission data containers one to one, that is, each transmission data container is only used for receiving data collected by one internet of things device; each data distribution switch container is used for receiving the data collected by the three transmission data containers. When a new internet of things device is accessed, a data transmission container corresponding to the new internet of things device needs to be started, and when three data transmission containers are started, a data distribution exchange container needs to be added to receive data. By analogy, when the number of the internet of things devices accessing the server is increased continuously, the data acquisition requirement can be met only by increasing the number of the data distribution exchange containers as required. It should be noted that fig. 2 is only one possible implementation manner of the embodiment of the present invention, and the numerical values are only examples and do not limit the present application.
In the data acquisition method provided by this embodiment, the number of the data distribution switch containers is adjusted by counting the number of the internet of things devices accessing the server and according to the counted number of the internet of things devices accessing the server. Therefore, the number of the data distribution and exchange containers can be adaptively adjusted according to the number of the accessed Internet of things devices, the data acquisition requirement when massive Internet of things devices are simultaneously accessed to the network can be met, the response speed is high, and the data acquisition speed is improved.
In some embodiments, one implementation of adjusting the number of data distribution switch containers according to the counted number of internet of things devices accessing the server may be:
if the counted number of the internet of things equipment accessing the server is larger than a first threshold value, increasing the number of the data distribution exchange containers according to the counted number of the internet of things equipment accessing the server, wherein the first threshold value is determined according to the number of the data distribution exchange containers in the current server.
The first threshold in this embodiment may be determined according to the number of data distribution switch containers in the current server. For example, if the number of data distribution switch containers started in the current server is 10, each data distribution switch container may be configured to receive data collected by 3 transmission data containers, and each transmission data container may be configured to receive containers collected by 3 internet of things devices, the first threshold in this embodiment may be set to 90(10 × 3). That is, when the counted number of the internet of things devices accessing the server is greater than 90, the data distribution switching container needs to be added. If the counted number of the internet of things devices currently accessing the server at the same time is 120, the number of the data distribution switching containers needing to be added may be
Figure BDA0001857805730000061
I.e. 4 data distribution switch containers need to be added.
It should be noted that, in this embodiment, the number of the internet of things devices accessing the transmission data container may also be determined according to the data transmission rate of the transmission data container and the data transmission rate of a single internet of things device; the number of transport data containers accessed to the data distribution switch container may also be determined according to the data transmission rate of the data distribution switch container and the data transmission rate of the transport data capacity.
In the data acquisition method provided by this embodiment, the number of the data distribution switch containers is increased according to the counted number of the internet of things devices accessing the server by the fact that the number of the internet of things devices accessing the server is greater than the first threshold. Therefore, when the number of the internet of things equipment accessing the server is increased, the number of the data distribution exchange containers is increased in time, so that the data collected by the internet of things equipment can be transmitted quickly, and the data collection speed is increased.
In some embodiments, one implementation of adjusting the number of data distribution switch containers according to the counted number of internet of things devices accessing the server may be:
if the counted number of the internet of things equipment accessing the server is smaller than a second threshold value, the number of the data distribution exchange containers is reduced according to the counted number of the internet of things equipment accessing the server, and the second threshold value is determined according to the number of the data distribution exchange containers in the current server.
For example, if the number of data distribution switch containers in the current server is enough to receive data collected by 100 internet of things devices, and the number of internet of things devices accessing the server is only 50 at this time, a large number of data distribution switch containers are idle, resulting in waste of system resources. Therefore, in order to avoid waste of system resources and improve resource utilization, in this embodiment, when the number of the internet of things devices accessing the server is smaller than the second threshold, the number of the data distribution switch containers is reduced according to the counted number of the internet of things devices accessing the server. The specific value of the second threshold may be set according to actual needs, and this embodiment does not limit this. Therefore, the number of the data distribution exchange containers is timely reduced, the data distribution exchange containers are prevented from being in an idle state, resource waste is avoided, the resource utilization rate is improved, more resources can be released to be used by the Internet of things equipment with data transmission requirements, and the data acquisition speed is further improved.
In some embodiments, on the basis of any of the above embodiments, the method provided by this embodiment may further include: the number of data distribution switching containers and the number of transmission data containers are counted.
In this embodiment, the server may count the number of the initiated data distribution exchange containers and the number of the initiated transmission data containers in real time.
And determining the number of the data distribution exchange containers according to the counted number of the data distribution exchange containers and the counted number of the transmission data containers.
Optionally, determining the number of data distribution switching containers according to the counted number of data distribution switching containers and the counted number of transmission data containers may include:
if the ratio of the number of transmission data containers to the number of data distribution switching containers is greater than a third threshold, the number of data distribution switching containers is increased.
The ratio of the number of transport data containers to the number of data distribution switch containers may be used to indicate the number of transport data containers that each data distribution switch container needs to be connected to on average.
Generally, the number of transport data containers to which each data distribution switch container can be connected is constant. As shown in fig. 2, each data distribution switch container is configured to receive data collected by 3 transmission data containers, and if the ratio of the number of the transmission data containers to the number of the data distribution switch containers is 6 at this time, it indicates that each data distribution switch container needs to be connected to 6 transmission data containers on average, and the data distribution switch container is overloaded and cannot ensure efficient and accurate transmission of the collected data. Therefore, it is necessary to increase the number of data distribution switching containers to relieve the pressure of the data distribution switching containers.
In some embodiments, on the basis of any of the above embodiments, the method provided by this embodiment may further include:
if the number of the internet of things devices connected with the transmission data container is reduced to a first preset number, destroying the transmission data container.
In this embodiment, after the data transmission that internet of things equipment will gather finishes, then can break off the connection with the server, release corresponding resource so that other equipment can use, also can reduce internet of things equipment's consumption simultaneously.
The transmission data container in this embodiment can be connected with a plurality of thing networking devices simultaneously for receive the data that thing networking device gathered. If the data transmission is completed by the plurality of internet of things devices connected with the data transmission device, and the data transmission device is in an off-line state, the data transmission container can be destroyed, and corresponding resources are released.
The first preset number in this embodiment may be set to 0, that is, when the number of the internet of things devices connected to the transmission data container is reduced to 0, the transmission data container may be destroyed.
And if the number of the transmission data containers connected with the data distribution switching container is reduced to a second preset number, destroying the data distribution switching container.
The data distribution switching container in this embodiment may be connected to multiple transmission data containers at the same time, and is configured to receive data collected by the transmission data containers. If the plurality of transmission data containers connected with the transmission data container are all destroyed, the transmission data container can be destroyed, and corresponding resources are released. The second preset number in this embodiment may be set to 0, that is, when the number of transmission data containers connected to the data distribution switching container is reduced to 0, the data distribution switching container may be destroyed.
In the data acquisition method provided by this embodiment, when the number of the internet of things devices connected to the transmission data container is reduced to a first preset number, the transmission data container is destroyed; and when the number of the transmission data containers connected with the data distribution exchange container is reduced to a second preset number, destroying the data distribution exchange container. Therefore, by destroying redundant transmission data containers and data distribution exchange containers in time, more resources are released, the resource utilization rate is improved, the response speed of the server can be improved, and the data acquisition speed is improved.
In some embodiments, on the basis of any of the above embodiments, before counting the number of the internet of things devices accessing the server, the method provided by this embodiment may further include:
receiving an access request message sent by the Internet of things equipment, wherein the access request message comprises equipment coding information of the Internet of things equipment.
And determining whether the Internet of things equipment is allowed to access the server or not according to the equipment coding information.
In this embodiment, the server may store relevant information of the legitimate internet of things device in advance. The legal internet of things equipment can comprise the internet of things equipment which is legally registered, the internet of things equipment which is authorized by the server and the like. The related information may include device coding information, access right information, and the like of the internet of things device.
When the server receives the access request message of the internet of things equipment, the server acquires the equipment coding information contained in the internet of things equipment, compares the equipment coding information with the equipment coding information of the prestored legal internet of things equipment, and if the matching is successful, the internet of things equipment can be determined to be legal and can be accessed to the server; if the matching fails, the internet of things equipment can be determined to be illegal, and the internet of things equipment is refused to access the server.
In the data acquisition method provided by this embodiment, when the internet of things device accesses the server, an access request message including device coding information of the internet of things device and sent by the internet of things device is received, and whether the internet of things device is allowed to access the server is determined according to the device coding information in the access request message. The access of illegal Internet of things equipment can be effectively avoided, further illegal data attack is effectively avoided, and the safety of data acquisition is improved.
Fig. 3 is a schematic diagram of a data acquisition device according to an embodiment of the present invention, which is only illustrated in fig. 3, and the present invention is not limited thereto. Fig. 3 is a schematic structural diagram of an embodiment of a data acquisition device provided in the present invention. The data acquisition device provided by this embodiment may be a network side device, such as a server, or may be a component used for the network side device, such as a chip, an integrated circuit, and the like. As shown in fig. 3, the data acquisition device 30 provided in this embodiment may include a statistic module 301 and an adjusting module 302.
The counting module 301 is configured to count the number of internet of things devices accessing the server.
An adjusting module 302, configured to adjust the number of data distribution switch containers according to the counted number of the internet of things devices accessing the server, where the data distribution switch containers are used to receive data acquired by at least one transmission data container, and the transmission data containers are used to receive data acquired by at least one internet of things device.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Optionally, the adjusting module 302 may be specifically configured to:
if the counted number of the internet of things equipment accessing the server is larger than a first threshold value, increasing the number of the data distribution exchange containers according to the counted number of the internet of things equipment accessing the server, wherein the first threshold value is determined according to the number of the data distribution exchange containers in the current server.
Optionally, the adjusting module 302 may be specifically configured to:
if the counted number of the internet of things equipment accessing the server is smaller than a second threshold value, the number of the data distribution exchange containers is reduced according to the counted number of the internet of things equipment accessing the server, and the second threshold value is determined according to the number of the data distribution exchange containers in the current server.
Optionally, the counting module 301 may be further configured to count the number of data distribution switching containers and the number of transmission data containers; the adjusting module 302 may be further configured to determine the number of data distribution switch containers according to the counted number of data distribution switch containers and the number of transmission data containers.
Optionally, the adjusting module 302 may be further specifically configured to:
if the ratio of the number of transmission data containers to the number of data distribution switching containers is greater than a third threshold, the number of data distribution switching containers is increased.
Optionally, the adjusting module 302 may be further specifically configured to:
if the number of the Internet of things devices connected with the transmission data container is reduced to a first preset number, destroying the transmission data container;
and if the number of the transmission data containers connected with the data distribution switching container is reduced to a second preset number, destroying the data distribution switching container.
Optionally, the data acquisition device 30 may further include a receiving module and a checking module, where the receiving module is configured to receive an access request message sent by the internet of things device before counting the number of the internet of things devices accessing the server, where the access request message includes device coding information of the internet of things device; and the checking module is used for determining whether the Internet of things equipment is allowed to access the server according to the equipment coding information.
Fig. 4 is a schematic diagram of a server according to an embodiment of the present invention, which is only illustrated in fig. 4, and the embodiment of the present invention is not limited thereto. Fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention. As shown in fig. 4, the server 40 provided in this embodiment may include: memory 401, processor 402, and bus 403. The bus 403 is used for connecting the elements.
The memory 401 stores a computer program, and when the computer program is executed by the processor 402, the technical solution of the data acquisition method provided by any of the above method embodiments can be implemented.
Wherein the memory 401 and the processor 402 are electrically connected directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines, such as bus 403. The memory 401 stores a computer program for implementing the data acquisition method, which includes at least one software functional module that can be stored in the memory 401 in the form of software or firmware, and the processor 402 executes various functional applications and data processing by running the software program and the module stored in the memory 401.
The Memory 401 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 401 is used for storing programs, and the processor 402 executes the programs after receiving the execution instructions. Further, the software programs and modules in the memory 401 may also include an operating system, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
The processor 402 may be an integrated circuit chip having signal processing capabilities. The Processor 402 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and so on. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. It will be appreciated that the configuration of fig. 4 is merely illustrative and may include more or fewer components than shown in fig. 4 or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented in hardware and/or software.
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the data acquisition method provided in any of the above method embodiments. The computer-readable storage medium in this embodiment may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. that is integrated with one or more available media, and the available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., SSDs), etc.
In the above embodiments, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in a terminal or server.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of data acquisition, comprising:
counting the number of the Internet of things devices accessed to the server;
adjusting the number of data distribution exchange containers according to the counted number of the Internet of things equipment accessing the server, wherein the data distribution exchange containers are used for receiving data collected by at least one transmission data container, and the transmission data containers are used for receiving data collected by at least one Internet of things equipment;
the method further comprises the following steps:
when idle transmission data containers exist, the Internet of things equipment selects one transmission data container from the idle transmission data containers to establish a transmission channel, and the transmission channel is used for transmitting data acquired by the Internet of things equipment;
when no idle transmission data container exists, the Internet of things equipment triggers the server to start a transmission data container to establish the transmission channel;
the method further comprises the following steps:
if the number of the Internet of things devices connected with the transmission data container is reduced to a first preset number, destroying the transmission data container;
and if the number of the transmission data containers connected with the data distribution exchange container is reduced to a second preset number, destroying the data distribution exchange container.
2. The method of claim 1, wherein adjusting the number of data distribution switch containers according to the counted number of internet of things devices accessing the server comprises:
if the counted number of the internet of things equipment accessing the server is larger than a first threshold value, increasing the number of data distribution exchange containers according to the counted number of the internet of things equipment accessing the server, wherein the first threshold value is determined according to the number of the data distribution exchange containers in the server.
3. The method of claim 1, wherein adjusting the number of data distribution switch containers according to the counted number of internet of things devices accessing the server comprises:
if the counted number of the internet of things equipment accessing the server is smaller than a second threshold value, reducing the number of data distribution exchange containers according to the counted number of the internet of things equipment accessing the server, wherein the second threshold value is determined according to the number of the data distribution exchange containers in the server.
4. The method of claim 1, further comprising:
counting the number of the data distribution switching containers and the number of the transmission data containers;
and determining the number of the data distribution switching containers according to the counted number of the data distribution switching containers and the counted number of the transmission data containers.
5. The method according to claim 4, wherein the determining the number of the data distribution switch containers according to the counted number of the data distribution switch containers and the number of the transmission data containers comprises:
if the ratio of the number of the transmission data containers to the number of the data distribution switching containers is larger than a third threshold value, increasing the number of the data distribution switching containers.
6. The method of any one of claims 1-5, wherein prior to the counting the number of Internet of things devices accessing the server, the method further comprises:
receiving an access request message sent by an Internet of things device, wherein the access request message comprises device coding information of the Internet of things device;
and determining whether the Internet of things equipment is allowed to access the server or not according to the equipment coding information.
7. A data acquisition device, comprising:
the statistical module is used for counting the number of the Internet of things equipment accessed to the server;
the adjusting module is used for adjusting the number of data distribution exchange containers according to the counted number of the Internet of things devices accessing the server, wherein the data distribution exchange containers are used for receiving data collected by at least one transmission data container, and the transmission data containers are used for receiving data collected by at least one Internet of things device;
the adjusting module is further configured to select one transmission data container from the idle transmission data containers to establish a transmission channel when the idle transmission data containers exist, where the transmission channel is used to transmit data acquired by the internet of things device; when no idle transmission data container exists, the Internet of things equipment triggers the server to start a transmission data container to establish the transmission channel;
the adjusting module is further configured to destroy the transmission data container if the number of the internet of things devices connected to the transmission data container is reduced to a first preset number; and if the number of the transmission data containers connected with the data distribution exchange container is reduced to a second preset number, destroying the data distribution exchange container.
8. A server, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
execution of the computer-executable instructions stored by the memory by the at least one processor causes the at least one processor to perform the data acquisition method of any one of claims 1-6.
9. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, are configured to implement the data acquisition method of any one of claims 1-6.
CN201811322239.5A 2018-11-08 2018-11-08 Data acquisition method and device and server Active CN109617824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811322239.5A CN109617824B (en) 2018-11-08 2018-11-08 Data acquisition method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811322239.5A CN109617824B (en) 2018-11-08 2018-11-08 Data acquisition method and device and server

Publications (2)

Publication Number Publication Date
CN109617824A CN109617824A (en) 2019-04-12
CN109617824B true CN109617824B (en) 2022-08-02

Family

ID=66003228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811322239.5A Active CN109617824B (en) 2018-11-08 2018-11-08 Data acquisition method and device and server

Country Status (1)

Country Link
CN (1) CN109617824B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460526B (en) * 2019-06-29 2021-08-10 天津大学 Communication method for content-oriented networking data acquisition and distribution of Internet of things
CN110943914B (en) * 2019-11-28 2022-01-21 中国南方电网有限责任公司 Intelligent gateway of power distribution room and control method
CN111245733A (en) * 2019-12-30 2020-06-05 视联动力信息技术股份有限公司 Data transmission method and device
CN111160283B (en) * 2019-12-31 2023-09-01 浙江宇视科技有限公司 Data access method, device, equipment and medium
CN116582772B (en) * 2023-03-29 2024-01-16 四川辰鳗科技有限公司 Electric energy data acquisition method, system, electronic equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237045B (en) * 2013-02-22 2015-12-09 北方工业大学 Parallel processing system and parallel processing method for large-scale real-time traffic data
CN103812937A (en) * 2014-02-13 2014-05-21 北京邮电大学 Access and adaption system of equipment for Internet of Things
EP3298851B1 (en) * 2015-05-22 2019-09-04 Telefonaktiebolaget LM Ericsson (publ) Method and network node for sharing radiofrequency spectrum following a contention based protocol with determination of transmission time duration
CN105227676A (en) * 2015-10-20 2016-01-06 珠海许继芝电网自动化有限公司 A kind of method of distribution terminal data acquisition

Also Published As

Publication number Publication date
CN109617824A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN109617824B (en) Data acquisition method and device and server
CN111464355B (en) Method and device for controlling expansion and contraction capacity of Kubernets container cluster and network equipment
CN109246229B (en) Method and device for distributing resource acquisition request
CN101582850B (en) Method and system for realizing load balance
CN108563518A (en) Slave communication means, device, terminal device and storage medium
CN110300040B (en) Communication method and related equipment
CN110290399B (en) Data distribution method, system, device and computer readable storage medium
CN109618174B (en) Live broadcast data transmission method, device, system and storage medium
CN111371772A (en) Intelligent gateway current limiting method and system based on redis and computer equipment
CN112911637A (en) Data traffic management method and device
CN107948097B (en) Bandwidth adjusting method and equipment
CN111586714B (en) Network port allocation method, device, electronic equipment and computer usable medium
CN111159195A (en) Data storage control method and equipment in block chain system
WO2019075662A1 (en) Gateway multi-connection method and device
CN111290696A (en) Flow control method and device for application program assembly
CN110677464A (en) Edge node device, content distribution system, method, computer device, and medium
CN109560893B (en) Data verification method and device and server
CN111132132A (en) Traffic management method and device and terminal equipment
CN112286911B (en) Database management method and device, equipment and storage medium
CN110543432B (en) Memory defragmentation method, device, terminal and storage medium
CN111182536A (en) SIM card state detection method, device, network equipment and storage medium
CN112214437B (en) Storage device, communication method and device and computer readable storage medium
CN109379211B (en) Network monitoring method and device, server and storage medium
CN111092817A (en) Data transmission method and device
CN106507224B (en) Method and related device for acquiring target file

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
GR01 Patent grant
GR01 Patent grant