CN111654397B - Data subscription method and device, electronic equipment and storage medium - Google Patents

Data subscription method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111654397B
CN111654397B CN202010492880.4A CN202010492880A CN111654397B CN 111654397 B CN111654397 B CN 111654397B CN 202010492880 A CN202010492880 A CN 202010492880A CN 111654397 B CN111654397 B CN 111654397B
Authority
CN
China
Prior art keywords
subscription
data
target
equipment
policy
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
CN202010492880.4A
Other languages
Chinese (zh)
Other versions
CN111654397A (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.)
Institute of Automation of Chinese Academy of Science
Guangdong Institute of Artificial Intelligence and Advanced Computing
Original Assignee
Institute of Automation of Chinese Academy of Science
Guangdong Institute of Artificial Intelligence and Advanced Computing
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 Institute of Automation of Chinese Academy of Science, Guangdong Institute of Artificial Intelligence and Advanced Computing filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202010492880.4A priority Critical patent/CN111654397B/en
Publication of CN111654397A publication Critical patent/CN111654397A/en
Application granted granted Critical
Publication of CN111654397B publication Critical patent/CN111654397B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data subscription method, a data subscription device, electronic equipment and a storage medium, wherein the method is applied to an equipment management server, the equipment management server is in communication connection with at least two pieces of communication equipment, and the method comprises the following steps: the method comprises the steps that a device management server receives a data subscription request sent by a subscription request device in at least two communication devices, wherein the data subscription request carries a historical state data set of a target subscription device in the at least two communication devices, and the historical state data set comprises at least one piece of historical state data; determining a data subscription strategy corresponding to the target subscription equipment according to the historical state data; and under the condition that the state updating data of the target subscription equipment is detected, sending the state updating data to the subscription request equipment by utilizing the data subscription strategy. The method and the device can improve the real-time performance of updating the equipment state data and reduce the occupancy rate of the operation resources.

Description

