CN107276795A - Information processing method and device and server and terminal based on container - Google Patents
Information processing method and device and server and terminal based on container Download PDFInfo
- Publication number
- CN107276795A CN107276795A CN201710420005.3A CN201710420005A CN107276795A CN 107276795 A CN107276795 A CN 107276795A CN 201710420005 A CN201710420005 A CN 201710420005A CN 107276795 A CN107276795 A CN 107276795A
- Authority
- CN
- China
- Prior art keywords
- terminal
- container
- module
- dea
- temporary node
- 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.)
- Granted
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 32
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 46
- 230000008859 change Effects 0.000 claims abstract description 41
- 238000012217 deletion Methods 0.000 claims description 52
- 230000037430 deletion Effects 0.000 claims description 52
- 238000012544 monitoring process Methods 0.000 claims description 37
- 238000012545 processing Methods 0.000 claims description 18
- 230000002159 abnormal effect Effects 0.000 claims description 15
- 238000001514 detection method Methods 0.000 claims description 3
- 230000007246 mechanism Effects 0.000 abstract description 53
- 230000001052 transient effect Effects 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 19
- 238000004891 communication Methods 0.000 description 10
- 230000009286 beneficial effect Effects 0.000 description 6
- 235000014510 cooky Nutrition 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 4
- 238000013507 mapping Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure is directed to a kind of information processing method based on container and device and server and terminal, wherein, this method includes:The renewal request that receiving terminal is sent, updates what is sent when asking the Container detected for the DEA modules in terminal in DEA modules to produce change, updates and asks to include Container fresh informations;According to the content updated under request renewal transient node corresponding with terminal;According to the update status of the content under transient node corresponding with terminal, event notice is sent to the Router modules of terminal in the way of event.Quickly, in real time all Container in each DEA modules can be responded by zookeeper event notification mechanism;Container change operation need not be completed by way of NATS messagings, and then reduces bandwidth occupancy.
Description
Technical Field
The disclosure relates to the technical field of cloud platforms, and in particular to a container-based information processing method and device, a server and a terminal.
Background
The Cloud foundation is an open source PaaS Cloud platform, which supports multiple frameworks, languages, runtime environments, Cloud platforms and application services, and enables developers to deploy and extend application programs in a few seconds without worrying about any infrastructure problems. Cloudfocunder is widely applied to the construction of the Paas platform in the enterprise and manages specific containers (containers) to perform specific functions of the business, but if the size of the enterprise is larger and larger, the number of containers is increased continuously, and the management of tens of thousands of containers is a very troublesome problem.
In the related art, in the Cloud foundation, a plurality of containers are set in a DEA (Droplet Execution Agent, DEA for short) module; the Router module receives request information of a user, and then the Router module sends the request information to a Container of a specific processing service through a private message middleware NATS (Network Address Translate, NATS for short); the information of the Container is reported to the Router module through the DEA module and NATS.
However, in the related art, when the Container in the DEA is developed to a certain scale, the number of messages in NATS is very large, and the number of data to be processed by the Router module is also very large; however, most of the data of the Container is unchanged, which results in a lot of repeated work of NATS and Router modules and causes a great waste of bandwidth.
Disclosure of Invention
In order to overcome the problems that lots of repeated work is performed on NATS and Router modules in the related art and great bandwidth waste is caused, the present disclosure provides a container-based information processing method and apparatus, a server and a terminal.
According to a first aspect of embodiments of the present disclosure, there is provided a container-based information processing method, including:
receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information;
updating the content under the temporary node corresponding to the terminal according to the updating request;
and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
Further, before the update request sent by the receiving terminal, the method further includes:
receiving a temporary node registration request sent by the terminal, wherein the temporary node registration request is sent by the terminal when the DEA module is started, and the temporary node registration request comprises the terminal identifier;
and generating a temporary node corresponding to the terminal identifier according to the temporary node registration request.
Further, the Container update information includes:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
Further, after the sending the event notification to the Router module of the terminal in an event manner according to the update condition of the content in the temporary node corresponding to the terminal, the method further includes:
detecting whether the DEA module in the terminal has an abnormal on-hook state or not;
and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state.
Further, before the update request sent by the receiving terminal, the method further includes:
receiving a monitoring node registration request sent by the terminal;
and generating a monitoring node according to the monitoring node registration request so as to monitor temporary nodes corresponding to all the terminals according to the monitoring node.
Further, the sending an event notification to a Router module of the terminal in an event manner according to the update condition of the content in the temporary node corresponding to the terminal includes:
and when the monitoring node monitors that the temporary node corresponding to the terminal is deleted or created or the Container is deleted or created, sending an event notification to a Router module of the terminal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps that an updating request sent by a terminal is received, wherein the updating request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the updating request comprises Container updating information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
According to a second aspect of the embodiments of the present disclosure, there is provided a container-based information processing method including:
judging whether a Container in a DEA module in the terminal is changed or not;
if it is determined that a Container in a DEA module in a terminal changes, sending an update request to a server, wherein the update request comprises Container update information, so that the server updates the content under the temporary node corresponding to the terminal according to the update request and then sends an event notification to a Router module of the terminal in an event manner;
and receiving the event notification sent by the server.
Further, before determining whether a Container in a DEA module in the terminal changes, the method further includes:
when the DEA module is started, a temporary node registration request is sent to the server, wherein the temporary node registration request comprises the terminal identification, so that the server generates a temporary node corresponding to the terminal identification according to the temporary node registration request.
Further, the Container update information includes:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
Further, after the receiving the event notification sent by the server, the method further includes:
if the event represented in the event notification is a Container creation, a Container deletion or a temporary node creation, acquiring Container information in a temporary node corresponding to the terminal in a server, and comparing and analyzing the Container information with prestored Container information to change the content under the temporary node;
or,
and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in the DEA module in the terminal.
Further, before determining whether a Container in a DEA module in the terminal changes, the method further includes:
and sending a monitoring node registration request to the server so that the server generates monitoring nodes to monitor temporary nodes corresponding to all the terminals according to the monitoring nodes.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; and receiving the event notification sent by the server. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
According to a third aspect of the embodiments of the present disclosure, there is provided a container-based information processing apparatus including:
the terminal comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is configured to receive an update request sent by the terminal, the update request is sent when a DEA module in the terminal detects that a Container in the DEA module is changed, and the update request comprises Container update information;
an updating module configured to update contents under a temporary node corresponding to the terminal according to the update request;
and the notification module is configured to send an event notification to the Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
Further, the apparatus further comprises:
a second receiving module, configured to receive a temporary node registration request sent by a terminal before the first receiving module receives an update request sent by the terminal, where the temporary node registration request is sent by the terminal when the DEA module is started, and the temporary node registration request includes the terminal identifier;
and the generating module is configured to generate a temporary node corresponding to the terminal identifier according to the temporary node registration request.
Further, the Container update information includes:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
Further, the apparatus further comprises:
the detection module is configured to detect whether the DEA module in the terminal has an abnormal on-hook state or not after the notification module sends an event notification to the Router module of the terminal in an event mode according to the update condition of the content under the temporary node corresponding to the terminal; and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state.
Further, the apparatus further comprises:
a third receiving module configured to receive a listening node registration request sent by a terminal before the first receiving module receives an update request sent by the terminal; and generating a monitoring node according to the monitoring node registration request so as to monitor temporary nodes corresponding to all the terminals according to the monitoring node.
Further, the notification module is specifically configured to:
and when the monitoring node monitors that the temporary node corresponding to the terminal is deleted or created or the Container is deleted or created, sending an event notification to a Router module of the terminal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps that an updating request sent by a terminal is received, wherein the updating request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the updating request comprises Container updating information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a container-based information processing apparatus including:
a determining module configured to determine whether a Container in a DEA module in the terminal is changed;
a sending module, configured to send an update request to a server if it is determined that a Container in a DEA module in a terminal changes, where the update request includes Container update information, so that the server sends an event notification to a Router module of the terminal in an event manner after updating content in a temporary node corresponding to the terminal according to the update request;
a receiving module configured to receive the event notification sent by the server.
Further, the apparatus further comprises:
the first registration module is configured to send a temporary node registration request to the server when the DEA module is started before the judgment module judges whether a Container in the DEA module in the terminal changes, wherein the temporary node registration request includes the terminal identifier, so that the server generates a temporary node corresponding to the terminal identifier according to the temporary node registration request.
Further, the Container update information includes:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
Further, the apparatus further comprises:
the processing module is configured to, after the receiving module receives the event notification sent by the server, obtain, if an event characterized in the event notification is a Container creation, a Container deletion, or a temporary node creation, Container information in a temporary node corresponding to the terminal in the server, and compare and analyze the Container information with pre-stored Container information to change the content in the temporary node;
or,
and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in the DEA module in the terminal.
Further, the apparatus further comprises:
and the second registration module is configured to send a monitoring node registration request to the server before the judgment module judges whether the Container in the DEA module in the terminal changes or not, so that the server generates monitoring nodes to monitor temporary nodes corresponding to the terminals according to the monitoring nodes.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; and receiving the event notification sent by the server. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
According to a fifth aspect of embodiments of the present disclosure, there is provided a server including:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps that an updating request sent by a terminal is received, wherein the updating request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the updating request comprises Container updating information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a terminal, including:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in a terminal changes, sending an update request to a server, wherein the update request comprises Container update information, so that the server updates the content under the temporary node corresponding to the terminal according to the update request and then sends an event notification to a Router module of the terminal in an event manner; and receiving the event notification sent by the server.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; and receiving the event notification sent by the server. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
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 diagram illustrating a first embodiment of a container-based information processing method in accordance with an illustrative embodiment;
FIG. 2 is a flow diagram illustrating a second embodiment of a container-based information processing method in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating a third embodiment of a container-based information processing method in accordance with an illustrative embodiment;
FIG. 4 is a flowchart illustrating a fourth embodiment of a container-based information processing method in accordance with an illustrative embodiment;
FIG. 5 is a block diagram illustrating a fifth embodiment of a container-based information processing apparatus, according to an exemplary embodiment;
FIG. 6 is a block diagram illustrating a sixth embodiment of a container-based information processing apparatus, according to an illustrative embodiment;
FIG. 7 is a block diagram illustrating a seventh embodiment of a container-based information processing apparatus in accordance with an illustrative embodiment;
FIG. 8 is a block diagram of an eighth embodiment of a container-based information processing apparatus, according to an exemplary embodiment;
FIG. 9 is a block diagram illustrating an entity of one embodiment of a server nine in accordance with an illustrative embodiment;
fig. 10 is a block diagram illustrating the entities of one embodiment of a terminal, according to an example embodiment;
FIG. 11 is a block diagram illustrating a server device 1900 in accordance with an illustrative embodiment;
fig. 12 is a block diagram illustrating a terminal device 800 according to an example embodiment.
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 embodiments described in the following exemplary embodiments do not represent all embodiments 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.
Fig. 1 is a flowchart illustrating a first embodiment of a container-based information processing method according to an exemplary embodiment, and as shown in fig. 1, the method is mainly used in a server, where the server includes a public terminal, a mobile terminal, a personal terminal and the like, such as a desktop computer, a touch-screen mobile phone, a tablet computer, a personal computer and the like, and the method includes the following steps.
In step S11, an update request sent by the terminal is received, where the update request is sent when the DEA module in the terminal detects that the Container in the DEA module has changed, and the update request includes the Container update information.
Wherein the Container update information includes: container creation information, or Container deletion information.
In this step, a DEA module is provided in one terminal, and a plurality of containers are provided in the DEA module. When the Container in the DEA module changes, the DEA module of the terminal may send an update request to the temporary node under the cookie in the server, and according to the change generated by the Container in the DEA module, the update request is added with the Container update information, for example, the Container update information is Container creation information, or Container deletion information, or the information in the Container changes. Further, the zookeeper in the server receives the update request.
In step S12, the content in the temporary node corresponding to the terminal is updated according to the update request.
In this step, the zookeeper in the server queries out the temporary node corresponding to the current terminal. A temporary node dea-i is arranged under/cf/dea/of a zookeeper in a server, i is a dea unique identifier, i corresponds to each terminal, and the value of i is a positive integer; in each temporary node DEA-i there is all Container information in a different DEA module, respectively. At the moment, a zookeeper in the server inquires out a temporary node dea-i which corresponds to the current terminal and is/cf/dea/lower; then, the zookeeper of the server updates the content of the information of the current DEA module under the temporary node DEA-i under the zookeeper in the server, namely updates the content of the information in the path cf/DEA// cf/DEA/< DEA-i >, and changes the content of the temporary node.
In step S13, an event notification is sent to the Router module of the terminal as an event according to the update of the content in the temporary node corresponding to the terminal.
Wherein the event notification characterizes creating a Container, or deleting a Container, or updating a Container, or creating a temporary node, or deleting a temporary node.
In this step, after the content of the Container information of the current DEA module is updated by the temporary node DEA-i under the zookeeper in the server, the zookeeper in the server sends an event notification to the Router module of the terminal in an event manner according to the update condition of the content under the temporary node DEA-i. If the updating condition of the content under the temporary node dea-i is the Container creation information, the event notification represents the creation of the Container; if the updating condition of the content under the temporary node dea-i is the content deleting information, the event notification represents the deletion of the content; if the updating condition of the content under the temporary node dea-i is that the information in the Container is changed, the event notification represents the updated Container; if the updating condition of the content under the temporary node dea-i is that the temporary node dea-i is created, the event notification represents that the temporary node is created; and if the updating condition of the content under the temporary node dea-i is that the temporary node dea-i is deleted, the event notification represents that the temporary node is deleted.
The embodiment receives an update request sent by a terminal, where the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request includes Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
On the basis of the first embodiment, fig. 2 is a flowchart illustrating a second embodiment of a container-based information processing method according to an exemplary embodiment, and as shown in fig. 2, before step S11, the method further includes:
in step S21, a temporary node registration request sent by the terminal is received, where the temporary node registration request is sent by the terminal when the DEA module is started, and the temporary node registration request includes the terminal identifier.
In this step, when the DEA module of the terminal is started for the first time, the DEA module of the terminal may send a temporary node registration request to the zookeeper of the server, and the terminal identifier needs to be added to the temporary node registration request. Because one terminal corresponds to one DEA module, one DEA module corresponds to one temporary node under zookeeper of the server.
In step S22, a temporary node corresponding to the terminal identifier is generated according to the temporary node registration request.
In this step, the zookeeper of the server generates a temporary node dea-i corresponding to the current terminal in a path/cf/dea/according to the temporary node registration request in the step S21, where i is a dea unique identifier, i corresponds to a terminal identifier of the terminal, and i takes the value of a positive integer; in each temporary node DEA-i there is all Container information in a different DEA module, respectively.
Before step S11, the method further includes:
in step S23, a listening node registration request sent by the terminal is received.
In this step, in the implementation process of this embodiment, when the DEA module of the terminal is started, the DEA module of the terminal may send a listening node registration request to the zookeeper of the server.
In step S24, a listening node is generated according to the listening node registration request to listen to a temporary node corresponding to each terminal according to the listening node.
In this step, the zookeeper of the server may generate a listening node listener to/cf/dea/temporary node to concern about the change of the number and content of each child node under the temporary node. The DEA module of each terminal can generate a listening node list to/cf/DEA/temporary node under zookeeper, so as to detect the change of the number and content of each sub-node under each temporary node.
Corresponding to step S24, step S13 specifically includes:
and when the monitoring node monitors that the temporary node corresponding to the terminal is deleted or created or the Container is deleted or created, sending an event notification to a Router module of the terminal.
In this step, after the content of the Container information of the current DEA module is updated, the server may monitor, by the registered monitoring node, an update condition of the content of the temporary node DEA-i by the temporary node DEA-i under the zookeeper in the server, and when it is monitored that the temporary node DEA-i is deleted or created or the Container is deleted or created, the server sends an event notification to the Router module of the terminal corresponding to the temporary node DEA-i in an event manner.
After step S13, the method further includes:
in step S25, it is detected whether an abnormal on-hook state occurs in the DEA module in the terminal.
In this step, the zookeeper of the server may detect whether the DEA module in the terminal corresponding to the current temporary node DEA-i is in an abnormal on-hook state, that is, whether the DEA module is abnormally hooked.
In step S26, upon determining that the DEA module has an abnormal on-hook state, the temporary node corresponding to the terminal is deleted.
In this step, if the zookeeper of the server detects that the DEA module of the terminal corresponding to the current temporary node DEA-i is abnormally hung, the zookeeper of the server may directly delete the temporary node DEA-i. Since a temporary node corresponds to the DEA module, zookeeper automatically deletes the non-surviving temporary node.
In this embodiment, a temporary node registration request sent by a terminal is received, where the temporary node registration request is sent by the terminal when a DEA module is started, and the temporary node registration request includes a terminal identifier; generating a temporary node corresponding to the terminal identifier according to the temporary node registration request; receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; according to the updating condition of the content of the temporary node corresponding to the terminal, sending an event notification to a Router module of the terminal in an event mode; and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state. Furthermore, a DEA module is not required to send self-content information to a Router module at regular time through NATS, only when the content is newly added or deleted, the change data is sent to a temporary node of the cookie, then an event notification is sent to the Router module through an event mechanism, and the Router module is triggered to actively update the self-content information through the event mechanism; all the contacts on each DEA module can be responded quickly and in real time through an event notification mechanism of the zookeeper, and all the contact information in the temporary node corresponding to a certain disappeared DEA is deleted directly according to the mapping relation in the memory; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
Fig. 3 is a flowchart illustrating a third embodiment of a container-based information processing method according to an exemplary embodiment, as shown in fig. 3, the method is mainly used in a terminal, the terminal includes a public terminal, a mobile terminal, a personal terminal and the like, such as a desktop computer, a touch-screen mobile phone, a tablet computer, a personal computer and the like, and the information processing method includes the following steps.
In step S31, it is determined whether or not a change is made in the Container in the DEA module in the terminal.
In this step, a DEA module is provided in one terminal, and a plurality of containers are provided in the DEA module. The DEA module of the terminal may detect whether the Container in the DEA module is changed, where the change may be creating the Container, deleting the Container, or changing information in the Container.
In step S32, if it is determined that the Container in the DEA module in the terminal is changed, an update request is sent to the server, where the update request includes Container update information, so that the server updates the content in the temporary node corresponding to the terminal according to the update request, and then sends an event notification to the Router module of the terminal in an event manner.
Wherein the Container update information includes: container creation information, or Container deletion information. The event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
In this step, if the Container in the DEA module changes, the DEA module of the terminal may send an update request to the temporary node under the cookie in the server, and add, according to the change generated by the Container in the DEA module, the Container update information to the update request, for example, the Container update information is Container creation information, or Container deletion information, or the information in the Container changes.
Further, the zookeeper in the server receives the update request. And querying a zookeeper in the server to obtain a temporary node corresponding to the current terminal. A temporary node dea-i is arranged under/cf/dea/of a zookeeper in a server, i is a dea unique identifier, i corresponds to each terminal, and the value of i is a positive integer; in each temporary node DEA-i there is all Container information in a different DEA module, respectively. At the moment, a zookeeper in the server inquires out a temporary node dea-i which corresponds to the current terminal and is/cf/dea/lower; then, the server zookeeper updates the content of the information of the current DEA module under the temporary node DEA-i under zookeeper in the server, namely updates the content of the information in the path cf/DEA// cf/DEA/< DEA-i >, and changes the content of the temporary node.
Then, after the content of the Container information of the current DEA module is updated by the temporary node DEA-i under the zookeeper in the server, the zookeeper in the server sends an event notification to the Router module of the terminal in an event mode according to the updating condition of the content under the temporary node DEA-i. If the updating condition of the content under the temporary node dea-i is the Container creation information, the event notification represents the creation of the Container; if the updating condition of the content under the temporary node dea-i is the content deleting information, the event notification represents the deletion of the content; if the updating condition of the content under the temporary node dea-i is that the information in the Container is changed, the event notification represents the updated Container; if the updating condition of the content under the temporary node dea-i is that the temporary node dea-i is created, the event notification represents that the temporary node is created; and if the updating condition of the content under the temporary node dea-i is that the temporary node dea-i is deleted, the event notification represents that the temporary node is deleted.
In step S33, the event notification sent by the server is received.
In this step, the Router module of the terminal may receive the event notification sent to the Router module of the terminal in the form of an event by the temporary node dea-i under zookeeper in step S32.
In the embodiment, whether the Container in the DEA module in the terminal changes is judged; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; and receiving the event notification sent by the server. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
On the basis of the third embodiment, fig. 4 is a flowchart illustrating a fourth embodiment of a container-based information processing method according to an exemplary embodiment, and as shown in fig. 4, before step S31, the method further includes:
in step S41, when the DEA module is started, a temporary node registration request is sent to the server, where the temporary node registration request includes the terminal identifier, so that the server generates a temporary node corresponding to the terminal identifier according to the temporary node registration request.
In this step, when the DEA module of the terminal is started for the first time, the DEA module of the terminal may send a temporary node registration request to the zookeeper of the server, and the terminal identifier needs to be added to the temporary node registration request. Because one terminal corresponds to one DEA module, one DEA module corresponds to one temporary node under zookeeper of the server. Then, a zookeeper of the server generates a temporary node dea-i corresponding to the current terminal under the path/cf/dea/according to the temporary node registration request, wherein i is a dea unique identifier, i corresponds to a terminal identifier of the terminal, and the value of i is a positive integer; in each temporary node DEA-i there is all Container information in a different DEA module, respectively.
The method provided in this embodiment, before step S31, further includes:
in step S42, a listening node registration request is sent to the server, so that the server generates a listening node to listen to a temporary node corresponding to each terminal according to the listening node.
In this step, in the implementation process of this embodiment, when the DEA module of the terminal is started, the DEA module of the terminal may send a listening node registration request to the zookeeper of the server. Then, the zookeeper of the server can generate a listening node listener to/cf/dea/temporary node to concern about the change of the number and the content of each child node under the temporary node. The DEA module of each terminal can generate a listening node list to/cf/DEA/temporary node under zookeeper, so as to detect the change of the number and content of each sub-node under each temporary node. Therefore, after the content of the Container information of the current DEA module is updated, the server monitors the updating condition of the content of the temporary node DEA-i through the registered monitoring node, and when the temporary node DEA-i is deleted or created or the Container is deleted or created, the server sends an event notification to the Router module of the terminal corresponding to the temporary node DEA-i in an event mode.
After step S33, the method further includes:
in step S43, if the event characterized in the event notification is to create a Container, delete a Container, or create a temporary node, obtaining Container information in the temporary node corresponding to the terminal in the server, and comparing and analyzing the Container information with pre-stored Container information to change the content in the temporary node; or, if the event characterized in the event notification is to delete a temporary node, deleting each Container in the DEA module in the terminal.
In this step, after the Router module of the terminal receives the event notification sent by the zookeeper of the server, the Router module of the terminal needs to execute a corresponding operation according to the event type of the event represented in the event notification.
If the event represented in the event notification is to create a Container, delete a Container, or create a temporary node, the Router module of the terminal acquires the Container information in the temporary node dea-i corresponding to the current terminal in the server, then compares the Container information with the Container information prestored in the Router module, and then changes the content under the temporary node or changes the Container in the terminal.
And if the event represented in the event notification is the deletion of the temporary node, the Router module of the terminal deletes all the contacts in the DEA module.
In this embodiment, when the DEA module is started, a temporary node registration request is sent to the server, so that the server generates a temporary node corresponding to the terminal identifier according to the temporary node registration request; judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; receiving an event notification sent by a server; if the event represented in the event notification is the creation of a Container, the deletion of a Container or the creation of a temporary node, acquiring the Container information in the temporary node corresponding to the terminal in the server, and comparing and analyzing the Container information with the prestored Container information to change the content in the temporary node; and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in a DEA module in the terminal. Furthermore, a DEA module is not required to send self-content information to a Router module at regular time through NATS, only when the content is newly added or deleted, the change data is sent to a temporary node of the cookie, then an event notification is sent to the Router module through an event mechanism, and the Router module is triggered to actively update the self-content information through the event mechanism; all the contacts on each DEA module can be responded quickly and in real time through an event notification mechanism of the zookeeper, and all the contact information in the temporary node corresponding to a certain disappeared DEA is deleted directly according to the mapping relation in the memory; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
Fig. 5 is a block diagram illustrating a fifth embodiment of a container-based information processing apparatus, according to an example embodiment. Referring to fig. 5, the apparatus includes:
a first receiving module 51, configured to receive an update request sent by a terminal, where the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request includes Container update information;
an update module 52 configured to update the content under the temporary node corresponding to the terminal according to the update request;
and the notification module 53 is configured to send an event notification to the Router module of the terminal in an event manner according to the update condition of the content in the temporary node corresponding to the terminal.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The embodiment receives an update request sent by a terminal, where the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request includes Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
On the basis of the fifth embodiment, fig. 6 is a block diagram illustrating a sixth embodiment of a container-based information processing apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus further includes:
a second receiving module 54, configured to receive a temporary node registration request sent by a terminal before the first receiving module 51 receives an update request sent by the terminal, where the temporary node registration request is sent by the terminal when the DEA module is started, and the temporary node registration request includes the terminal identifier;
a generating module 55 configured to generate a temporary node corresponding to the terminal identifier according to the temporary node registration request.
Wherein the Container update information includes: container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
The device, still include:
a detection module 56, configured to detect whether an abnormal on-hook state occurs in the DEA module in the terminal after the notification module 53 sends an event notification to the Router module of the terminal in an event manner according to the update condition of the content in the temporary node corresponding to the terminal; and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state.
The device, still include:
a third receiving module 57, configured to receive a listening node registration request sent by a terminal before the first receiving module 51 receives an update request sent by the terminal; and generating a monitoring node according to the monitoring node registration request so as to monitor temporary nodes corresponding to all the terminals according to the monitoring node.
The notification module 53 is specifically configured to:
and when the monitoring node monitors that the temporary node corresponding to the terminal is deleted or created or the Container is deleted or created, sending an event notification to a Router module of the terminal.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In this embodiment, a temporary node registration request sent by a terminal is received, where the temporary node registration request is sent by the terminal when a DEA module is started, and the temporary node registration request includes a terminal identifier; generating a temporary node corresponding to the terminal identifier according to the temporary node registration request; receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; according to the updating condition of the content of the temporary node corresponding to the terminal, sending an event notification to a Router module of the terminal in an event mode; and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state. Furthermore, a DEA module is not required to send self-content information to a Router module at regular time through NATS, only when the content is newly added or deleted, the change data is sent to a temporary node of the cookie, then an event notification is sent to the Router module through an event mechanism, and the Router module is triggered to actively update the self-content information through the event mechanism; all the contacts on each DEA module can be responded quickly and in real time through an event notification mechanism of the zookeeper, and all the contact information in the temporary node corresponding to a certain disappeared DEA is deleted directly according to the mapping relation in the memory; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
Fig. 7 is a block diagram illustrating a seventh embodiment of a container-based information processing apparatus, according to an example embodiment. Referring to fig. 7, the apparatus includes:
a determination module 61 configured to determine whether a Container in a DEA module in the terminal is changed;
a sending module 62, configured to send an update request to a server if it is determined that a Container in a DEA module in a terminal changes, where the update request includes Container update information, so that the server sends an event notification to a Router module of the terminal in an event manner after updating content in a temporary node corresponding to the terminal according to the update request;
a receiving module 63 configured to receive the event notification sent by the server.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In the embodiment, whether the Container in the DEA module in the terminal changes is judged; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; and receiving the event notification sent by the server. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
On the basis of the seventh embodiment, fig. 8 is a block diagram illustrating an eighth embodiment of a container-based information processing apparatus according to an exemplary embodiment. Referring to fig. 8, the apparatus further includes:
a first registration module 64, configured to send a temporary node registration request to the server when the DEA module is started before the determination module 61 determines whether a Container in a DEA module in the terminal changes, where the temporary node registration request includes the terminal identifier, so that the server generates a temporary node corresponding to the terminal identifier according to the temporary node registration request.
Wherein the Container update information includes: container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
The device, still include:
a processing module 65, configured to, after the receiving module 63 receives the event notification sent by the server, if an event characterized in the event notification is to create a Container, delete a Container, or create a temporary node, obtain Container information in a temporary node corresponding to the terminal in the server, and compare and analyze the Container information with pre-stored Container information to change content in the temporary node;
or,
and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in the DEA module in the terminal.
The device, still include:
a second registration module 66 configured to send a listening node registration request to the server before the determination module 61 determines whether a Container in a DEA module in the terminal is changed, so that the server generates a listening node to listen to a temporary node corresponding to each terminal according to the listening node.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In this embodiment, when the DEA module is started, a temporary node registration request is sent to the server, so that the server generates a temporary node corresponding to the terminal identifier according to the temporary node registration request; judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; receiving an event notification sent by a server; if the event represented in the event notification is the creation of a Container, the deletion of a Container or the creation of a temporary node, acquiring the Container information in the temporary node corresponding to the terminal in the server, and comparing and analyzing the Container information with the prestored Container information to change the content in the temporary node; and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in a DEA module in the terminal. Furthermore, a DEA module is not required to send self-content information to a Router module at regular time through NATS, only when the content is newly added or deleted, the change data is sent to a temporary node of the cookie, then an event notification is sent to the Router module through an event mechanism, and the Router module is triggered to actively update the self-content information through the event mechanism; all the contacts on each DEA module can be responded quickly and in real time through an event notification mechanism of the zookeeper, and all the contact information in the temporary node corresponding to a certain disappeared DEA is deleted directly according to the mapping relation in the memory; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
Fig. 9 is a block diagram illustrating an entity of a server embodiment nine in accordance with an exemplary embodiment. Referring to fig. 9, the server may be embodied as: a processor 71, and a memory 72 configured to store processor-executable instructions;
wherein the processor 71 is configured to: receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
In the above embodiments, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. SIM cards, also known as subscriber identity cards, smart cards, must be installed in a digital mobile phone for use. That is, the information of the digital mobile phone client, the encrypted key and the contents of the user's phone book are stored on the computer chip. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
With regard to the server in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method and apparatus, and will not be elaborated here.
The embodiment receives an update request sent by a terminal, where the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request includes Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
Fig. 10 is a block diagram illustrating the entities of one embodiment of a terminal according to an example embodiment. Referring to fig. 10, the terminal may be embodied as: a processor 81, and a memory 82 configured to store processor-executable instructions;
wherein the processor 81 is configured to: judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in a terminal changes, sending an update request to a server, wherein the update request comprises Container update information, so that the server updates the content under the temporary node corresponding to the terminal according to the update request and then sends an event notification to a Router module of the terminal in an event manner; and receiving the event notification sent by the server.
In the above embodiments, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. SIM cards, also known as subscriber identity cards, smart cards, must be installed in a digital mobile phone for use. That is, the information of the digital mobile phone client, the encrypted key and the contents of the user's phone book are stored on the computer chip. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
With regard to the terminal in the above-described embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment related to the method and apparatus, and will not be elaborated herein.
In the embodiment, whether the Container in the DEA module in the terminal changes is judged; if it is determined that a Container in a DEA module in the terminal changes, sending an update request to the server, wherein the update request comprises Container update information, so that the server sends an event notification to a Router module of the terminal in an event mode after updating the content under the temporary node corresponding to the terminal according to the update request; and receiving the event notification sent by the server. Furthermore, a DEA module is not required to send self Container information to a Router module at regular time through NATS, only when the Container is newly added or deleted, the changed data is sent to a temporary node of the zookeeper, and then an event notification is sent to the Router module through an event mechanism; all the contacts on each DEA module can be responded quickly and in real time through the event notification mechanism of the zookeeper; the change operation of the Container is not needed to be completed in a NATS message receiving and sending mode, so that the bandwidth occupation is reduced, and the zookeeper event notification mechanism has higher parallelism than the NATS message bus mode.
FIG. 11 is a block diagram illustrating a server device 1900 according to an example embodiment. For example, the apparatus 1900 may be provided as a server. Referring to FIG. 11, the device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by the processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the container-based information processing method described above, the method comprising:
receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information;
updating the content under the temporary node corresponding to the terminal according to the updating request;
and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
The device 1900 may also include a power component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input/output (I/O) interface 1958. The device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, MacOS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Fig. 12 is a block diagram illustrating a terminal device 800 according to an example embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
Referring to fig. 12, terminal device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the terminal device 800. Examples of such data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 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.
Power components 806 provide power to the various components of terminal device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 800.
The multimedia component 808 comprises a screen providing an output interface between the terminal device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. When the terminal device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor component 814 includes one or more sensors for providing various aspects of state assessment for terminal device 800. For example, sensor assembly 814 may detect an open/closed status of terminal device 800, the relative positioning of components, such as a display and keypad of terminal device 800, sensor assembly 814 may also detect a change in the position of terminal device 800 or a component of terminal device 800, the presence or absence of user contact with terminal device 800, orientation or acceleration/deceleration of terminal device 800, and a change in the temperature of terminal device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 816 is configured to facilitate communications between terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal device 800 may be implemented by 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), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the terminal device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a container-based information processing method, the method comprising:
judging whether a Container in a DEA module in the terminal is changed or not;
if it is determined that a Container in a DEA module in a terminal changes, sending an update request to a server, wherein the update request comprises Container update information, so that the server updates the content under the temporary node corresponding to the terminal according to the update request and then sends an event notification to a Router module of the terminal in an event manner;
and receiving the event notification sent by the server.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (24)
1. A container-based information processing method, comprising:
receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module is changed, and the update request comprises Container update information;
updating the content under the temporary node corresponding to the terminal according to the updating request;
and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
2. The method according to claim 1, wherein before receiving the update request sent by the terminal, further comprising:
receiving a temporary node registration request sent by the terminal, wherein the temporary node registration request is sent by the terminal when the DEA module is started, and the temporary node registration request comprises the terminal identifier;
and generating a temporary node corresponding to the terminal identifier according to the temporary node registration request.
3. The method according to claim 1, wherein the Container update information includes:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
4. The method according to claim 1, wherein after said sending the event notification to the Router module of the terminal in an event manner according to the update condition of the content in the temporary node corresponding to the terminal, further comprising:
detecting whether the DEA module in the terminal has an abnormal on-hook state or not;
and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state.
5. The method according to any of claims 1-4, further comprising, prior to receiving the update request sent by the terminal:
receiving a monitoring node registration request sent by the terminal;
and generating a monitoring node according to the monitoring node registration request so as to monitor temporary nodes corresponding to all the terminals according to the monitoring node.
6. The method according to claim 5, wherein the sending the event notification to the Router module of the terminal in an event manner according to the update condition of the content in the temporary node corresponding to the terminal comprises:
and when the monitoring node monitors that the temporary node corresponding to the terminal is deleted or created or the Container is deleted or created, sending an event notification to a Router module of the terminal.
7. A container-based information processing method, comprising:
judging whether a Container in a DEA module in the terminal is changed or not;
if it is determined that a Container in a DEA module in a terminal changes, sending an update request to a server, wherein the update request comprises Container update information, so that the server updates the content under the temporary node corresponding to the terminal according to the update request and then sends an event notification to a Router module of the terminal in an event manner;
and receiving the event notification sent by the server.
8. The method according to claim 7, wherein before determining whether the Container in the DEA module in the terminal has changed, further comprising:
when the DEA module is started, a temporary node registration request is sent to the server, wherein the temporary node registration request comprises the terminal identification, so that the server generates a temporary node corresponding to the terminal identification according to the temporary node registration request.
9. The method according to claim 7, wherein the Container update information includes:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
10. The method according to claim 9, further comprising, after said receiving said event notification sent by said server:
if the event represented in the event notification is a Container creation, a Container deletion or a temporary node creation, acquiring Container information in a temporary node corresponding to the terminal in a server, and comparing and analyzing the Container information with prestored Container information to change the content under the temporary node;
or,
and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in the DEA module in the terminal.
11. The method according to any one of claims 7 to 10, wherein before determining whether a change is made in the Container in the DEA module in the terminal, the method further comprises:
and sending a monitoring node registration request to the server so that the server generates monitoring nodes to monitor temporary nodes corresponding to all the terminals according to the monitoring nodes.
12. A container-based information processing apparatus, comprising:
the terminal comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is configured to receive an update request sent by the terminal, the update request is sent when a DEA module in the terminal detects that a Container in the DEA module is changed, and the update request comprises Container update information;
an updating module configured to update contents under a temporary node corresponding to the terminal according to the update request;
and the notification module is configured to send an event notification to the Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
13. The apparatus of claim 12, further comprising:
a second receiving module, configured to receive a temporary node registration request sent by a terminal before the first receiving module receives an update request sent by the terminal, where the temporary node registration request is sent by the terminal when the DEA module is started, and the temporary node registration request includes the terminal identifier;
and the generating module is configured to generate a temporary node corresponding to the terminal identifier according to the temporary node registration request.
14. The apparatus of claim 12, wherein the Container update information comprises:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
15. The apparatus of claim 12, further comprising:
the detection module is configured to detect whether the DEA module in the terminal has an abnormal on-hook state or not after the notification module sends an event notification to the Router module of the terminal in an event mode according to the update condition of the content under the temporary node corresponding to the terminal; and deleting the temporary node corresponding to the terminal when the DEA module is determined to have the abnormal on-hook state.
16. The apparatus according to any one of claims 12-15, further comprising:
a third receiving module configured to receive a listening node registration request sent by a terminal before the first receiving module receives an update request sent by the terminal; and generating a monitoring node according to the monitoring node registration request so as to monitor temporary nodes corresponding to all the terminals according to the monitoring node.
17. The apparatus of claim 16, wherein the notification module is specifically configured to:
and when the monitoring node monitors that the temporary node corresponding to the terminal is deleted or created or the Container is deleted or created, sending an event notification to a Router module of the terminal.
18. A container-based information processing apparatus, comprising:
a determining module configured to determine whether a Container in a DEA module in the terminal is changed;
a sending module, configured to send an update request to a server if it is determined that a Container in a DEA module in a terminal changes, where the update request includes Container update information, so that the server sends an event notification to a Router module of the terminal in an event manner after updating content in a temporary node corresponding to the terminal according to the update request;
a receiving module configured to receive the event notification sent by the server.
19. The apparatus of claim 18, further comprising:
the first registration module is configured to send a temporary node registration request to the server when the DEA module is started before the judgment module judges whether a Container in the DEA module in the terminal changes, wherein the temporary node registration request includes the terminal identifier, so that the server generates a temporary node corresponding to the terminal identifier according to the temporary node registration request.
20. The apparatus of claim 18, wherein the Container update information comprises:
container creation information or Container deletion information;
the event notification characterizes a creation of a Container, or a deletion of a Container, or an update of a Container, or a creation of a temporary node, or a deletion of a temporary node.
21. The apparatus of claim 20, further comprising:
the processing module is configured to, after the receiving module receives the event notification sent by the server, obtain, if an event characterized in the event notification is a Container creation, a Container deletion, or a temporary node creation, Container information in a temporary node corresponding to the terminal in the server, and compare and analyze the Container information with pre-stored Container information to change the content in the temporary node;
or,
and if the event represented in the event notification is the deletion of the temporary node, deleting each Container in the DEA module in the terminal.
22. The apparatus of any one of claims 18-21, further comprising:
and the second registration module is configured to send a monitoring node registration request to the server before the judgment module judges whether the Container in the DEA module in the terminal changes or not, so that the server generates monitoring nodes to monitor temporary nodes corresponding to the terminals according to the monitoring nodes.
23. A server, comprising:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: receiving an update request sent by a terminal, wherein the update request is sent when a DEA module in the terminal detects that a Container in the DEA module changes, and the update request comprises Container update information; updating the content under the temporary node corresponding to the terminal according to the updating request; and sending an event notification to a Router module of the terminal in an event mode according to the updating condition of the content of the temporary node corresponding to the terminal.
24. A terminal, comprising:
a processor, and a memory for storing processor-executable instructions;
wherein the processor is configured to: judging whether a Container in a DEA module in the terminal is changed or not; if it is determined that a Container in a DEA module in a terminal changes, sending an update request to a server, wherein the update request comprises Container update information, so that the server updates the content under the temporary node corresponding to the terminal according to the update request and then sends an event notification to a Router module of the terminal in an event manner; and receiving the event notification sent by the server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710420005.3A CN107276795B (en) | 2017-06-06 | 2017-06-06 | Container-based information processing method and device, server and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710420005.3A CN107276795B (en) | 2017-06-06 | 2017-06-06 | Container-based information processing method and device, server and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107276795A true CN107276795A (en) | 2017-10-20 |
CN107276795B CN107276795B (en) | 2020-06-02 |
Family
ID=60065854
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710420005.3A Active CN107276795B (en) | 2017-06-06 | 2017-06-06 | Container-based information processing method and device, server and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107276795B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108566293A (en) * | 2018-03-06 | 2018-09-21 | 平安科技(深圳)有限公司 | Electronic device, zk node information notification methods and storage medium |
CN109980776A (en) * | 2017-12-28 | 2019-07-05 | 中国电力科学研究院有限公司 | A kind of intelligence distribution transforming system and the systematic difference method |
CN112437146A (en) * | 2020-11-18 | 2021-03-02 | 青岛海尔科技有限公司 | Equipment state synchronization method, device and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104503882A (en) * | 2014-12-25 | 2015-04-08 | 北京京东尚科信息技术有限公司 | Container management method and device |
CN104796465A (en) * | 2015-04-08 | 2015-07-22 | 广州杰赛科技股份有限公司 | Method and system for processing business of cloud platforms |
US20160055017A1 (en) * | 2014-08-23 | 2016-02-25 | Vmware, Inc. | Application publishing using memory state sharing |
EP3056993A1 (en) * | 2015-02-16 | 2016-08-17 | International Business Machines Corporation | Enabling an on-premises resource to be exposed to a public cloud application securely and seamlessly |
CN106548288A (en) * | 2016-11-04 | 2017-03-29 | 环球大数据科技有限公司 | The polymorphic instance management system and method for many scenes of electric power |
-
2017
- 2017-06-06 CN CN201710420005.3A patent/CN107276795B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160055017A1 (en) * | 2014-08-23 | 2016-02-25 | Vmware, Inc. | Application publishing using memory state sharing |
CN104503882A (en) * | 2014-12-25 | 2015-04-08 | 北京京东尚科信息技术有限公司 | Container management method and device |
EP3056993A1 (en) * | 2015-02-16 | 2016-08-17 | International Business Machines Corporation | Enabling an on-premises resource to be exposed to a public cloud application securely and seamlessly |
CN104796465A (en) * | 2015-04-08 | 2015-07-22 | 广州杰赛科技股份有限公司 | Method and system for processing business of cloud platforms |
CN106548288A (en) * | 2016-11-04 | 2017-03-29 | 环球大数据科技有限公司 | The polymorphic instance management system and method for many scenes of electric power |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109980776A (en) * | 2017-12-28 | 2019-07-05 | 中国电力科学研究院有限公司 | A kind of intelligence distribution transforming system and the systematic difference method |
CN108566293A (en) * | 2018-03-06 | 2018-09-21 | 平安科技(深圳)有限公司 | Electronic device, zk node information notification methods and storage medium |
WO2019169762A1 (en) * | 2018-03-06 | 2019-09-12 | 平安科技(深圳)有限公司 | Electronic device, zk node information notification method, system, and storage medium |
CN108566293B (en) * | 2018-03-06 | 2021-05-18 | 平安科技(深圳)有限公司 | Electronic device, zk node information notification method, and storage medium |
CN112437146A (en) * | 2020-11-18 | 2021-03-02 | 青岛海尔科技有限公司 | Equipment state synchronization method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN107276795B (en) | 2020-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109219036B (en) | Method and device for unbinding equipment and electronic equipment | |
CN107094094B (en) | Application networking method and device and terminal | |
CN106454998B (en) | Wireless local area network access method, device and terminal | |
CN109314913B (en) | Access control limiting method and device | |
CN107423394A (en) | Page display method and device | |
CN109814942B (en) | Parameter processing method and device | |
CN107276795B (en) | Container-based information processing method and device, server and terminal | |
CN106302528B (en) | Short message processing method and device | |
CN111241134B (en) | Data processing method and device | |
CN104618987B (en) | Access the method and device of network | |
CN104010065A (en) | Telephone processing method and device | |
CN112256424B (en) | Virtual resource processing method, device and system, electronic equipment and storage medium | |
CN106658412B (en) | Positioning method and device | |
CN106506808B (en) | Method and device for prompting communication message | |
CN109885360B (en) | Data processing method, device and storage medium | |
CN110764847A (en) | User information processing method and device, electronic equipment and storage medium | |
CN107070816B (en) | Application identification method and device and mobile terminal | |
CN107172199B (en) | State updating method and device of mobile terminal | |
CN106648392B (en) | The method and device of pasting data | |
CN104994211A (en) | Incoming call prompting method, device and system | |
CN106060104B (en) | Application management method and device | |
CN110995767B (en) | Request processing method and device | |
CN109948012B (en) | Serial number generation method and device and storage medium | |
CN108811080B (en) | Method, device and storage medium for cell registration | |
CN113420205A (en) | Method and device for determining sharing source account, terminal equipment and server |
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 |