CN112968951B - Service node connection method and device, storage medium and electronic device - Google Patents

Service node connection method and device, storage medium and electronic device Download PDF

Info

Publication number
CN112968951B
CN112968951B CN202110143003.0A CN202110143003A CN112968951B CN 112968951 B CN112968951 B CN 112968951B CN 202110143003 A CN202110143003 A CN 202110143003A CN 112968951 B CN112968951 B CN 112968951B
Authority
CN
China
Prior art keywords
link
user context
service
timing task
time
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
CN202110143003.0A
Other languages
Chinese (zh)
Other versions
CN112968951A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110143003.0A priority Critical patent/CN112968951B/en
Publication of CN112968951A publication Critical patent/CN112968951A/en
Application granted granted Critical
Publication of CN112968951B publication Critical patent/CN112968951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Abstract

The invention provides a method and a device for connecting service nodes, a storage medium and an electronic device, wherein the method comprises the following steps: starting a first timing task under the condition that the user context is determined to exceed a first time threshold value and a service interface is not called; under the condition that the first timed task is started successfully, the first timed task calls a service interface to receive the links of at least two service nodes; in the event that the user context is determined to be in an idle state, a link is sent by the first timing task to the user context to instruct the user context to connect with the service node to which the link points. The invention solves the problems of service request processing delay and even service rejection caused by untimely processing of the service requests of a plurality of service nodes by one user context.

Description