Data subscription method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data subscription method and apparatus, an electronic device, and a storage medium.
Background
Currently, in industrial control, after acquiring the state of a device through a direct data interface with the device, a device management server performs corresponding processing calculation on the state of the device to form state data of the device. Since the status data of these devices can be used by various other servers, such as a linkage server, a scheduling server, a user monitoring server, etc., these servers usually select a subscription mode when requesting data, so as to obtain the status update data of the same group of devices within a period of time.
In the related art, a polling and pushing manner is generally adopted to subscribe the state data of the device, the polling manner is that a requester sends an update request to a server at regular time, and the server sends the changed state data of the device to the requester under the condition that the state of the device is changed; the pushing mode is that after detecting that the state data of the equipment is changed, the server side actively sends the changed state data of the equipment to the requester.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
(1) the real-time performance of updating the equipment state data is reduced;
(2) wasting network and computing resources.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a data subscription method, a data subscription device, an electronic device and a storage medium, so as to solve the technical problems that the real-time performance of updating device state data is reduced and network and operation resources are wasted in the related art.
In order to solve the above technical problem, an embodiment of the present disclosure provides a data subscription method, which is applied to a device management server, where the device management server is in communication connection with at least two communication devices, and the method includes the following steps:
the method comprises the steps that a device management server receives a data subscription request sent by a subscription request device in at least two communication devices, wherein the data subscription request carries a historical state data set of a target subscription device in the at least two communication devices, and the historical state data set comprises at least one piece of historical state data;
determining a data subscription strategy corresponding to the target subscription equipment according to the historical state data;
and under the condition that the state updating data of the target subscription equipment is detected, sending the state updating data to the subscription request equipment by utilizing the data subscription strategy.
In some embodiments, the data subscription policy includes a push policy, the historical state data includes a historical subscription frequency of the target subscribing device, and determining the data subscription policy corresponding to the target subscribing device according to the historical state data includes:
sequencing the target subscription devices according to the sequence of the historical subscription frequency from high to low to obtain a first sequencing order;
and setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered first order.
In some embodiments, the data subscription policy includes a push policy, the historical state data includes a historical state update frequency of the target subscription device, and determining the data subscription policy corresponding to the target subscription device according to the historical state data includes:
sequencing the target subscription devices according to the sequence of the historical state updating frequency from low to high to obtain a second sequencing order;
and setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered second order.
In some embodiments, the data subscription policy further includes a polling policy, and determining, according to the historical state data, a data subscription policy corresponding to the target subscribing device includes:
and setting the data subscription policy corresponding to the target subscription equipment which is not set as the push policy as a polling policy.
In some embodiments, further comprising:
under the condition that the state updating data of the target subscription equipment is sent to the subscription request equipment, directly switching the data subscription strategy corresponding to the target subscription equipment from the push strategy to the polling strategy;
alternatively, the first and second electrodes may be,
and under the condition that the state updating data of the target subscription equipment is not sent to the subscription request equipment, marking the state data of the target subscription equipment as a state to be updated after the data subscription strategy corresponding to the target subscription equipment is switched from the push strategy to the polling strategy.
In some embodiments, further comprising:
under the condition that the state updating data of the target subscription equipment is sent to the subscription request equipment, directly switching the data subscription strategy corresponding to the target subscription equipment from the polling strategy to the pushing strategy;
alternatively, the first and second electrodes may be,
and under the condition that the state updating data of the target subscription equipment is not sent to the subscription request equipment, sending the state updating data of the target subscription equipment to the subscription request equipment before switching the data subscription policy corresponding to the target subscription equipment from the polling policy to the pushing policy.
The embodiment of the disclosure further provides a data subscription method, which is applied to a subscription request device, and includes the following steps:
the method comprises the steps that subscription request equipment sends a data subscription request to an equipment management server, wherein the data subscription request carries a historical state data set of target subscription equipment, and the historical state data set comprises at least one piece of historical state data;
and receiving state updating data of the target subscription device, which is sent by the device management server, wherein the state updating data is sent by the device management server by using a data subscription policy corresponding to the target subscription device, which is determined according to the historical state data.
The embodiment of the present disclosure further provides a data subscription device, including:
a first receiving unit, configured to receive, by a device management server, a data subscription request sent by a subscription requesting device of the at least two communication devices, where the data subscription request carries a historical state data set of a target subscription device of the at least two communication devices, and the historical state data set includes at least one historical state data;
the policy determining unit is configured to determine a data subscription policy corresponding to the target subscription device according to the historical state data;
a first sending unit, configured to send, when detecting status update data of the target subscription device, the status update data to the subscription request device by using the data subscription policy.
The embodiment of the present disclosure further provides a data subscription device, including:
a second sending unit, configured to send a data subscription request to an equipment management server by a subscription request device, where the data subscription request carries a history state data set of a target subscription device, and the history state data set includes at least one history state data;
a second receiving unit, configured to receive status update data of the target subscribing device sent by the device management server, where the status update data is sent by the device management server by using a data subscription policy corresponding to the target subscribing device determined according to the historical status data.
An embodiment of the present disclosure further provides an electronic device, which includes: at least one processor, memory, at least one network interface, and a user interface;
the at least one processor, memory, at least one network interface, and user interface are coupled together by a bus system;
the processor is operable to perform the steps of the data subscription method described above by invoking programs or instructions stored by the memory.
The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data subscription method as described above.
The data subscription method, the data subscription device, the electronic equipment and the storage medium provided by the embodiment of the disclosure can achieve the following technical effects:
after the data subscription strategy of the subscription request equipment is determined according to the historical state data of the target subscription equipment, the data subscription strategy is utilized to send the state updating data of the target subscription equipment to the subscription request equipment, so that the real-time performance of equipment state data updating can be improved, and the occupancy rate of computing resources is reduced.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a first embodiment of a data subscription method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a second embodiment of a data subscription method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a data subscription method according to a third embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a fourth embodiment of a data subscription method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a first embodiment of a data subscription device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a second embodiment of a data subscription device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise. Furthermore, the terms "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The invention is described in detail below with reference to specific embodiments and the accompanying drawings.
Referring to fig. 1, an embodiment of the present disclosure provides a data subscription method, which is applied to a device management server, where the device management server is in communication connection with at least two communication devices, and includes the following steps:
s101, a device management server receives a data subscription request sent by a subscription request device of at least two communication devices, wherein the data subscription request carries a history state data set of a target subscription device of the at least two communication devices, and the history state data set comprises at least one history state data.
S102, determining a data subscription strategy corresponding to the target subscription equipment according to the historical state data.
And S103, sending the state updating data to the subscription request equipment by using the data subscription strategy under the condition that the state updating data of the target subscription equipment is detected.
According to the data subscription strategy, the data subscription strategy of the subscription request equipment is determined after the data subscription strategy is distinguished according to the historical state data of the target subscription equipment, and the state updating data of the target subscription equipment is sent to the subscription request equipment by using the data subscription strategy, so that the real-time performance of equipment state data updating can be improved, and the occupancy rate of computing resources is reduced.
Referring to fig. 2, in some embodiments, the data subscription policy includes a push policy, the historical state data includes a historical subscription frequency of the target subscribing device, and the step S102 of determining the data subscription policy corresponding to the target subscribing device according to the historical state data includes:
s201, sequencing the target subscription devices according to the sequence of the historical subscription frequency from high to low to obtain a first sequencing order.
S202, setting a data subscription strategy corresponding to at least one target subscription device as a push strategy according to the ordered first sequence.
In some embodiments, the historical frequency of subscriptions includes:
device single subscription frequency (SS): i.e. the number of times that the status data of a certain target subscribing device is requested by the same subscribing requesting device in the unit time t2, each subscribing requesting device has a unique identifier by which the data subscribing request is initiated can be distinguished. The data subscription request of the subscription request device may include the following two types: single access and subscription, usually subscription, have a higher interest on the target subscribing device, so each subscription is denoted as 5 requests, and each single access is denoted as 1 request.
Device global subscription frequency (SG): i.e. the number of times that the status data of a certain target subscribing device is requested by all subscribing requesting devices in the system to initiate data subscription requests within the unit time t 2.
Referring to fig. 3, in some embodiments, the data subscription policy includes a push policy, the historical state data includes a historical state update frequency of the target subscribing device, and the step S102 of determining the data subscription policy corresponding to the target subscribing device according to the historical state data includes:
s301, sequencing the target subscription devices according to the sequence of the historical state updating frequency from low to high to obtain a second sequencing order.
S302, according to the second sequence of the ordering, setting a data subscription policy corresponding to at least one target subscription device as a push policy.
In some embodiments, the historical state update frequency comprises:
in order to enable the device management server to respond faster to the update frequency of the state data of the target subscribing device, for example, by trisecting T1, the number of updates falling in a range closer to the current time is calculated as 1 update each time; the number of updates falling in a range farther from the current time, each update being calculated as 0.25; the number of updates falling within the intermediate time range, each update being calculated as 0.5;
the equipment summarizes the updating times (R), after the updating times of the status data of each target subscription equipment are calculated, the status data of a group of a plurality of target subscription equipment are selected, the summarizing updating frequency of the group of the plurality of target subscription equipment in unit time is calculated, and the calculation formula is as follows:
Figure BDA0002521762480000091
that is, for a group of multiple target subscribing devices, the device states of the multiple target subscribing devicesThe number of updates Td is accumulated and then divided by the product of the unit time t1 and the number n of the target subscribing devices.
In some embodiments, the data subscription policy further includes a polling policy, and determining the data subscription policy corresponding to the target subscribing device according to the historical state data includes:
and setting the data subscription strategy corresponding to the target subscription equipment which is not set as the push strategy as a polling strategy.
In some embodiments, if the data subscription policy is a push policy, when the device management server detects that the device state of the target subscription device changes, the device management server immediately sends a push message to the subscription request device, and sends the state update data of the target subscription device to the subscription request device; if the data subscription policy is a polling policy, when the device management server detects that the device state of the target subscription device changes, the device management server records the state update data and marks the device state of the target state data as a to-be-updated state, and when the next subscription request device sends a polling request, the device management server packages the state update data of all the target subscription devices to be updated and sends the state update data to the subscription request device.
In some embodiments, when the state update data of the target subscription device is sent to the subscription request device, the data subscription policy corresponding to the target subscription device is directly switched from the push policy to the polling policy;
alternatively, the first and second electrodes may be,
and under the condition that the state updating data of the target subscription equipment is not sent to the subscription request equipment, after the data subscription strategy corresponding to the target subscription equipment is switched from the push strategy to the polling strategy, marking the state data of the target subscription equipment as a state to be updated.
In some embodiments, when the state update data of the target subscription device is sent to the subscription request device, the data subscription policy corresponding to the target subscription device is directly switched from the polling policy to the push policy;
alternatively, the first and second electrodes may be,
and under the condition that the state updating data of the target subscription equipment is not sent to the subscription request equipment, sending the state updating data of the target subscription equipment to the subscription request equipment before switching the data subscription strategy corresponding to the target subscription equipment from the polling strategy to the pushing strategy.
According to the embodiment of the disclosure, a push channel is monitored according to an agreement to acquire push information, and a polling request is sent periodically, so that the integrity and consistency of data synchronization are ensured by the device management server.
In some embodiments, 1, first sort the single-side subscription frequency (SS) of all the devices in the target subscription device state from high to low, and obtain a first order.
2. Selecting a certain proportion of target subscription devices from the highest-ranked device single-side subscription frequency (SS) according to the first ranking order, setting the data subscription policies of the target subscription policies as push policies, for example, if the number of the target subscription devices is 100, selecting 10 target subscription devices with the highest device single-side subscription frequency (SS) value, and setting the data subscription policies of the selected 10 target subscription devices as the push policies, so that a mode of pushing state update data of a part of target subscription devices most concerned by a single subscription request device is realized according to history records.
3. And ordering the device global subscription frequencies (SG) of all the target subscription device states from high to low to obtain an ordered first order.
4. Selecting a certain proportion of target subscription devices according to a first sequence of the sequencing from the highest overall subscription frequency (SG) of the devices, setting the data subscription policies of the target subscription policies as push policies, for example, if the number of the target subscription devices is 100, selecting 5 target subscription devices with the highest single subscription frequency (SS) value of the devices, and setting the data subscription policies of the selected 5 target subscription devices as the push policies, so that the state update data of a part of the target subscription devices most concerned by the subscription request devices is pushed according to the history records, and the state update data of a part of the target subscription devices most concerned by all the subscription request devices is pushed according to the history records.
5. Calculating the device summary updating times (R) of the target subscription device;
6. when the device summary update times (R) are at a higher level, that is, the device summary update times (R) > a high-level threshold, that is, when the device state of the target subscribing device changes more frequently, a polling policy should be adopted as much as possible, where the high-level threshold may be set to 0.75;
i. sequencing the equipment state updating times (T) of the states of all the target subscription equipment from low to high to obtain a second sequencing order;
selecting a certain proportion of target subscribing devices according to the second sorting order from the lowest device state updating times (T), setting the data subscription policies of the target subscribing policies as push policies, for example, if the number of the target subscribing devices is 100, selecting 10 target subscribing devices with the lowest device state updating times (T), setting the data subscription policies of the selected target subscribing devices as push policies, and implementing a push mode for the state updating data of a group of target subscribing devices with the least device state updating times (T) according to the history.
7. When the device summary update times (R) value is at a lower level, that is, the device summary update times (R) < a low-level threshold, that is, the device state of the target subscription device changes very infrequently, a push policy should be adopted as much as possible, wherein the low-level threshold may be set to 0.25;
i. sequencing the equipment state updating times (T) of the states of all the target subscription equipment from low to high to obtain a second sequencing order;
selecting a certain proportion of target subscription devices according to a second sorting order from the lowest device state update times (T), and setting the data subscription policies of the target subscription policies as push policies, for example, if the number of the target subscription devices is 100, selecting 50 target subscription devices with the lowest device state update times (T);
8. the equipment summary updating times (R) value is in a common state;
i. sorting the device state updating times (T) of all the target subscription devices from low to high;
selecting a certain proportion of target subscribing devices from the lowest device state updating times (T), and setting the data subscription policy of the selected target subscribing devices as a push policy, for example, if the number of the target subscribing devices is 100, selecting 20 target subscribing devices with the lowest device state updating times (T);
9. and setting the data subscription policy of the remaining target subscribing devices which are not selected as a polling policy.
After behavior patterns of a subscription request device and a target subscription device are judged, data subscription strategies are classified, and a pushing strategy and a polling strategy are used in a mixed mode, namely, the target subscription device with infrequent change of device states and high attention of the subscription request device adopts a pushing strategy mode, so that the real-time performance of key devices is improved; a polling strategy mode is adopted for target subscription equipment with frequent change and low attention of subscription request equipment so as to reduce the resource occupancy rate; in the whole subscription period, the embodiment of the present disclosure continuously adjusts the manner of the mixing policy, thereby obtaining the optimal balance between the resource utilization rate and the real-time performance.
Referring to fig. 4, in some embodiments, the present disclosure further provides a data subscription method applied to a subscription requesting device, including the following steps:
s401, the subscription request device sends a data subscription request to the device management server, wherein the data subscription request carries a history state data set of the target subscription device, and the history state data set comprises at least one history state data.
S402, receiving state updating data of the target subscription device, wherein the state updating data is sent by the device management server by using a data subscription policy corresponding to the target subscription device and determined according to the historical state data.
Referring to fig. 5, in some embodiments, the present disclosure further provides a data subscription apparatus, including:
a first receiving unit 51, configured to receive, by a device management server, a data subscription request sent by a subscription requesting device of at least two communication devices, where the data subscription request carries a historical state data set of a target subscription device of the at least two communication devices, and the historical state data set includes at least one historical state data;
the policy determining unit 52 is configured to determine a data subscription policy corresponding to the target subscription device according to the historical state data;
the first sending unit 53 is configured to send the status update data to the subscription requesting device by using the data subscription policy if the status update data of the target subscribing device is detected.
Referring to fig. 6, in some embodiments, the present disclosure further provides a data subscription apparatus, including:
a second sending unit 61, configured to send a data subscription request to the device management server by the subscription request device, where the data subscription request carries a historical state data set of the target subscription device, and the historical state data set includes at least one piece of historical state data;
the second receiving unit 62 is configured to receive status update data of the target subscribing device, where the status update data is sent by the device management server by using a data subscription policy corresponding to the target subscribing device determined according to the historical status data.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method embodiments, for example, including:
the method comprises the steps that a device management server receives a data subscription request sent by subscription request equipment in at least two communication equipment, wherein the data subscription request carries historical state data sets of target subscription equipment in the at least two communication equipment, and the historical state data sets comprise at least one piece of historical state data;
determining a data subscription strategy corresponding to the target subscription equipment according to the historical state data;
and under the condition that the state updating data of the target subscription equipment is detected, sending the state updating data to the subscription request equipment by using the data subscription strategy.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method embodiments, for example, including:
the subscription request equipment sends a data subscription request to the equipment management server, wherein the data subscription request carries a historical state data set of the target subscription equipment, and the historical state data set comprises at least one piece of historical state data;
and receiving state updating data of the target subscription equipment, which is sent by the equipment management server, wherein the state updating data is sent by the equipment management server by using a data subscription policy corresponding to the target subscription equipment determined according to the historical state data.
Fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 700 shown in fig. 7 includes: at least one processor 701, memory 702, at least one network interface 704, and other user interfaces 703. The various components in the electronic device 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM ), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
In the embodiment of the present invention, the processor 701 is configured to execute the method steps provided by the method embodiments by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application 7022, for example, and includes:
the method comprises the steps that a device management server receives a data subscription request sent by a subscription request device in at least two communication devices, wherein the data subscription request carries a historical state data set of a target subscription device in the at least two communication devices, and the historical state data set comprises at least one piece of historical state data.
And determining a data subscription strategy corresponding to the target subscription equipment according to the historical state data.
And under the condition that the state updating data of the target subscription equipment is detected, sending the state updating data to the subscription request equipment by using the data subscription strategy.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. 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. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units 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. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The data subscription method is applied to a device management server which is in communication connection with at least two communication devices, and comprises the following steps:
the method comprises the steps that a device management server receives a data subscription request sent by a subscription request device in at least two communication devices, wherein the data subscription request carries a historical state data set of a target subscription device in the at least two communication devices, and the historical state data set comprises at least one piece of historical state data;
determining a data subscription strategy corresponding to the target subscription equipment according to the historical state data; the data subscription policy includes a push policy, the historical state data includes a historical state update frequency of the target subscription device, and the data subscription policy corresponding to the target subscription device is determined according to the historical state data, including:
sequencing the target subscription devices according to the sequence of the historical state updating frequency from low to high to obtain a second sequencing order;
setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered second order;
and under the condition that the state updating data of the target subscription equipment is detected, sending the state updating data to the subscription request equipment by utilizing the data subscription strategy.
2. The method according to claim 1, wherein the data subscription policy includes a push policy, the historical status data includes historical subscription frequency of the target subscribing device, and determining the data subscription policy corresponding to the target subscribing device according to the historical status data includes:
sequencing the target subscription devices according to the sequence of the historical subscription frequency from high to low to obtain a first sequencing order;
and setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered first order.
3. The method according to claim 1 or 2, wherein the data subscription policy further includes a polling policy, and determining the data subscription policy corresponding to the target subscribing device according to the historical state data includes:
and setting the data subscription policy corresponding to the target subscription equipment which is not set as the push policy as a polling policy.
4. The method of claim 3, further comprising:
under the condition that the state updating data of the target subscription equipment is sent to the subscription request equipment, directly switching the data subscription strategy corresponding to the target subscription equipment from the push strategy to the polling strategy;
alternatively, the first and second electrodes may be,
and under the condition that the state updating data of the target subscription equipment is not sent to the subscription request equipment, marking the state data of the target subscription equipment as a state to be updated after the data subscription strategy corresponding to the target subscription equipment is switched from the push strategy to the polling strategy.
5. The method of claim 3, further comprising:
under the condition that the state updating data of the target subscription equipment is sent to the subscription request equipment, directly switching the data subscription strategy corresponding to the target subscription equipment from the polling strategy to the pushing strategy;
alternatively, the first and second electrodes may be,
and under the condition that the state updating data of the target subscription equipment is not sent to the subscription request equipment, sending the state updating data of the target subscription equipment to the subscription request equipment before switching the data subscription policy corresponding to the target subscription equipment from the polling policy to the pushing policy.
6. The data subscription method is applied to a subscription request device and comprises the following steps:
the method comprises the steps that subscription request equipment sends a data subscription request to an equipment management server, wherein the data subscription request carries a historical state data set of target subscription equipment, and the historical state data set comprises at least one piece of historical state data;
receiving state updating data of the target subscription device, which is sent by the device management server, wherein the state updating data is sent by the device management server by using a data subscription policy corresponding to the target subscription device, which is determined according to the historical state data; the data subscription policy includes a push policy, the historical state data includes a historical state update frequency of the target subscription device, and the data subscription policy corresponding to the target subscription device is determined according to the historical state data, including:
sequencing the target subscription devices according to the sequence of the historical state updating frequency from low to high to obtain a second sequencing order;
and setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered second order.
7. A data subscription device, comprising:
a first receiving unit, configured to receive, by a device management server, a data subscription request sent by a subscription request device of at least two communication devices, where the data subscription request carries a historical state data set of a target subscription device of the at least two communication devices, and the historical state data set includes at least one historical state data;
the policy determining unit is configured to determine a data subscription policy corresponding to the target subscription device according to the historical state data; the data subscription policy includes a push policy, the historical state data includes a historical state update frequency of the target subscription device, and the data subscription policy corresponding to the target subscription device is determined according to the historical state data, including:
sequencing the target subscription devices according to the sequence of the historical state updating frequency from low to high to obtain a second sequencing order;
setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered second order;
a first sending unit, configured to send, when detecting status update data of the target subscription device, the status update data to the subscription request device by using the data subscription policy.
8. A data subscription device, comprising:
a second sending unit, configured to send a data subscription request to an equipment management server by a subscription request device, where the data subscription request carries a history state data set of a target subscription device, and the history state data set includes at least one history state data; the data subscription policy comprises a push policy, the historical state data comprises historical state update frequency of the target subscription device, and the data subscription policy corresponding to the target subscription device is determined according to the historical state data, and the method comprises the following steps:
sequencing the target subscription devices according to the sequence of the historical state updating frequency from low to high to obtain a second sequencing order;
setting a data subscription policy corresponding to at least one target subscription device as a push policy according to the ordered second order;
a second receiving unit, configured to receive status update data of the target subscribing device sent by the device management server, where the status update data is sent by the device management server by using a data subscription policy corresponding to the target subscribing device determined according to the historical status data.
9. An electronic device, characterized in that the electronic device comprises: at least one processor, memory, at least one network interface, and a user interface;
the at least one processor, memory, at least one network interface, and user interface are coupled together by a bus system;
the processor is configured to perform the steps of the data subscription method of any one of claims 1 to 5, or claim 6, by calling a program or instructions stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the data subscription method according to any one of claims 1 to 5, or claim 6.
CN202010492880.4A 2020-06-03 2020-06-03 Data subscription method and device, electronic equipment and storage medium Active CN111654397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010492880.4A CN111654397B (en) 2020-06-03 2020-06-03 Data subscription method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010492880.4A CN111654397B (en) 2020-06-03 2020-06-03 Data subscription method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111654397A CN111654397A (en) 2020-09-11
CN111654397B true CN111654397B (en) 2022-02-25

