CN110769055B - Method, device, medium and electronic equipment for realizing service discovery - Google Patents

Method, device, medium and electronic equipment for realizing service discovery Download PDF

Info

Publication number
CN110769055B
CN110769055B CN201911004927.1A CN201911004927A CN110769055B CN 110769055 B CN110769055 B CN 110769055B CN 201911004927 A CN201911004927 A CN 201911004927A CN 110769055 B CN110769055 B CN 110769055B
Authority
CN
China
Prior art keywords
service
identifier
edge device
edge
scheduling information
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
CN201911004927.1A
Other languages
Chinese (zh)
Other versions
CN110769055A (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 Horizon Robotics Technology Research and Development Co Ltd
Original Assignee
Beijing Horizon Robotics Technology Research and Development 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 Horizon Robotics Technology Research and Development Co Ltd filed Critical Beijing Horizon Robotics Technology Research and Development Co Ltd
Priority to CN201911004927.1A priority Critical patent/CN110769055B/en
Publication of CN110769055A publication Critical patent/CN110769055A/en
Application granted granted Critical
Publication of CN110769055B publication Critical patent/CN110769055B/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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

A method, an apparatus, a medium, and an electronic device for implementing service discovery are disclosed, wherein the method includes: acquiring a first service identifier of a service executed by a first edge device; determining a first device identifier which is closest to the first service identifier logical distance; storing service scheduling information for a service executed by the first edge device in a second edge device having the first device identification. The present disclosure facilitates rapid implementation of service discovery and facilitates improving robustness of service discovery.

Description

Method, device, medium and electronic equipment for realizing service discovery
Technical Field
The present disclosure relates to internet technologies, and in particular, to a method for implementing service discovery, an apparatus for implementing service discovery, a storage medium, and an electronic device.
Background
In an edge computing environment, there are a large number of computing-capable edge devices (e.g., internet of things devices, etc.). Information transfer and service scheduling between edge devices (which may also be referred to as edge computing devices) is typically accomplished by establishing communication.
In order to implement service discovery, it is often necessary to know information about each edge device performing a specific task in an edge computing environment, for example, information about the location of all edge devices performing a specific computing service in a network and about the service operating status performed by the edge devices.
How to rapidly implement service discovery in an edge computing environment and improve the robustness of service discovery in the edge computing environment is a significant technical problem.
Disclosure of Invention
The present disclosure is proposed to solve the above technical problems. Embodiments of the present disclosure provide a method, an apparatus, a medium, and an electronic device for implementing service discovery.
According to an aspect of the embodiments of the present disclosure, there is provided a method for implementing service discovery, including: acquiring a first service identifier of a service executed by a first edge device; determining a first device identifier which is closest to the first service identifier logical distance; storing service scheduling information for a service executed by the first edge device in a second edge device having the first device identification.
According to another aspect of the embodiments of the present disclosure, there is provided an apparatus for implementing service discovery, the apparatus including: the first acquisition module is used for acquiring a first service identifier of a service executed by the first edge device; a device identifier determining module, configured to determine a first device identifier that is closest to the first service identifier obtained by the first obtaining module in logical distance; a writing module, configured to store service scheduling information of a service executed by the first edge device in a second edge device having the first device identifier.
According to still another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for implementing the above method.
According to still another aspect of an embodiment of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; the processor is used for reading the executable instructions from the memory and executing the instructions to realize the method.
Based on the method and apparatus for implementing service discovery provided by the foregoing embodiments of the present disclosure, since the service scheduling information of the service executed by the edge device is stored in the edge device that is closest to the service identifier logical distance of the service, the present disclosure can enable the service scheduling information of all services in the network to be stored in a plurality of edge devices, and avoid storing the service scheduling information on a server, thereby implementing decentralized storage and management of the service scheduling information, and facilitating to avoid adverse effects on service discovery in the network caused by centralized storage and management of the service scheduling information. Therefore, the technical scheme provided by the disclosure is beneficial to rapidly realizing service discovery and improving the robustness of service discovery.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and embodiments.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description of the embodiments of the present disclosure when taken in conjunction with the accompanying drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally indicate like parts or steps.
FIG. 1 is a schematic diagram of a network including edge devices and a central information exchange node;
FIG. 2 is a schematic view of a scenario in which the present disclosure is applicable;
FIG. 3 is a flow diagram of one embodiment of a method for implementing service discovery in accordance with the present disclosure;
FIG. 4 is a schematic diagram illustrating one embodiment of a method for implementing service discovery according to the present disclosure;
FIG. 5 is a schematic diagram illustrating yet another embodiment of a method for implementing service discovery according to the present disclosure;
fig. 6 is a flowchart of one embodiment of obtaining service scheduling information of a service to be discovered according to the present disclosure;
FIG. 7 is a schematic diagram illustrating an embodiment of an apparatus for implementing service discovery according to the present disclosure;
Fig. 8 is a block diagram of an electronic device provided in an exemplary embodiment of the present application.
Detailed Description
Example embodiments according to the present disclosure will be described in detail below with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, such as a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Embodiments of the present disclosure may be implemented in electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with an electronic device, such as a terminal device, computer system, or server, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be implemented in a distributed cloud computing environment. In a distributed cloud computing environment, tasks may be performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Summary of the disclosure
In the process of implementing the present disclosure, the inventor finds that, because edge computing can utilize numerous edge devices to implement distributed computing, edge computing is beneficial to improving computing efficiency and reducing loads of a cloud, and the like, and is widely applied to the fields of internet of things, intelligent manufacturing, and the like. However, in the process of implementing edge computation, an edge device (as shown in fig. 1) that performs service often needs to perform information registration at a central information exchange node (as shown in fig. 1) of the system, so that any edge device in the system can implement service discovery through information interaction with the central information exchange node. This makes the central information exchange node a key node for service discovery, and when the information in the central information exchange node is unavailable, service discovery cannot be normally implemented.
Brief description of the drawings
The technical scheme for realizing service discovery provided by the disclosure can be applied to various scenes. One example is shown in figure 2.
In fig. 2, edge device 200, edge device 201, edge device 202, edge device 203, edge device 204, edge device 205, edge device 206, and edge device 207 are part of an edge device in a network (e.g., the internet of things, etc.). The arrowed line segments in fig. 2 represent the connection between the different edge devices.
Each edge device in the network has a unique device identification. For example, the device id of the edge device 200 is 0000, the device id of the edge device 201 is 0001, the device id of the edge device 202 is 0010, the device id of the edge device 203 is 0011, the device id of the edge device 204 is 0100, the device id of the edge device 205 is 0101, the device id of the edge device 206 is 0110, and the device id of the edge device 207 is 0111.
Assume that the first computing task is performed by the edge device 200, the edge device 201, and the edge device 202, and the service identification of the first computing task service is the first service identification. Assume that the second computing task is performed by the edge device 201, the edge device 202, and the edge device 203, and the service identifier of the second computing task is the second service identifier.
The edge device 200, the edge device 201, and the edge device 202 may store the service scheduling information of the first computing task that they are responsible for executing in the edge device 207 during the computing operation of the first computing task.
The edge device 201, the edge device 202, and the edge device 203 may store service scheduling information of the second computing operation, which is responsible for execution, in the edge device 204 during the process of executing the computing operation of the second computing task.
When the edge device 205 needs to obtain the calculation result of the first calculation task, the service scheduling information of the first calculation task may be obtained from the edge device 207 based on the service identifier of the first calculation task, so that the edge device 205 may obtain the calculation results of the corresponding portions from the edge device 200, the edge device 201, and the edge device 202, respectively, according to the obtained service scheduling information, and finally obtain the calculation result of the first calculation task.
In the case where the edge device 205 is newly added to the first computing task, the edge device 205 may also store the service scheduling information of the first computing task that it is responsible for executing in the edge device 207 during the execution of the computing operation of the first computing task.
When the edge device 206 needs to obtain the calculation result of the second calculation task, the service scheduling information of the second calculation task may be obtained from the edge device 204 based on the service identifier of the second calculation task, so that the edge device 206 may obtain the calculation results of the corresponding portions from the edge device 201, the edge device 202, and the edge device 203 according to the obtained service scheduling information, and finally obtain the calculation result of the second calculation task.
In the event that the edge device 206 newly joins the second computing task, the edge device 206 may also store the service scheduling information of the second computing task it is responsible for performing in the edge device 207 during the computing operation of the second computing task.
Exemplary method
Fig. 3 is a flowchart of one embodiment of a method for implementing service discovery according to the present disclosure. The method shown in fig. 3 comprises: s300, S301, and S302. The following describes each step.
S300, acquiring a first service identifier of the service executed by the first edge device.
The first edge device in the present disclosure may be any edge device in a network (e.g., internet of things, internet, etc.). The first edge device has a device identification, i.e., a first device identification. The first device identifier is unique in the network, i.e. the device identifier of the first edge device is different from the device identifier of any other edge device in the network.
An edge device in this disclosure may also be referred to as an edge computing device or a Node (i.e., Node) in a network, etc. Since an edge device may be referred to as a node in the network, the device identification of the edge device may also be referred to as a NodeID. The method and the device can respectively allocate a device identifier to each edge device in the network in a pre-allocation mode.
An edge device in this disclosure may refer to a device in a network having data processing capabilities, e.g., a device having data-based computer vision processing capabilities. Devices with data-based computer vision processing capabilities may also be referred to as neural network deployed edge devices. The calculation amount of the neural network is usually large, and the calculation of the neural network is distributed to a plurality of edge devices in the network, so that the distributed calculation of the neural network can be realized, and the calculation efficiency of the neural network is favorably improved.
A service in this disclosure may refer to a specific task. For example, a calculation task based on a multiply-add operation, a search task based on retrieval, a task based on download, or a task based on storage, etc. Each service in the present disclosure has a unique service identifier, that is, the service identifiers of any two services are different. The service identification may also be referred to as a task identification (task id).
S301, determining a first device identifier closest to the first service identifier logic distance.
The logical distance in the present disclosure may refer to a distance between the two in a logical relationship, that is, the logical distance in the present disclosure refers to a logical distance between the device identifier and the service identifier. The logical nearest in the present disclosure means that the distance between the two (i.e., the device identifier and the service identifier) is nearest in terms of logical relationship. For example, the logical distance nearest may be the smallest result obtained based on the corresponding logical operation. The present disclosure may form a binary tree (e.g., a binary tree formed by device identifiers 000, 001, 010, 100, 101, 110, and 111 as shown in fig. 4) according to the device identifier of each edge device in the network, where each leaf node of the binary tree corresponds to one device identifier, and the present disclosure may search for a first device identifier that is logically closest to the first service identifier (e.g., 110) in the binary tree. For example, the leaf node area where the first device identifier is located may be constantly locked by the present disclosure, for example, when the left 3 leaf node areas of fig. 4 are locked, the logical distance between the 3 leaf nodes in the area and the first service identifier is greater than 4, when the middle two leaf node areas of fig. 4 are locked, the logical distance between the 2 leaf nodes in the area and the first service identifier is between 2 and 3, and when the rightmost one leaf node area of fig. 4 is locked, the logical distance between the leaf node in the area and the first service identifier is 1. That is, the leaf node area that is locked gradually changes, and the leaf node area that is finally locked usually only includes one device id, which is the first device id that is logically closest to the first service id. The process of determining the first device identifier in the above example is a successive search approximation process, and the present disclosure is not limited to the specific implementation manner of determining the first device identifier that is closest to the first service identifier.
S302, storing service scheduling information of the service executed by the first edge device in a second edge device with the first device identification.
The service scheduling information in this disclosure may be referred to as task scheduling information. The service scheduling information may refer to information describing a service and an edge device to which the service relates. The service scheduling information is information for realizing service discovery. The content included in the service scheduling information may be preset according to actual requirements, for example, the service scheduling information in the present disclosure may include but is not limited to: service identification, device identification, and the like. Optionally, the service scheduling information may further include: the device address (e.g., IP address) of the edge device responsible for performing the service, etc.
The second edge device in this disclosure is also one edge device in the network. The second edge device also has a device identification, i.e., the first device identification. The first device identifier is unique in the network, i.e. the device identifier of the second edge device is different from the device identifier of any other edge device in the network.
The first edge device and the second edge device in the disclosure may be devices with data processing capability and network access capability, such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a camera device, a single chip microcomputer installed on a vehicle-mounted system or a household appliance.
Since the service scheduling information of the service executed by the edge device in the present disclosure is stored in the edge device closest to the service identifier logical distance of the service, the present disclosure may cause the service scheduling information of all services in the network to be stored in a plurality of edge devices in a distributed manner, thereby enabling decentralized storage and management of the service scheduling information, and being beneficial to avoiding adverse effects on service discovery in the network caused by centralized storage and management of the service scheduling information. Therefore, the technical scheme provided by the disclosure is beneficial to quickly realizing service discovery and improving the robustness of service discovery.
In an alternative example, the first service identifier obtained at S300 in the present disclosure may be a service identifier based on a Hash (Hash) operation. The manner of obtaining the first service identifier of the service executed by the first edge device in S300 of the present disclosure may be: and acquiring the service name of the service executed by the first edge device, and performing hash operation on the service name, wherein the result of the hash operation is the first service identifier of the service executed by the first edge device. The service name is typically a string; for example, the service name may be an english letter string, a number string, or a symbol string (e.g., including "+", "-", or "&" etc.); as another example, the service name may include: at least one English character, at least one number, at least one symbol, and the like. To distinguish between different services, different services often have different service names. The first service identification can be conveniently and rapidly obtained by utilizing the Hash algorithm.
In an alternative example, the first device identity determined at S301 in the present disclosure may be a device identity based on a Hash (Hash) operation. The method for allocating a device identification service to each edge device in the network in advance may be as follows: and carrying out hash operation on the equipment name or the equipment address and the like of the edge equipment, wherein the result of the hash operation is the equipment identification of the edge. The method and the device for processing the edge device identifier distribute the device identifier based on the Hash operation to the edge device in advance, and are favorable for conveniently calculating the device identifier closest to the first service identifier in logical distance.
In an alternative example, the logical distance in S301 of the present disclosure may be: exclusive or logical distance. That is, the determining of the first device identifier closest to the first service identifier in S301 of the present disclosure may be: a first device identity is determined that is the closest logical distance exclusive or to the first service identity.
In an alternative example, as shown in fig. 5, the edge devices included in the network in fig. 5 are: edge device 500, edge device 501, edge device 502, edge device 503, edge device 504, edge device 505, edge device 506, and edge device 507; and the device identifications of edge device 500, edge device 501, edge device 502, edge device 503, edge device 504, edge device 505, edge device 506, and edge device 507 are: 0000. 0001, 0010, 0011, 0100, 0101, 0110, and 0111. Assuming that two edge devices (i.e., the edge device 500 and the edge device 507) with device identifiers (e.g., nodeids) of 0000 and 0111 are responsible for executing the same service, after performing a hash operation on the service name of the service, a service identifier (e.g., a TaskID) of the service is obtained, and assuming that the service identifier of the service is 1011, the device identifier 0011 of the edge device 503 is the device identifier (i.e., the first device identifier) that is logically closest to the service identifier 1011 in an exclusive or manner among all the edge devices shown in fig. 5.
In one optional example, the present disclosure may employ a KADEMLIA (which may be referred to as KAD) algorithm to successively search the network for the device identity that is logically closest in distance to the xor of the first service identity.
For an example, for the edge device 500, according to the service identifier 1011, the KAD algorithm is first adopted by the present disclosure to search for the edge device 502 with the device identifier 0010 for the first time, and the xor logical distance between the device identifier 0010 of the edge device 502 and the service identifier 1011 is 1001; according to the service identifier 1011, the KAD algorithm is adopted, the edge device 503 with the device identifier 0011 is searched for the second time, the XOR logical distance between the device identifier 0011 of the edge device 503 and the service identifier 1011 is 1000, and the edge device 503 is the edge device with the device identifier and the service identifier 1011 having the closest XOR logical distance.
In an example, for the edge device 507, the disclosure first searches for the edge device 505 with a device identifier 0101 by using a KAD algorithm according to the service identifier 1011, where an xor logical distance between the device identifier 0101 of the edge device 505 and the service identifier 1011 is 1110; then, according to the service identifier 1011, the present disclosure adopts a KAD algorithm to search for the edge device 503 with the device identifier 0011 for the second time, the xor logical distance between the device identifier 0011 of the edge device 503 and the service identifier 1011 is 1000, and the edge device 503 is the edge device with the closest xor logical distance between the device identifier and the service identifier 1011.
The present disclosure is not limited to a specific implementation manner of searching for the device identifier closest to the xor logical distance of the first service identifier in the network.
According to the method and the device, the first device identification which is the closest to the service identification exclusive or logical distance is searched, so that each edge device in the network can determine the edge device for storing the service scheduling information quickly, and the feasibility of service discovery is improved.
In an optional example, the service scheduling information in the present disclosure may be stored in the form of DHT (Distributed Hash Table). That is, in the present disclosure S302, the storing the service scheduling information of the service executed by the first edge device in the second edge device having the first device identifier may specifically be: service scheduling information for a service performed by a first edge device is stored in a distributed hash table of a second edge device having an identification of the first device.
In an optional example, a plurality of edge devices (e.g., each edge device) in the network are each provided with a hash table (Hashtable) for storing service scheduling information of a partial service, and keys in Key values (Key-values) of the hash tables in the edge devices include, but are not limited to: service identification and device identification, and accordingly, Value in the key Value includes but is not limited to: and specific values of the service identifier and the equipment identifier. Since the hash table in a plurality of edge devices (e.g., all edge devices) in the network stores all service schedule information in the network, i.e., all service schedule information in the network is stored in a plurality of edge devices in the network in a distributed manner, the hash table in each edge device may be referred to as a distributed hash table. Optionally, the distributed hash table of one edge device may further store service scheduling information of a service that the edge device itself is responsible for executing.
Continuing with the example of fig. 5, the edge device 500 with device identification 0000 may store the service scheduling information (e.g., device identification 0000, device address of the edge device 500 (e.g., IP address of the edge device 500), and service identification 1011, etc.) of the service identification 1011 for which the service identification 0000 is responsible for execution in the distributed hash table of the edge device 503 with device identification 0011. Meanwhile, the edge device 507 with device identification 0111 may store service scheduling information of the service with service identification 1011 that it is responsible for executing (e.g., the device identification 0111, the device address of the edge device 507 (e.g., the IP address of the edge device 507), the service identification 1011, and the like) in the dht of the edge device 503 with device identification 0011.
According to the method and the device, the service scheduling information of the service executed by the first edge device is stored in the distributed hash table of the second edge device with the first device identification, so that decentralized storage and management of the service scheduling information are realized, and quick search of the service scheduling information is facilitated.
In an alternative example, one embodiment of the present disclosure to obtain service scheduling information for a service to be discovered is shown in fig. 6.
In fig. 6, S600, a second service identifier of a service to be discovered is obtained.
In one optional example, the service to be discovered in the present disclosure may refer to a service that needs to obtain service scheduling information. According to the method and the device, the service name of the service to be found can be obtained firstly, then, Hash operation is carried out on the service name of the service to be found, and the result of the Hash operation is used as the second service identifier. Likewise, the service name of the service to be discovered is typically a string. For example, the service name of the service to be found may be an english letter string, a numeric string, a symbol string, or the like; as another example, the service name of the service to be discovered may include: at least one English character, at least one number, at least one symbol, and the like. The method and the device for obtaining the second service identifier are beneficial to conveniently obtaining the second service identifier by utilizing the Hash algorithm.
S601, according to the second service identification, determining a second device identification which is closest to the second service identification in logic distance.
In an alternative example, the logical distance in S301 of the present disclosure generally takes the same form as the logical distance in S601. For example, in the case that the logical distance in S301 is an exclusive-or logical distance, the logical distance in S601 is also an exclusive-or logical distance, so that the determining, according to the second service identifier, the second device identifier that is closest to the second service identifier in the present disclosure may be: and determining a second equipment identifier which is the nearest to the second service identifier in exclusive or logic distance according to the second service identifier.
Continuing with the foregoing example of fig. 5, assume that the edge device 501 with device identifier 0001 needs to obtain the service scheduling information of the service with service identifier 1011, and at this time, the service identifier 1011 is the second service identifier of the service to be discovered. The present disclosure may determine, according to the second service identifier 1011, that the device identifier 0011 of the edge device 503 is a device identifier (i.e., a second device identifier) that is logically closest to the second service identifier 1011 by an exclusive or.
In one alternative example, the present disclosure may employ a KADEMLIA (which may be referred to as KAD for short) algorithm to search the network for the device identity that is logically closest in exclusive or distance to the second service identity. The searching process can be referred to the above description with respect to fig. 5, and will not be described in detail here. The present disclosure does not limit the specific implementation of searching for the device identity in the network that is the closest logical distance to the xor of the second service identity.
S602, service scheduling information of the service to be found is obtained from the third edge device with the second device identification.
In an alternative example, where S302 of the present disclosure stores the service scheduling information in the distributed hash table of the second edge device, the present disclosure may obtain the service scheduling information of the service to be discovered from the distributed hash table of the third edge device having the second device identification. For example, the present disclosure may use the second service identifier as a search key, search for a record matching with the second service identifier in a distributed hash table of the third edge device, and obtain service scheduling information of the service to be found from the searched matching record, for example, obtain an address of the edge device and a device identifier of the edge device corresponding to the second service identifier.
According to the service discovery method and device, the service scheduling information of the service to be discovered is acquired from the third edge device (such as a distributed hash table in the third edge device), so that the service scheduling information can be conveniently acquired under the condition that the service scheduling information in the network is dispersedly stored and managed, and the service discovery feasibility can be improved.
Each edge device in the disclosure can maintain the service scheduling information stored in the edge device, so as to ensure that the service scheduling information stored in each edge device can be searched all the time. An example of maintaining service scheduling information is as follows:
under the condition that the edge device a stores the service scheduling information of the service A which is in charge of executing the service in the edge device B and stores the service scheduling information of the service B which is in charge of executing the service in the edge device c, the edge device a can continuously detect whether the edge device B and the edge device c are in an online state or not; for example, whether the edge device b and the edge device c are in an online state is detected by sending a heartbeat message and the like.
If the edge device a detects that the edge device b is in an offline state, for example, due to a communication fault between the edge device a and the edge device b or a fault of the edge device b, the edge device a considers that the edge device b is in the offline state; edge device a may again determine the device identity in the network that is logically closest to the service identity of service a and store the service schedule information for service a in edge device d with that device identity.
If the edge device a detects that the edge device c is in an offline state, for example, due to a communication fault between the edge device a and the edge device c or a fault of the edge device c, the edge device a considers that the edge device c is in the offline state; edge device a may again determine the device identity in the network that is logically closest to the service identity of service B and store the service schedule information for service a in edge device e with that device identity.
Exemplary devices
Fig. 7 is a schematic structural diagram of an embodiment of a service discovery apparatus according to the present disclosure. The apparatus of this embodiment may be used to implement the service discovery method embodiments of the present disclosure. The apparatus shown in fig. 7 comprises: a first acquisition module 700, a determine device identification module 701, and a write module 702. Optionally, the apparatus may further include: a second obtaining module 703 and a third obtaining module 704.
The first obtaining module 700 is configured to obtain a first service identifier of a service executed by a first edge device.
The device identifier determining module 701 is configured to determine a first device identifier closest to the first service identifier obtained by the first obtaining module 700.
Optionally, the determining the device identification module 701 may include: determination unit 7011. Determining unit 7011 is configured to determine a first device identifier that is closest to the first service identifier obtained by first obtaining module 700 by using an exclusive or logical distance.
The writing module 702 is configured to store the service scheduling information of the service executed by the first edge device in the second edge device having the first device identifier determined by the device identifier determining module 701 (for example, determining unit 7011).
Alternatively, the writing module 702 may store the service scheduling information of the service executed by the first edge device in the distributed hash table of the second edge device having the first device identifier determined by the device identifier determining module 701 (for example, determining unit 7011).
The second obtaining module 703 is configured to obtain a second service identifier of the service to be found.
The device identifier determining module 701 (for example, the determining unit 7011) is further configured to determine, according to the second service identifier acquired by the second acquiring module 703, a second device identifier that is closest to the second service identifier in logical distance.
The third obtaining module 704 is configured to obtain, according to the second device identifier determined by the device identifier determining module 701 (for example, determining unit 7011), service scheduling information of a service to be found from a third edge device having the second device identifier.
Optionally, the third obtaining module 704 may obtain the service scheduling information of the service to be discovered from the distributed hash table of the third edge device having the second device identifier.
Exemplary electronic device
An electronic device according to an embodiment of the present disclosure is described below with reference to fig. 8. FIG. 8 shows a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 8, the electronic device 81 includes one or more processors 811 and memory 812.
The processor 811 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capability and/or instruction execution capability, and may control other components in the electronic device 81 to perform desired functions.
Memory 812 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory, for example, may include: random Access Memory (RAM) and/or cache memory (cache), etc. The nonvolatile memory, for example, may include: read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium and executed by processor 811 to implement the methods for implementing service discovery of the various embodiments of the present disclosure described above and/or other desired functionality. Various content such as an input signal, signal components, noise components, etc. may also be stored in the computer readable storage medium.
In one example, the electronic device 81 may further include: an input device 813, an output device 814, etc., which are interconnected by a bus system and/or other form of connection mechanism (not shown). The input device 813 may also include, for example, a keyboard, a mouse, and the like. The output device 814 may output various information to the outside. The output devices 814 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device 81 relevant to the present disclosure are shown in fig. 8, and components such as buses, input/output interfaces, and the like are omitted. In addition, the electronic device 81 may include any other suitable components, depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method for implementing service discovery according to various embodiments of the present disclosure described in the "exemplary methods" section of this specification above.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a method for implementing service discovery according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium may include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, and systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," comprising, "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects, and the like, will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A method for enabling service discovery, comprising:
acquiring a first service identifier of a service executed by a first edge device;
determining a first device identifier which is closest to the first service identifier logical distance;
and storing the service scheduling information of the service executed by the first edge device in a second edge device with the first device identifier, so that the edge device which needs to obtain the calculation result of the service respectively obtains the calculation results of the corresponding parts from each edge device related to the service according to the service scheduling information in the second edge device, thereby finally obtaining the calculation result of the service.
2. The method of claim 1, wherein the determining a first device identification that is logically closest to the first service identification comprises:
And determining a first equipment identifier which is the nearest to the first service identifier exclusive or logic distance.
3. The method of any of claims 1-2, wherein the storing service scheduling information for the service performed by the first edge device in a second edge device having the first device identification comprises:
storing service scheduling information for a service executed by the first edge device in a DHT of a second edge device having the first device identification.
4. The method of any of claims 1-2, wherein the method further comprises:
acquiring a second service identifier of a service to be discovered;
determining a second equipment identifier which is closest to the second service identifier in logic distance according to the second service identifier;
and acquiring the service scheduling information of the service to be found from the third edge device with the second device identification.
5. The method of claim 4, wherein the obtaining service scheduling information for the service to be discovered from a third edge device having the second device identification comprises:
and acquiring the service scheduling information of the service to be found from the distributed hash table of the third edge device with the second device identification.
6. An apparatus for enabling service discovery, comprising:
a first obtaining module, configured to obtain a first service identifier of a service executed by a first edge device;
a device identifier determining module, configured to determine a first device identifier that is closest to the first service identifier obtained by the first obtaining module in logical distance;
a writing module, configured to store service scheduling information of a service executed by the first edge device in a second edge device having the first device identifier, so that an edge device that needs to obtain a calculation result of the service obtains, according to the service scheduling information in the second edge device, a calculation result of a corresponding portion from each edge device related to the service, thereby finally obtaining the calculation result of the service.
7. The apparatus of claim 6, wherein the means for determining a device identification comprises:
and the determining unit is used for determining a first equipment identifier which is closest to the first service identifier exclusive or logic distance.
8. The apparatus of claim 6 or 7, wherein the apparatus further comprises:
the second acquisition module is used for acquiring a second service identifier of the service to be found;
The determine device identification module is further to: determining a second device identifier which is closest to the second service identifier in logical distance according to the second service identifier acquired by the second acquisition module;
and a third obtaining module, configured to obtain, according to the second device identifier determined by the device identifier determining module, the service scheduling information of the service to be found from a third edge device having the second device identifier.
9. A computer-readable storage medium, the storage medium storing a computer program for performing the method of any of the above claims 1-5.
10. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of claims 1-5.
CN201911004927.1A 2019-10-22 2019-10-22 Method, device, medium and electronic equipment for realizing service discovery Active CN110769055B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911004927.1A CN110769055B (en) 2019-10-22 2019-10-22 Method, device, medium and electronic equipment for realizing service discovery

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911004927.1A CN110769055B (en) 2019-10-22 2019-10-22 Method, device, medium and electronic equipment for realizing service discovery

Publications (2)

Publication Number Publication Date
CN110769055A CN110769055A (en) 2020-02-07
CN110769055B true CN110769055B (en) 2022-06-10

Family

ID=69331499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911004927.1A Active CN110769055B (en) 2019-10-22 2019-10-22 Method, device, medium and electronic equipment for realizing service discovery

Country Status (1)

Country Link
CN (1) CN110769055B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784077A (en) * 2020-07-23 2020-10-16 国网浙江省电力有限公司检修分公司 Method and device for predicting state of power equipment based on edge side
CN114007042A (en) * 2021-10-25 2022-02-01 京东方科技集团股份有限公司 Configuration method and device of network camera, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103403683A (en) * 2011-03-03 2013-11-20 思科技术公司 Capabilities based routing of virtual data center service request
CN106790519A (en) * 2016-12-19 2017-05-31 中国联合网络通信集团有限公司 Service scheduling method and fringe node
CN107124621A (en) * 2017-05-05 2017-09-01 北京奇艺世纪科技有限公司 A kind of business scheduling method and device based on cellular network
CN108243246A (en) * 2017-12-25 2018-07-03 北京市天元网络技术股份有限公司 A kind of edge calculations resource regulating method, edge device and system
CN108989372A (en) * 2017-06-02 2018-12-11 华为技术有限公司 Method, registration center and the equipment of service discovery
CN109756561A (en) * 2018-12-12 2019-05-14 北京世纪互联宽带数据中心有限公司 Date storage method and its device, electronic equipment, computer-readable medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10798157B2 (en) * 2018-12-28 2020-10-06 Intel Corporation Technologies for transparent function as a service arbitration for edge systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103403683A (en) * 2011-03-03 2013-11-20 思科技术公司 Capabilities based routing of virtual data center service request
CN106790519A (en) * 2016-12-19 2017-05-31 中国联合网络通信集团有限公司 Service scheduling method and fringe node
CN107124621A (en) * 2017-05-05 2017-09-01 北京奇艺世纪科技有限公司 A kind of business scheduling method and device based on cellular network
CN108989372A (en) * 2017-06-02 2018-12-11 华为技术有限公司 Method, registration center and the equipment of service discovery
CN108243246A (en) * 2017-12-25 2018-07-03 北京市天元网络技术股份有限公司 A kind of edge calculations resource regulating method, edge device and system
CN109756561A (en) * 2018-12-12 2019-05-14 北京世纪互联宽带数据中心有限公司 Date storage method and its device, electronic equipment, computer-readable medium

Also Published As

Publication number Publication date
CN110769055A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
US11768848B1 (en) Retrieving, modifying, and depositing shared search configuration into a shared data store
US11748394B1 (en) Using indexers from multiple systems
US9116775B2 (en) Relationship-based dynamic firmware management system
US8751442B2 (en) Synchronization associated duplicate data resolution
US20100125599A1 (en) Obtaining trusted recommendations through discovery of common contacts in contact lists
US10725763B1 (en) Update and rollback of configurations in a cloud-based architecture
CN110769055B (en) Method, device, medium and electronic equipment for realizing service discovery
CN111460129B (en) Method, device, electronic equipment and storage medium for generating identification
JP2005122715A (en) Network fingerprinting
CN109376277B (en) Method and device for determining equipment fingerprint homology
US10554701B1 (en) Real-time call tracing in a service-oriented system
CN103095824A (en) File uploading control method and system
CN108897729B (en) Transaction template sharing method and device, electronic equipment and storage medium
CN115113997A (en) Task scheduling method and device, electronic equipment and storage medium
WO2023165226A1 (en) Application resource backup method and apparatus, electronic device, and storage medium
CN112214505A (en) Data synchronization method and device, computer readable storage medium and electronic equipment
EP2415213B1 (en) Smart routing
US11693849B2 (en) Consistent structured data hash value generation across formats and platforms
CN107045466B (en) Service data auditing method, device and system
US9818066B1 (en) Automated development and utilization of machine-learning generated classifiers
CN113590180B (en) Detection strategy generation method and device
CN109981697A (en) A kind of file dump method, system, server and storage medium
CN113407339A (en) Resource request feedback method and device, readable storage medium and electronic equipment
CN109614242B (en) Computing capacity sharing method, device, equipment and medium
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and 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