Service node connection method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for connecting service nodes, a storage medium, and an electronic apparatus.
Background
In the prior art, a user context (ContextUser) and a service node are in a one-to-one correspondence relationship, that is, one user context is connected with one service node, and a service request of the corresponding service node is processed by the corresponding user context, which causes a problem of resource waste.
If a user context can be connected with a plurality of service nodes in sequence, the problem of resource waste can be solved, but if the user context does not process the service request timely, the service request processing is delayed, and even the service is rejected.
In the related art, an effective solution is not available at present for the problem of delayed service request processing and even service denial caused by untimely service request processing of a plurality of service nodes by one user context.
Disclosure of Invention
The embodiment of the invention provides a service node connection method and device, a storage medium and an electronic device, which are used for at least solving the problem of untimely processing caused by processing the requests of a plurality of service nodes by one user context in the related art.
According to an embodiment of the present invention, there is provided a connection method of a service node, including: starting a first timing task under the condition that the user context is determined to exceed a first time threshold value and a service interface is not called; under the condition that the first timing task is started successfully, the first timing task calls the service interface to receive the links of at least two service nodes; and under the condition that the user context is determined to be in an idle state, the link is sent to the user context by the first timing task so as to indicate the user context to be connected with the service node pointed by the link.
Optionally, the method further comprises: in an instance in which it is determined that a first link points to a target service node, storing the first link to a first queue in the first timed task, wherein the link comprises the first link; sending, by the first timing task, the first link to the user context to indicate that the user context is connected with the target service node pointed to by the first link, in a case where it is determined that the user context is in an idle state.
Optionally, the method further comprises: under the condition that a second link is determined to point to other service nodes, if the user context is in an idle state, the second link is sent to the user context to indicate the user context to be connected with the other service nodes pointed by the second link, wherein the link comprises the second link; or, under the condition that it is determined that the second link points to other service nodes, if the user context is not in an idle state, starting a second timing task, and receiving the second link by the second timing task.
Optionally, after the receiving of the second link by the second timing task, the method further comprises: and under the condition that the user context is determined to be in the idle state, the second timing task sends the second link to the user context so as to indicate the user context to be connected with the other service nodes pointed by the second link.
Optionally, the method further comprises: determining a first time at which the user context begins in the idle state and a second time at which the first timing task is initiated; and increasing the first time threshold when the time difference between the first time and the second time is less than or equal to a second time threshold and the number of other links received by the first timing task in a time period corresponding to the time difference is less than or equal to a preset value, wherein the other links are links except the first link.
Optionally, the method further comprises: determining a first time at which the user context starts to be in the idle state and a second time at which the first timing task is started; and continuing to call the service interface by the first timing task to receive the link of the at least two service nodes if the time difference between the first time and the second time is greater than or equal to a third time threshold.
Optionally, the method further comprises: adjusting the first time threshold if the starting of the first timing task fails.
According to another embodiment of the present invention, there is provided a connection apparatus of a service node, including: the starting module is used for starting a first timing task under the condition that the user context is determined to exceed a first time threshold value and a service interface is not called; a receiving module, configured to, when the first timed task is successfully started, invoke the service interface by the first timed task to receive a link of at least two service nodes; and the sending module is used for sending the link to the user context by the first timing task under the condition that the user context is determined to be in an idle state so as to indicate that the user context is connected with the service node pointed by the link.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the first timing task is started under the condition that the service interface is not called when the user context is determined to exceed the first time threshold; under the condition that the first timed task is started successfully, the first timed task calls a service interface to receive the links of at least two service nodes; in the event that the user context is determined to be in an idle state, a link is sent by the first timing task to the user context to instruct the user context to connect with the service node to which the link points. Therefore, the problems of service request processing delay and even service rejection caused by the fact that one user context does not process the service requests of a plurality of service nodes in time can be solved, and the effects that one user context can process the service requests of a plurality of service nodes and resources are saved are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a method for connecting a service node according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a connection of a service node according to an embodiment of the invention;
FIG. 3 is a system framework diagram according to an embodiment of the invention;
FIG. 4 is a first schematic diagram illustrating a connection flow of a service node according to an embodiment of the present invention;
FIG. 5 is a second schematic diagram illustrating a connection flow of a service node according to an embodiment of the present invention;
fig. 6 is a block diagram of a connection apparatus of a service node according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the operation on a mobile terminal, fig. 1 is a hardware structure block diagram of the mobile terminal of a method for connecting a service node according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used for storing computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the connection method of the service node in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a connection method of a service node operating in the mobile terminal is provided, and fig. 2 is a flowchart of connection of the service node according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, under the condition that the user context is determined to exceed a first time threshold value and a service interface is not called, starting a first timing task;
step S204, under the condition that the first timing task is started successfully, the first timing task calls the service interface to receive the links of at least two service nodes;
step S206, when it is determined that the user context is in an idle state, the first timing task sends the link to the user context to indicate that the user context is connected to the service node pointed by the link.
Through the steps, the first timing task is started under the condition that the service interface is not called by determining that the user context exceeds the first time threshold; under the condition that the first timed task is started successfully, the first timed task calls a service interface to receive the links of at least two service nodes; in the event that the user context is determined to be in an idle state, a link is sent by the first timing task to the user context to indicate that the user context is connected with a target serving node pointed to by the link. Therefore, the problems of service request processing delay and even service rejection caused by untimely processing of the service requests of a plurality of service nodes by one user context can be solved, and the effects that the service requests of a plurality of service nodes can be processed by one user context and resources are saved are achieved.
Alternatively, the execution subject of the above steps may be a terminal or the like, but is not limited thereto.
As an alternative implementation, fig. 3 is a schematic diagram of a system framework according to an alternative embodiment of the present invention, where a user context ContextUser is included, and the ContextStack may be a non-resident thread. The figure includes serving nodes SrvA1, SrvA2, and SrvB. The user context ContextUser is configured to process service requests of SrvA1, SrvA2, and SrvB, where the service nodes SrvA1, SrvA2, and SrvB are merely used to illustrate this embodiment, one user context may correspond to multiple service nodes, and the number of the service nodes may be determined according to actual situations, and may be, for example, 10 service nodes, 100 service nodes, and the like.
As an optional embodiment, the Service interface corresponds to a Service _ Accept interface, and the Service _ Online interface is called to successfully bind to a Service bus with the address of 'TCP:// Localhost: 5395'. As shown in fig. 4, which is a schematic diagram of a connection flow of a Service node according to an alternative embodiment of the present invention, in a sub-process Service _ ASB _ Create, a Service _ ASB _ AcceptTimerStart interface is called, a timer may be started, and if the user context ContextUser exceeds a first time threshold and does not call the Service _ acceptservice interface, a sub-process first timing task Service _ ASB _ accepttimerstask is started. The first time threshold may be determined according to actual conditions, for example, 20 ms, 200ms, etc., and the magnitude of the specific value may be determined according to actual conditions.
Optionally, the method further comprises: in an instance in which it is determined that a first link points to a target service node, storing the first link to a first queue in the first timed task, wherein the link comprises the first link; sending, by the first timing task, the first link to the user context to indicate that the user context is connected with the target service node pointed to by the first link, in a case where it is determined that the user context is in an idle state.
As an optional implementation manner, as shown in fig. 5, a second schematic connection flow diagram of a service node according to an optional embodiment of the present invention is shown, and an example is that a target service node is SrvA 1. Triggering the AcceptTimer timeout of the ASB, starting a first timing task, Service _ ASB _ AcceptTimeTask, calling a Service _ ASB _ ContextSwitch interface, and attempting to switch the context of SrvA1 to the first timing task, Service _ ASB _ AcceptTimeTask. The operation control right of SrvA1 is acquired by the first timing task. The successful handover indicates that the first timing task was successfully initiated. After the switching is successful, the first timing task calls the Service _ Accept interface, and receives a new link of SrvA 1.
As an alternative, the other serving nodes may also switch to the context of the first timing task Service _ ASB _ accepttimerttask. All the links of the Service node that switches to the context of the first timing task Service _ ASB _ accepttimerttask are received by the first timing task Service _ ASB _ accepttimerttask. For the link received by the first timing task Service _ ASB _ accepttimerttask, first, it is determined whether the destination path points to the target Service node SrvA 1. If the destination path of the new link points to SrvA1, the newly accessed link is placed into the queue of SrvA 1. And when the user context ContextUser is in an idle state, a first link is sent to the ContextUser by a first timing task, namely, service _ ASB _ AcceptTimerTask, and the ContextUser can be connected with the target service node SrvA 1.
Optionally, the method further comprises: under the condition that a second link is determined to point to other service nodes, if the user context is in an idle state, the second link is sent to the user context to indicate the user context to be connected with the other service nodes pointed by the second link, wherein the link comprises the second link; or, under the condition that the second link points to other service nodes, if the user context is not in an idle state, starting a second timing task, and receiving the second link by the second timing task.
As an optional implementation manner, for the link received by the first timing task Service _ ASB _ accepttimerttask, it is first determined whether its destination path points to the target serving node SrvA 1. If the destination path of the new link does not point to SrvA1 but to other service paths. If no proxy for the service path exists, it is directly rejected. If SrvX is directed to the other serving node, an attempt is made to release the context ownership of SrvA 1. At this time, if the user context ContextUser has already waited for, the user context ContextUser is directly switched to the ContextUser, and the user context ContextUser is connected with the other service node SrvX pointed by the link (corresponding to the second link). Or the ownership of the context of the target service node SrvA1 is temporarily put into an idle state, so that when a subsequent user context ContexUser enters, other AgentTimers have a chance to acquire the context of SrvA1 in time.
And if the user context ContextUser does not wait, starting a second timing task AgentTimer, and receiving a second link by the second timing task. Therefore, the situation that the time consumed for processing the current link by the context of the current first timing task AcceptTimer is too long and no user context ContextUser receives the new link in time is avoided, so that the new link is not processed for a long time.
Optionally, after the receiving of the second link by the second timing task, the method further comprises: and under the condition that the user context is determined to be in an idle state, the link is sent to the user context by the second timing task so as to indicate the user context to be connected with the other service nodes pointed by the second link.
As an optional implementation manner, if the user context ContextUser does not wait, the second timing task AgentTimer is started, and the second timing task receives the second link. And when the upper and lower ContextUsers of the user are in an idle state, the second timing task AgentTimer sends the second link to the ContextUser so that the ContextUser is connected with other service nodes SrvX indicated by the second link.
Optionally, the method further comprises: determining a first time at which the user context starts to be in the idle state and a second time at which the first timing task is started; and increasing the first time threshold when the time difference between the first time and the second time is less than or equal to a second time threshold and the number of other links received by the first timing task in a time period corresponding to the time difference is less than or equal to a preset value, wherein the other links are links except the first link.
As an alternative embodiment, a time difference from when the first timer task, accept timerttask, starts due to Timeout to when the user context, ContextUser, starts to wait is determined. If the time difference is less than or equal to a certain threshold (corresponding to the second time threshold), the size of the second time threshold may be determined according to the actual situation, and may be, for example, 10ms, 11ms, etc. And in this period, the number of new links (corresponding to other links) that do not point to the target serving node SrvA1 is less than a certain preset value, and the preset value may be determined according to actual conditions, for example, 3, 4, 5, and the like, then the first timing task Service _ ASB _ AcceptTimerTask releases the context of SrvA1, calls the Service _ ASB _ accepttimeradjus interface to increase the next time-out threshold (corresponding to the first time threshold), starts a new other timing task Timer, and exits the AcceptTimerTask.
Optionally, the method further comprises: determining a first time at which the user context starts to be in the idle state and a second time at which the first timing task is started; and continuing to call the service interface by the first timing task to receive the link of the at least two service nodes if the time difference between the first time and the second time is greater than or equal to a third time threshold.
As an alternative embodiment, a time difference from when the first timer task, accept timerttask, starts due to Timeout to when the user context, ContextUser, starts to wait is determined. If the time difference is greater than or equal to a certain threshold (corresponding to the third time threshold), the size of the third time threshold may be determined according to the actual situation, and may be, for example, 200ms, 210ms, and so on. The Service _ Accept is continuously called by the first timing task Service _ ASB _ Accept timerttask to receive the new link.
Optionally, the method further comprises: adjusting the first time threshold if the starting of the first timing task fails.
As an optional embodiment, the AcceptTimer of the ASB is triggered to time out, the first timing task Service _ ASB _ accepttimerttask is started, the Service _ ASB _ ContextSwitch interface is called, the context of SrvA1 to the first timing task Service _ ASB _ accepttimerttask is tried to be switched, and the first timing task acquires the operation control right of SrvA 1. The successful handover indicates that the first timing task was successfully initiated. If the switching fails, the first timing task fails to start, which means that the service node SrvA1 has been obtained by other above, calculates the time difference of context switching of the first timing task, calls the AcceptTimerAdjust to adjust the next timeout threshold (corresponding to the first time threshold), and recalls the AcceptTimerStart start timer.
As an alternative embodiment, the agentreirect operation is performed, that is, the connection to Agent is redirected, and this process is defined by ASB, which may take a long time. After redirection is completed, AgentTimeSyncStop is called again, and the AgentTimer which is started is synchronized, including stopping operation of the AgentTimer or waiting for completion of the AgentTimer, and the SrvA1 context is acquired again to complete an operation cycle.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a connection device for a service node is further provided, and the connection device is used to implement the foregoing embodiments and preferred embodiments, and the description of the connection device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a connection apparatus of a service node according to an embodiment of the present invention, as shown in fig. 6, the apparatus including: an initiating module 62 configured to initiate a first timed task if it is determined that the user context exceeds a first time threshold without invoking a service interface; a receiving module 64, configured to, when the first timing task is started successfully, invoke the service interface by the first timing task to receive a link of at least two service nodes; a sending module 66, configured to, if it is determined that the user context is in an idle state, send, by the first timing task, the link to the user context to indicate that the user context is connected with the service node to which the link points.
Optionally, the apparatus is further configured to store a first link to a first queue in the first timing task when it is determined that the first link points to a target service node, where the link includes the first link; sending, by the first timing task, the first link to the user context to indicate that the user context is connected with the target service node pointed to by the first link, in a case where it is determined that the user context is in an idle state.
Optionally, the apparatus is further configured to, when it is determined that a second link points to another service node, send the second link to the user context if the user context is in an idle state, so as to indicate that the user context is connected to the other service node to which the second link points, where the link includes the second link; or, under the condition that it is determined that the second link points to other service nodes, if the user context is not in an idle state, starting a second timing task, and receiving the second link by the second timing task.
Optionally, the apparatus is further configured to, after the second link is received by the second timing task, send, by the second timing task, the second link to the user context to indicate that the user context is connected to the other service node to which the second link points, when it is determined that the user context is in an idle state.
Optionally, the apparatus is further configured to determine a first time when the user context starts to be in the idle state, and a second time when the first timing task is started; and increasing the first time threshold when the time difference between the first time and the second time is less than or equal to a second time threshold and the number of other links received by the first timing task in a time period corresponding to the time difference is less than or equal to a preset value, wherein the other links are links except the first link.
Optionally, the apparatus is further configured to determine a first time when the user context starts to be in the idle state, and a second time when the first timing task is started; and continuing to call the service interface by the first timing task to receive the link of the at least two service nodes if the time difference between the first time and the second time is greater than or equal to a third time threshold.
Optionally, the apparatus is further configured to adjust the first time threshold in case of failure to start the first timing task.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
An embodiment of the present invention further provides a storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps in any of the method embodiments described above when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the user context is determined to exceed the first time threshold value and the service interface is not called, starting a first timing task;
s2, when the first timing task is started successfully, the first timing task calls the service interface to receive the link of at least two service nodes;
and S3, under the condition that the user context is determined to be in an idle state, the link is sent to the user context by the first timing task so as to indicate the user context to be connected with the service node pointed by the link.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that the user context is determined to exceed the first time threshold value and the service interface is not called, starting a first timing task;
s2, when the first timing task is started successfully, the first timing task calls the service interface to receive the link of at least two service nodes;
and S3, under the condition that the user context is determined to be in an idle state, the link is sent to the user context by the first timing task so as to indicate the user context to be connected with the service node pointed by the link.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for connecting a service node, comprising:
starting a first timing task under the condition that the user context is determined to exceed a first time threshold value and a service interface is not called;
under the condition that the first timing task is started successfully, the first timing task calls the service interface to receive the links of at least two service nodes;
and under the condition that the user context is determined to be in an idle state, the link is sent to the user context by the first timing task so as to indicate the user context to be connected with the service node pointed by the link.
2. The method of claim 1, further comprising:
in an instance in which it is determined that a first link points to a target service node, storing the first link to a first queue in the first timed task, wherein the link comprises the first link;
and under the condition that the user context is determined to be in an idle state, the first link is sent to the user context by the first timing task so as to indicate the user context to be connected with the target service node pointed by the first link.
3. The method of claim 1, further comprising:
under the condition that a second link is determined to point to other service nodes, if the user context is in an idle state, the second link is sent to the user context to indicate the user context to be connected with the other service nodes pointed by the second link, wherein the link comprises the second link; or the like, or, alternatively,
and under the condition that the second link points to other service nodes, if the user context is not in an idle state, starting a second timing task, and receiving the second link by the second timing task.
4. The method of claim 3, wherein after the receiving of the second link by the second timing task, the method further comprises:
and under the condition that the user context is determined to be in an idle state, sending the second link to the user context by the second timing task so as to indicate the user context to be connected with the other service nodes pointed by the second link.
5. The method of claim 2, further comprising:
determining a first time at which the user context starts to be in the idle state and a second time at which the first timing task is started;
and increasing the first time threshold when the time difference between the first time and the second time is less than or equal to a second time threshold and the number of other links received by the first timing task in a time period corresponding to the time difference is less than or equal to a preset value, wherein the other links are links except the first link.
6. The method of claim 2, further comprising:
determining a first time at which the user context begins in the idle state and a second time at which the first timing task is initiated;
and continuing to call the service interface by the first timing task to receive the link of the at least two service nodes if the time difference between the first time and the second time is greater than or equal to a third time threshold.
7. The method of claim 1, further comprising:
adjusting the first time threshold if the starting of the first timing task fails.
8. A service node connection apparatus, comprising:
the starting module is used for starting a first timing task under the condition that the user context is determined to exceed a first time threshold value and a service interface is not called;
a receiving module, configured to, when the first timed task is successfully started, invoke the service interface by the first timed task to receive a link of at least two service nodes;
and a sending module, configured to send, by the first timing task, the link to the user context to indicate that the user context is connected to the service node to which the link points, when it is determined that the user context is in an idle state.
9. A storage medium, characterized in that the storage medium has stored therein a computer program, wherein the program is executable by a terminal device or a computer to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202110143003.0A 2021-02-02 2021-02-02 Service node connection method and device, storage medium and electronic device Active CN112968951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110143003.0A CN112968951B (en) 2021-02-02 2021-02-02 Service node connection method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110143003.0A CN112968951B (en) 2021-02-02 2021-02-02 Service node connection method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112968951A CN112968951A (en) 2021-06-15
CN112968951B true CN112968951B (en) 2022-08-16