Family

ID=72349694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010492880.4A Active CN111654397B (en) 2020-06-03 2020-06-03 Data subscription method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111654397B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637250A (en) * 2020-12-16 2022-06-17 昆山佰奥软件有限公司 Data communication system between PLC and HMI control based on OPCUA
CN113254762A (en) * 2021-04-26 2021-08-13 北京旷视科技有限公司 Subscription data pushing method and device, electronic equipment and storage medium
CN113596082A (en) * 2021-06-21 2021-11-02 青岛海尔科技有限公司 Method and system for determining equipment data and electronic device
CN113360809A (en) * 2021-06-30 2021-09-07 平安普惠企业管理有限公司 Page data updating method and device, computer equipment and storage medium
CN113726887B (en) * 2021-08-30 2024-03-15 广州虎牙科技有限公司 User behavior evaluation method and device, electronic equipment and computer readable storage medium
CN115580546B (en) * 2022-11-15 2023-02-24 科来网络技术股份有限公司 Data subscription method and device, electronic equipment and readable storage medium
CN115967754A (en) * 2022-12-26 2023-04-14 杭州和利时自动化有限公司 Industrial data acquisition method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546564A (en) * 2010-12-30 2012-07-04 腾讯科技(深圳)有限公司 Information pushing control method and system
CN106850750A (en) * 2016-12-26 2017-06-13 北京五八信息技术有限公司 A kind of method and apparatus of real time propelling movement information
CN109218443A (en) * 2018-10-19 2019-01-15 中国银行股份有限公司 A kind of information-pushing method and device
KR20190062799A (en) * 2017-11-29 2019-06-07 한국전자통신연구원 Data broker and access control method in publish-subscribe model
CN109885764A (en) * 2019-01-29 2019-06-14 努比亚技术有限公司 A kind of subscription information processing method, mobile terminal and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222449A (en) * 2007-01-10 2008-07-16 国际商业机器公司 Publish/subscribe system
US20190181901A1 (en) * 2017-12-08 2019-06-13 T-Mobile Usa, Inc. Local profile assistant and application programming interface
CN108366096A (en) * 2018-01-17 2018-08-03 深圳市金立通信设备有限公司 A kind of information subscribing method, terminal and computer readable storage medium
CN111163159B (en) * 2019-12-27 2023-07-14 中国平安人寿保险股份有限公司 Message subscription method, device, server and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546564A (en) * 2010-12-30 2012-07-04 腾讯科技(深圳)有限公司 Information pushing control method and system
CN106850750A (en) * 2016-12-26 2017-06-13 北京五八信息技术有限公司 A kind of method and apparatus of real time propelling movement information
KR20190062799A (en) * 2017-11-29 2019-06-07 한국전자통신연구원 Data broker and access control method in publish-subscribe model
CN109218443A (en) * 2018-10-19 2019-01-15 中国银行股份有限公司 A kind of information-pushing method and device
CN109885764A (en) * 2019-01-29 2019-06-14 努比亚技术有限公司 A kind of subscription information processing method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN111654397A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111654397B (en) Data subscription method and device, electronic equipment and storage medium
WO2006046486A1 (en) Resource management system, resource information providing method, and program
CN106230997B (en) Resource scheduling method and device
US20170329828A1 (en) Metadata tables for time-series data management
CN111641723B (en) Equipment state tracking method and device
CN100461136C (en) Method and system for maintaining data coherency in multiprocessor system
CN111277640B (en) User request processing method, device, system, computer equipment and storage medium
WO2022151768A1 (en) Network configuration method and apparatus, computer device, and storage medium
US20170085673A1 (en) Attribute Operating Method and Apparatus
US9317432B2 (en) Methods and systems for consistently replicating data
CN112637357A (en) File transmission method and device and terminal equipment
CN112130936A (en) Polling-based data calling method, device, equipment and storage medium
CN111200833B (en) Method and device for determining network element state
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
US20220284020A1 (en) Data processing method, apparatus, and system
JP2021517432A (en) Physical uplink control channel resource determination method and communication device
CN113377396B (en) Upgrading method and device, electronic equipment and storage medium
CN113778511A (en) Resource allocation method, device, equipment and storage medium
CN113986475A (en) Load balancing method for container cluster, computer equipment and storage medium
CN113409004A (en) Data energy consumption processing method and device, terminal equipment and computer storage medium
CN114691175A (en) Application updating method, device and system
CN110381168B (en) Prediction period determining method, prediction content pushing method, device and system
US10365870B2 (en) Information processing system for detecting overload of a management server and processing a priority request having priority, and information processing method for detecting overload of a management server and processing a priority request having a high priority
CN110188006B (en) Data maintenance method, device and equipment
CN113268327A (en) Transaction request processing method and device and electronic equipment

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
CB02 Change of applicant information

Address after: 100190 No. 95 East Zhongguancun Road, Beijing, Haidian District

Applicant after: INSTITUTE OF AUTOMATION, CHINESE ACADEMY OF SCIENCES

Applicant after: Guangdong Institute of artificial intelligence and advanced computing

Address before: 100190 No. 95 East Zhongguancun Road, Beijing, Haidian District

Applicant before: INSTITUTE OF AUTOMATION, CHINESE ACADEMY OF SCIENCES

Applicant before: Guangzhou Institute of artificial intelligence and advanced computing, Institute of automation, Chinese Academy of Sciences

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant