CN109375966B - Method, device and equipment for initializing node and storage medium - Google Patents

Method, device and equipment for initializing node and storage medium Download PDF

Info

Publication number
CN109375966B
CN109375966B CN201810879491.XA CN201810879491A CN109375966B CN 109375966 B CN109375966 B CN 109375966B CN 201810879491 A CN201810879491 A CN 201810879491A CN 109375966 B CN109375966 B CN 109375966B
Authority
CN
China
Prior art keywords
node
feedback information
page
information
current page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810879491.XA
Other languages
Chinese (zh)
Other versions
CN109375966A (en
Inventor
吕小豹
张斌
潘魏增
郑文兵
袁章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201810879491.XA priority Critical patent/CN109375966B/en
Publication of CN109375966A publication Critical patent/CN109375966A/en
Priority to PCT/CN2019/098814 priority patent/WO2020025016A1/en
Application granted granted Critical
Publication of CN109375966B publication Critical patent/CN109375966B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/545Gui

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a method, a device, equipment and a storage medium for node initialization, wherein the method comprises the following steps: broadcasting application information for applying for initializing a node of a current page as a main node; reading feedback information, wherein the feedback information is information fed back after a previous main node page receives the application information when the previous main node page exists; and initializing the node of the current page in response to the reading result of the feedback information. The node of the current page is initialized in response to the reading result of the feedback information, so that the unique main node page in the application program can be always kept, a token preemption mechanism is not needed, the communication time difference does not exist, the problem that the memory of the system is wasted due to repeated processing of information caused by the simultaneous existence of two main node pages can be avoided, and the main node page does not need to be frequently destroyed and rebuilt, so that the performance of the system can be improved.

Description

Method, device and equipment for initializing node and storage medium
Technical Field
The present application relates to the field of network application technologies, and in particular, to a method, an apparatus, a device, and a storage medium for node initialization.
Background
Currently, in a multi-page communication scheme, a master node page (i.e., a page containing a node for communication as a master node) and a plurality of slave node pages (i.e., pages containing a node for communication as a slave node) are generally determined. Furthermore, the determined master node page can be used for directly communicating with the server, and other slave node pages do not directly communicate with the server but indirectly communicate with the server through the master node page, so that the pressure of the server can be relieved.
In the prior art, a "token preemption mechanism" is usually adopted to initialize a node of a newly opened page as a master node, that is, to make the newly opened page become a master node page, where the "node initialization" is different from the "page initialization" performed when the page is opened. However, in this way, there is a communication time difference between "a newly opened page occupies a token" and "a previous master node page receives a notification to downgrade to a slave node page", so that two master node pages exist in this period of time, and further, the two master node pages repeatedly process messages sent from the slave node pages, which wastes the memory of the system.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, a device, and a storage medium for node initialization, so as to solve the problems in the existing scheme for determining a master node.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a method for node initialization is provided, including:
broadcasting application information for applying for initializing a node of a current page as a main node;
reading feedback information, wherein the feedback information is information fed back after a previous main node page receives the application information when the previous main node page exists;
and initializing the node of the current page in response to the reading result of the feedback information.
In an embodiment, the broadcast target of the application information includes the current page, and the reading of the feedback information includes:
and if the current page receives the application information, executing the operation of reading the feedback information.
In an embodiment, if the current page receives the application information, the operation of reading the feedback information is executed, further including:
after the current page receives the application information, broadcasting confirmation information for confirming that the prior host node page feeds back the feedback information;
and after the current page receives the confirmation information, executing the operation of reading the feedback information.
In an embodiment, the initializing the node of the current page in response to reading the read result of the feedback information includes:
if the feedback information is not successfully read, initializing the node of the current page as a main node;
and if the feedback information is successfully read, initializing the node of the current page as a slave node.
In an embodiment, if the feedback information is successfully read, initializing the node of the current page to be a slave node, and the method further includes:
and deleting the feedback information.
In an embodiment, the reading the feedback information includes:
and waiting for a preset time, and executing the operation of reading the feedback information.
According to a second aspect of the present application, an apparatus for node initialization is provided, including:
the application information broadcasting module is used for broadcasting application information for applying to initialize the node of the current page as the main node;
the feedback information reading module is used for reading feedback information, wherein the feedback information is information which is fed back after the previous main node page receives the application information when the previous main node page exists;
and the node initialization module is used for initializing the node of the current page in response to the reading result of the feedback information.
In an embodiment, the broadcast target of the application information includes the current page, and the feedback information reading module is further configured to execute the operation of reading the feedback information when the current page receives the application information.
According to a third aspect of the present application, an apparatus for node initialization is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the above methods for node initialization when executing the program.
According to a fourth aspect of the present application, a computer-readable storage medium is proposed, the storage medium storing a computer program for performing any of the above-described methods of node initialization.
According to the technical scheme, the nodes of the current page are initialized in response to the reading result of the read feedback information, so that the unique main node page in the application program can be always kept, a token preemption mechanism is not needed, the communication time difference does not exist, the problem of repeated information processing and waste of system memory caused by the simultaneous existence of two main node pages can be solved, the main node pages are not needed to be frequently destroyed and rebuilt, and the performance of the system can be improved.
Drawings
FIG. 1A is a schematic diagram of a node structure of a multi-page communication scheme, according to an exemplary embodiment;
FIG. 1B is a flow chart illustrating a method for node initialization according to an exemplary embodiment of the present application;
fig. 2 is a flowchart illustrating how to read feedback information based on the manner in which acknowledgement information is broadcast according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart of a method of node initialization as shown in yet another exemplary embodiment of the present application;
FIG. 4 is a block diagram illustrating an apparatus for node initialization according to an exemplary embodiment of the present application;
fig. 5 is a block diagram illustrating an apparatus for node initialization according to yet another exemplary embodiment of the present application;
fig. 6 is a block diagram illustrating an apparatus for node initialization according to an exemplary embodiment of the present application.
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 application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
FIG. 1A is a schematic diagram of a node structure of a multi-page communication scheme, according to an exemplary embodiment; as shown in fig. 1A, a master node page (i.e., a page containing a node for communication as a master node) 001 and a plurality of slave node pages (i.e., pages containing a node for communication as a slave node) 002 are generally determined in the current multi-page communication scheme. Furthermore, the determined master node page 001 can be used to directly communicate with the server 003, while the other slave node pages 002 do not directly communicate with the server 003, but indirectly communicate with the server 003 through the master node page 001, thereby relieving the stress on the server 003.
In the prior art, a "token preemption mechanism" is usually adopted to initialize a node of a newly opened page 004 as a master node, that is, each time an application opens a new page, the currently newly opened page preempts a token to become a new master node page, and simultaneously notifies a previous master node page to downgrade the page to a slave node page. And when the newly opened main node page is closed, returning the token, and further notifying the previous main node again to upgrade the page to the main node page again.
However, in this way, there is a time difference between "a newly opened page occupies a token" and "a previous master node page receives a notification to downgrade to a slave node", so that two master node pages exist in this time, and then the two master node pages repeatedly process messages sent from the slave node pages, which wastes the memory of the system.
In view of the above, the present application provides a method, an apparatus, a device, and a storage medium for node initialization, so as to solve the problems in the existing scheme for determining a master node.
FIG. 1B is a flow chart illustrating a method for node initialization according to an exemplary embodiment of the present application; the embodiment can be used for application programs installed in terminal equipment (such as a mobile phone, a tablet computer, a personal computer and the like). As shown in FIG. 1B, the method includes steps S101-S103:
in step S101: and broadcasting application information for applying for initializing the node of the current page as the main node.
It should be noted that the "node of a page" in the present application may be a "communication node" implemented by a code in the page to which the node belongs, and is used for implementing a communication function of the page, and through the node, the page to which the node belongs may implement communication with other pages and with a server.
In an embodiment, when the application program opens the current page, or a user performs a preset operation on the opened current page, the application program may broadcast application information for applying to initialize a node of the current page as a master node.
In an embodiment, the preset operation may include clicking an image (e.g., a customer service avatar) or a preset text displayed in the current page, which is not limited in this embodiment.
It should be noted that the content of the application information may be set by a developer according to actual business needs, for example, set as a specific symbol, numerical value, or character string, and this embodiment is not limited thereto.
In step S102: and reading the feedback information.
And when the feedback information exists in the page of the prior host node, the page of the prior host node receives the feedback information after the application information.
In an embodiment, after the application broadcasts application information for applying for initializing a node of a current page as a master node, if a previous master node page exists, the previous master node page may receive the application information, and write feedback information in a preset location (e.g., in the local of a terminal device that installs the application, or in a database of a server) in response to the application information. Further, the application program may perform an operation of reading the feedback information.
For example, the application program may call a preset processing function to read the feedback information from the local.
It should be noted that, in actual implementation, a developer may select an existing processing function meeting a service requirement according to needs, and this embodiment does not limit this.
In one embodiment, to ensure that the feedback information is written first in the previous master node page and read after the current page, reference may be made to the embodiment shown in fig. 2 described below, which will not be described in detail herein.
In step S103: and initializing the node of the current page in response to the reading result of the feedback information.
In an embodiment, after the application program performs the operation of "reading the feedback information", a reading result of "successfully reading the feedback information" may be obtained, or a reading result of "unsuccessfully reading the feedback information" may be obtained.
In an embodiment, after obtaining the different reading results, the application program may initialize the node of the current page based on different initialization modes in response to the obtained reading results, so that the current page becomes a master node page or a slave node page, and a unique master node page exists in the application program.
In an embodiment, a manner of initializing the node of the current page in response to reading the read result of the feedback information may also refer to the embodiment shown in fig. 3, which is not described in detail herein first.
As can be seen from the above description, in this embodiment, the node for applying for initializing the current page as the application information of the master node through broadcasting, and reading the feedback information, where the feedback information is information fed back after the previous master node page receives the application information when the previous master node page exists, and then initializing the node of the current page in response to the reading result of the feedback information, because the node of the current page is initialized in response to the reading result of the feedback information, it is possible to always keep that the unique master node page exists in the application program, and it is not necessary to adopt a "token preemption mechanism", so there is no communication time difference, it is possible to avoid the problem that information repeated processing caused by the simultaneous existence of two master node pages wastes the memory of the system, and it is not necessary to frequently destroy and reconstruct the master node page, and thus the performance of the system can be improved.
On the basis of the above embodiment, the following three ways may be adopted to ensure that "the feedback information is written into the page of the previous master node first, and the feedback information is read after the current page". In the first and second manners, the broadcast target of the application information may include a current page (that is, the current page may register monitoring of the application information in advance), and the reading of the feedback information in step S102 may include the following step S102':
in step S102': and if the current page receives the application information, executing the operation of reading the feedback information.
In a first mode:
a "message registration-publishing mechanism based on the W3C (World Wide Web Consortium) event model standard" may be employed to ensure that "the feedback information is written first in the previous master node page and read after the current page". The mechanism is actually a "register first and execute first" mechanism, that is, a page that registers first and listens to application information can execute a preset operation first (for example, call a function for reading feedback information or call a function for writing feedback information).
For example, if a previous master node page currently exists, for the current page, the previous master node page is registered and monitored first, so that the previous master node page may receive the broadcast application information first, and call a callback function of the previous master node page first, and write the feedback information into a preset position; then, after the current page receives the broadcasted application information, it can be determined that the previous master node page has performed the operation of writing the feedback information, and then the current page can perform the operation of reading the feedback information.
The second mode is as follows: if the communication is performed in the 'concurrent communication' mode, the feedback information can be ensured to be written into the previous master node page first and read from the current page later by the 'broadcast confirmation information' mode after the application information is broadcast and the current page receives the broadcast application information.
Fig. 2 is a flowchart illustrating how to read feedback information based on the manner in which acknowledgement information is broadcast according to an exemplary embodiment of the present application. As shown in fig. 2, the step S102' of executing the operation of reading the feedback information if the current page receives the application information may include the following steps S201 to S202:
in step S201: after the current page receives the application information, broadcasting confirmation information for confirming that the prior host node page feeds back the feedback information;
in step S202: and after the current page receives the confirmation information, executing the operation of reading the feedback information.
In an embodiment, after the current page receives the application information, a confirmation message may be broadcast, where the confirmation message is used to confirm that the current page of the previous master node has completed the write operation of the "feedback information", and then the operation of reading the feedback information may be executed after the current page receives the confirmation message.
In an embodiment, the content of the confirmation information may be set by a developer according to actual business needs, for example, set to a specific symbol, numerical value, or character string, which is not limited in this embodiment.
It should be noted that, in this embodiment, the current page registers monitoring of the confirmation information in addition to monitoring of the application information. In this way, after the application information is broadcasted, the application information may not be received successively on the first master node page and the current page (i.e., the application information is not necessarily received after being known earlier). In this case, in order to ensure that "the previous master node page writes the feedback information first, and the current page reads the feedback information later", after the current page receives the application information, a confirmation message may be broadcast to allow enough time for the previous page to perform the operation of writing the feedback information. Further, after the current page receives the broadcasted confirmation information, it may be determined that the previous master node page has performed the operation of writing the feedback information, and then the operation of reading the feedback information may be performed.
The third mode is as follows: and waiting for a preset time, and executing the operation of reading the feedback information.
Different from the first manner and the second manner, in this manner, the current page does not need to register monitoring of the application information, but after the application information for applying for initializing the node of the current page as the master node is broadcast in step S101, the operation of reading the feedback information is executed after waiting for a preset time.
It should be noted that the preset time may be set by a developer according to actual needs or business experiences, which is not limited in this embodiment.
As can be seen from the above description, through the above three ways, it can be ensured that, in the case where a previous master node page currently exists, the previous master node page has already received the application information, and after the feedback information is written, the operation of reading the feedback information is executed, so that it can be avoided that the operation of "reading the feedback information" is earlier than the operation of "writing the feedback information in the previous master node page" and thus the feedback information reading fails.
FIG. 3 is a flow chart of a method of node initialization as shown in yet another exemplary embodiment of the present application; the embodiment can be used for application programs installed in terminal equipment (such as a mobile phone, a tablet computer, a personal computer and the like). As shown in fig. 3, the method comprises steps S301-S306:
in step S301: broadcasting application information for applying for initializing a node of a current page as a main node;
in step S302: reading feedback information, wherein the feedback information is information fed back after a previous main node page receives the application information when the previous main node page exists;
for the explanation and explanation of steps S301 to S302, reference may be made to the above embodiments, which are not described herein again.
In step S303: determining whether the feedback information is read successfully: if yes, go to step S304; if not, go to step S306.
In step S304: initializing the node of the current page as a slave node.
In an embodiment, if the application program successfully reads the feedback information, it may be determined that a previous master node page already exists currently, and thus a node of the current page may be initialized to a slave node to maintain that a unique master node page exists in the application program.
In an embodiment, after initializing the node of the current page as a slave node, the current page may communicate with the server through a current existing previous master node page.
For example, if the current page needs to send information to the server, the current page may send information to be sent to a previous master node page by using a communication channel (e.g., a channel between a master node and a slave node) pre-constructed in the application program, so as to send the information to be sent to the server through the previous master node page; similarly, if the server needs to send information to the current page, the server may send the information to be sent to the previous host node page, and then the previous host node page may send the information to be sent to the current page by using the communication channel.
In step S305: and deleting the feedback information.
In an embodiment, after the feedback information is successfully read and the node of the current page is initialized to the slave node, the feedback information may be deleted from the location (e.g., in the local area of the terminal device or in the database of the server) where the feedback information is written.
It should be noted that after initializing the node of the current page as the slave node, the feedback information is deleted in time, so that the situation that the application program is forcibly exited (for example, the user forcibly kills the APP or the terminal device is powered off) and the like can be avoided, and the failed feedback information influences the initialization of the new page to become the master node page.
In step S306: initializing the node of the current page as a master node.
In an embodiment, if the application program does not successfully read the feedback information, it may be determined that a previous master node page does not exist currently, and therefore, a node of a current page may be initialized to a master node, so that the current page becomes a master node page, and a unique master node page exists in the application program.
In an embodiment, after initializing the node of the current page as the master node, the current page may directly establish a connection with the server and perform communication.
In an embodiment, a long connection may be established between the master node page and the server, and further, communication may be performed with the server based on the established long connection.
It should be noted that, as for the specific manner of initializing the node of the current page, reference may be made to the existing technical solution for initializing the node, which is not limited in this embodiment.
As can be seen from the above description, in this embodiment, application information for applying for initializing a node of a current page as a master node is broadcasted, and feedback information is read, and then when the feedback information is unsuccessfully read, the node of the current page is initialized as the master node, or when the feedback information is successfully read, the node of the current page is initialized as a slave node, so that different node initialization modes can be adopted for the current page in response to different feedback information reading results, so as to keep that a unique master node page exists in an application program, avoid wasting a system memory by having two master node pages at the same time, and improve the system performance to a certain extent.
FIG. 4 is a block diagram illustrating an apparatus for node initialization according to an exemplary embodiment of the present application; as shown in fig. 4, the apparatus may include: an application information broadcasting module 110, a feedback information reading module 120, and a node initialization module 130, wherein:
an application information broadcasting module 110, configured to broadcast application information for applying to initialize a node of a current page as a host node;
a feedback information reading module 120, configured to read feedback information, where the feedback information is information that is fed back after a previous master node page receives the application information when the previous master node page exists;
a node initialization module 130, configured to initialize a node of the current page in response to the reading result of the feedback information.
As can be seen from the above description, in this embodiment, the node for applying for initializing the current page as the application information of the master node through broadcasting, and reading the feedback information, where the feedback information is information fed back after the previous master node page receives the application information when the previous master node page exists, and then initializing the node of the current page in response to the reading result of the feedback information, because the node of the current page is initialized in response to the reading result of the feedback information, it is possible to always keep that the unique master node page exists in the application program, and it is not necessary to adopt a "token preemption mechanism", so there is no communication time difference, it is possible to avoid the problem that information repeated processing caused by the simultaneous existence of two master node pages wastes the memory of the system, and it is not necessary to frequently destroy and reconstruct the master node page, and thus the performance of the system can be improved.
Fig. 5 is a block diagram illustrating an apparatus for node initialization according to yet another exemplary embodiment of the present application; the application information broadcasting module 210, the feedback information reading module 220, and the node initializing module 230 have the same functions as the application information broadcasting module 110, the feedback information reading module 120, and the node initializing module 130 in the embodiment shown in fig. 4, and are not described herein again.
As shown in fig. 5, the broadcast target of the application information may further include the current page. On this basis, the feedback information reading module 220 may be further configured to execute the operation of reading the feedback information when the current page receives the application information.
In an embodiment, the feedback information reading module 220 may further include:
a confirmation information broadcasting unit 221, configured to broadcast, after the current page receives the application information, confirmation information that can be used to confirm that the previous master node page has fed back the feedback information;
the feedback information reading unit 222 may be configured to execute the operation of reading the feedback information after the current page receives the acknowledgment information.
In an embodiment, the node initialization module 230 may include:
the master node initializing unit 231 may be configured to initialize the node of the current page as the master node when the feedback information is not successfully read;
the slave node initializing unit 233 may be configured to initialize the node of the current page as a slave node when the feedback information is successfully read.
In an embodiment, the node initialization module 230 may further include:
the feedback information deleting unit 234 may be configured to delete the feedback information.
In an embodiment, the feedback information reading module 220 may be further configured to wait for a preset time to perform an operation of reading the feedback information.
It should be noted that, all the above-mentioned optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described in detail herein.
Embodiments of the node initialization apparatus of the present invention may be applied to a network device. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a device in a logical sense, the device is formed by reading, by a processor of a device in which the device is located, a corresponding computer program instruction in a nonvolatile memory into an internal memory for running, where the computer program may be used to execute the method for initializing a node provided in the embodiments shown in fig. 1B to fig. 3. From a hardware level, as shown in fig. 6, a hardware structure diagram of the device for initializing the node according to the present invention is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 6, the device may generally include other hardware, such as a forwarding chip responsible for processing a packet, and the like; the device may also be a distributed device in terms of hardware structure, and may include multiple interface cards to facilitate expansion of message processing at the hardware level. On the other hand, the present application also provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program may be used to execute the method for initializing a node provided in the embodiments shown in fig. 1B to fig. 3.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Other embodiments of the present application 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 application 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 application being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A method for initializing a node is characterized in that a current page registers monitoring for application information in advance, and the method comprises the following steps:
broadcasting application information for applying for initializing a node of a current page as a main node; the node is used for realizing communication between the current page and other pages and between the current page and a server side;
if the current page receives the application information, reading feedback information, wherein the feedback information is information fed back by a previous main node page after the previous main node page receives the application information when the feedback information exists in the previous main node page; the feedback information is written into a local terminal where the application program for opening the current page is installed; the prior host node page registers monitoring on the application information before the current page;
and initializing the node of the current page in response to the reading result of the feedback information.
2. The method of claim 1, wherein if the current page receives the application information, performing the operation of reading the feedback information, further comprising:
after the current page receives the application information, broadcasting confirmation information for confirming that the prior host node page feeds back the feedback information;
and after the current page receives the confirmation information, executing the operation of reading the feedback information.
3. The method of claim 1, wherein initializing the node of the current page in response to reading the result of reading the feedback information comprises:
if the feedback information is not successfully read, initializing the node of the current page as a main node;
and if the feedback information is successfully read, initializing the node of the current page as a slave node.
4. The method of claim 3, wherein if the feedback information is successfully read, initializing the node of the current page to be behind a slave node, the method further comprising:
and deleting the feedback information.
5. The method according to any of claims 1-4, wherein reading the feedback information comprises:
and waiting for a preset time, and executing the operation of reading the feedback information.
6. An apparatus for node initialization, comprising:
the application information broadcasting module is used for broadcasting application information for applying to initialize the node of the current page as the main node; the node is used for realizing communication between the current page and other pages and between the current page and a server side; the current page registers monitoring of the application information in advance;
a feedback information reading module, configured to read feedback information if the current page receives the application information, where the feedback information is information that is fed back by a previous host node page after receiving the application information when the previous host node page exists; the feedback information is written into a local terminal where the application program for opening the current page is installed; the prior host node page registers monitoring on the application information before the current page;
and the node initialization module is used for initializing the node of the current page in response to the reading result of the feedback information.
7. An apparatus for node initialization, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the method for node initialization according to any of the claims 1-5.
8. A computer-readable storage medium, characterized in that the storage medium stores a computer program for performing the method of node initialization according to any of the preceding claims 1-5.
CN201810879491.XA 2018-08-03 2018-08-03 Method, device and equipment for initializing node and storage medium Active CN109375966B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810879491.XA CN109375966B (en) 2018-08-03 2018-08-03 Method, device and equipment for initializing node and storage medium
PCT/CN2019/098814 WO2020025016A1 (en) 2018-08-03 2019-08-01 Node initialization for multipage communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810879491.XA CN109375966B (en) 2018-08-03 2018-08-03 Method, device and equipment for initializing node and storage medium

Publications (2)

Publication Number Publication Date
CN109375966A CN109375966A (en) 2019-02-22
CN109375966B true CN109375966B (en) 2020-07-03

Family

ID=65403798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810879491.XA Active CN109375966B (en) 2018-08-03 2018-08-03 Method, device and equipment for initializing node and storage medium

Country Status (2)

Country Link
CN (1) CN109375966B (en)
WO (1) WO2020025016A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375966B (en) * 2018-08-03 2020-07-03 北京三快在线科技有限公司 Method, device and equipment for initializing node and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911524A (en) * 2017-04-27 2017-06-30 紫光华山信息技术有限公司 A kind of HA implementation methods and device
CN107800666A (en) * 2016-09-02 2018-03-13 中兴通讯股份有限公司 The processing method and processing device of content of pages, master node, slave node
CN108156236A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Service request processing method, device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9960964B2 (en) * 2014-02-18 2018-05-01 Cellos Software Ltd System, method and apparatus to manage services in a network
CN104461632B (en) * 2014-12-09 2017-06-16 东软集团股份有限公司 A kind of Web App loading methods and device
US9401908B1 (en) * 2015-01-22 2016-07-26 Oracle International Corporation Authentication interworking in communications networks
CN105117162B (en) * 2015-09-15 2018-04-10 广东欧珀移动通信有限公司 A kind of application program page switching method and user terminal
CN105933391B (en) * 2016-04-11 2019-06-21 聚好看科技股份有限公司 A kind of node expansion method, apparatus and system
CN109375966B (en) * 2018-08-03 2020-07-03 北京三快在线科技有限公司 Method, device and equipment for initializing node and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800666A (en) * 2016-09-02 2018-03-13 中兴通讯股份有限公司 The processing method and processing device of content of pages, master node, slave node
CN106911524A (en) * 2017-04-27 2017-06-30 紫光华山信息技术有限公司 A kind of HA implementation methods and device
CN108156236A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Service request processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109375966A (en) 2019-02-22
WO2020025016A1 (en) 2020-02-06

Similar Documents

Publication Publication Date Title
CN103501340B (en) Information push method, device and client
CN103152390B (en) The node configuration method of distributed memory system, device, node and system
CN102360298B (en) Software upgrading method of terminal equipment
CN109558160A (en) Upgrade method, embedded system
CN109361525B (en) Method, device, control terminal and medium for restarting distributed deployment of multiple services
CN104216793A (en) Application program backing up and restoring method and device
CN102447650A (en) Consistent messaging with replication
CN102830984A (en) Method for updating firmware, chip and communication terminal
CN106713392B (en) Data synchronization method, device and system
EP4071609A1 (en) Node management method, device and apparatus, storage medium, and system
CN110442502B (en) Point burying method, device, equipment and storage medium
CN103514173A (en) Data processing method and node equipment
CN103268183A (en) Processing method and device for information report
CN110602165A (en) Government affair data synchronization method, device, system, computer equipment and storage medium
CN103677988A (en) Multi-process communication method and system for software system
CN103535015A (en) Management method of public network address resource, terminal control protocol server and client
CN109375966B (en) Method, device and equipment for initializing node and storage medium
CN106155746A (en) Installation file processing method and device and server
CN112291082A (en) Computer room disaster recovery processing method, terminal and storage medium
CN107094085B (en) Signaling transmission method and device
CN112860787A (en) Method for switching master nodes in distributed master-slave system, master node device and storage medium
CN108241616B (en) Message pushing method and device
CN112153146B (en) Operation notification method and apparatus, storage medium, and electronic apparatus
CN105989096A (en) Account information clearing method and apparatus
CN111506388A (en) Container performance detection method, container management platform and computer storage medium

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