Family

ID=76271887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110143003.0A Active CN112968951B (en) 2021-02-02 2021-02-02 Service node connection method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112968951B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338816A (en) * 2021-12-22 2022-04-12 阿里巴巴(中国)有限公司 Concurrency control method, device, equipment and storage medium under server-free architecture

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101151861A (en) * 2005-03-29 2008-03-26 松下电器产业株式会社 Inter-domain context transfer using context transfer managers
CN101295380A (en) * 2007-03-30 2008-10-29 Sap股份公司 Method and system for estimating resource provisioning
WO2015073756A1 (en) * 2013-11-15 2015-05-21 Microsoft Technology Licensing, Llc Context-based selection of instruction sets for connecting through captive portals
CN105306519A (en) * 2014-05-28 2016-02-03 思科技术公司 System and method for handling stray session requests in a network environment
CN106454962A (en) * 2015-08-10 2017-02-22 中兴通讯股份有限公司 Method for preemptively transmitting context and device thereof
CN109951867A (en) * 2019-03-29 2019-06-28 腾讯科技(深圳)有限公司 A kind of event-handling method and equipment and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9178912B2 (en) * 2012-11-15 2015-11-03 Cisco Technology, Inc. Virtual device context (VDC) integration for network services

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101151861A (en) * 2005-03-29 2008-03-26 松下电器产业株式会社 Inter-domain context transfer using context transfer managers
CN101295380A (en) * 2007-03-30 2008-10-29 Sap股份公司 Method and system for estimating resource provisioning
WO2015073756A1 (en) * 2013-11-15 2015-05-21 Microsoft Technology Licensing, Llc Context-based selection of instruction sets for connecting through captive portals
CN105306519A (en) * 2014-05-28 2016-02-03 思科技术公司 System and method for handling stray session requests in a network environment
CN106454962A (en) * 2015-08-10 2017-02-22 中兴通讯股份有限公司 Method for preemptively transmitting context and device thereof
CN109951867A (en) * 2019-03-29 2019-06-28 腾讯科技(深圳)有限公司 A kind of event-handling method and equipment and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Dynamic Web Service Composition Based on Service Integration and HTN Planning;Xinhuai Tang;《 2013 Seventh International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing》;20130919;全文 *
集群计算环境下高性能通信库HPCL的设计与实现;胡长军等;《小型微型计算机系统》;20061221(第12期);全文 *

Also Published As

Publication number Publication date
CN112968951A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN105516086B (en) Method for processing business and device
CN104184756A (en) Data synchronization method, device and system
CN111865736A (en) Equipment control method and device
CN109803279A (en) A kind of slice management method, base station and terminal
EP3934322A1 (en) Cell handover processing method, apparatus, and device
CN112596768B (en) Updating method and device of equipment, storage medium and electronic device
CN112968951B (en) Service node connection method and device, storage medium and electronic device
CN103826327A (en) Method and apparatus of communication service releasing
CN113326154A (en) Connection management method, device, electronic equipment and storage medium
CN104298565A (en) Method and device for initializing ports
EP3188541B1 (en) Circuit-switching service processing method and terminal
CN114661433A (en) Event task scheduling method and device, storage medium and electronic equipment
CN106162775B (en) Method and device for accessing wireless network
CN111277599A (en) Remote call processing method and device
CN111352642A (en) Service equipment and service software upgrading method
CN102693434B (en) Communication apparatus and method for interface layer of radio frequency identification device
CN112291180A (en) Message load balancing method
US20220164221A1 (en) Preserving persistent link connections during a cloud-based service system upgrade
CN105282235B (en) A method of solution RPC upgrades unstable in double-PON port ONU
CN110119111B (en) Communication method and device, storage medium, and electronic device
CN114125023A (en) Data connection determining method and device, storage medium and electronic device
CN116527737B (en) Multi-input single-output network connection control method for PLC single-threaded system in industrial control environment
CN104113932A (en) AP (access point) device reconnecting method and device
CN113765726B (en) Statistical method, device and computing equipment for packet loss number of S1-U port data packets
CN113163511B (en) Information processing method and device, network element, terminal and readable 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