WO2017162043A1 - 用于设备间服务的访问方法、配置方法及装置 - Google Patents
用于设备间服务的访问方法、配置方法及装置 Download PDFInfo
- Publication number
- WO2017162043A1 WO2017162043A1 PCT/CN2017/076227 CN2017076227W WO2017162043A1 WO 2017162043 A1 WO2017162043 A1 WO 2017162043A1 CN 2017076227 W CN2017076227 W CN 2017076227W WO 2017162043 A1 WO2017162043 A1 WO 2017162043A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- service
- program
- access request
- identifier
- connection
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/566—Grouping or aggregating service requests, e.g. for unified processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/407—Bus networks with decentralised control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/35—Network arrangements, protocols or services for addressing or naming involving non-standard use of addresses for implementing network functionalities, e.g. coding subscription information within the address or functional addressing, i.e. assigning an address to a function
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/133—Protocols for remote procedure calls [RPC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/288—Distributed intermediate devices, i.e. intermediate devices for interaction with other intermediate devices on the same level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/59—Providing operational support to end devices by off-loading in the network or by emulation, e.g. when they are unavailable
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/50—Secure pairing of devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
- H04W12/069—Authentication using certificates or pre-shared keys
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/30—Services specially adapted for particular environments, situations or purposes
- H04W4/40—Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
Definitions
- the present application relates to service access technologies, and in particular, to an access method and apparatus for inter-device services.
- the present application also relates to a method and apparatus for configuring inter-device services, and an information broadcasting method and apparatus between devices.
- D-Bus is one of the communication between processes. Its main purpose is to provide communication for processes in the Linux desktop environment. At the same time, it can pass the Linux desktop environment and Linux kernel events as messages to the process, and can implement various complexities. Interprocess communication tasks.
- D-Bus the application of D-Bus is limited to one device, and the access requirements for services between devices cannot be met.
- a plurality of electronic devices such as a smart phone and a wifi speaker are included, and the functions provided by the respective devices are independent of each other. If the user wants to enjoy music in an electronic device (for example, a smart phone), the electronic device is due to audio hardware. If the facility fails, the audio playback function cannot be realized, then the user either gives up or enjoys it, or needs to manually copy the to-be-played track to the storage medium of the wifi speaker to play. It can be seen that the service functions provided by the existing devices are independent of each other, and are inconvenient for the user to use, which affects the user experience.
- An embodiment of the present application provides an access method and apparatus for inter-device services, so as to solve the problem that service functions provided between existing devices are independent of each other and are inconvenient for users.
- Embodiments of the present application are also provided for inter-device services. Configuration method and device, and information broadcasting method and device between devices.
- the application provides an access method for an inter-device service, including:
- the access request of the first program to the specific service is sent by the source device running the first program and transmitted to the target device providing the specific service through a connection between the devices;
- the connection between the devices includes: a connection established by different devices through the connection port provided by the main device and the master device.
- connection between the devices is pre-established by:
- the master device creates a connection port for establishing a connection with other devices
- the source device When the source device is a slave device that is not a master device, the source device sends a connection request to the connection port, and the master device establishes a data connection between the master device and the source device according to the received connection request, To complete the connection process between the source device and the master device;
- the target device When the target device is a slave device that is not a master device, the target device sends a connection request to the connection port, and the master device establishes a data connection between the master device and the target device according to the received connection request, To complete the connection process between the target device and the master device.
- the master device creates a connection port, and performs an operation of establishing a data connection with the slave device according to the received connection request, and is performed by a bus control module on the master device;
- the slave device performs an operation of establishing a data connection with the master device by transmitting a link request, and is performed by a bus client module on the slave device.
- the access request of the first program to the specific service is sent by the source device running the first program, and is transmitted to the target device that provides the specific service by using a connection between the devices, including:
- the source device encapsulates and sends an access request according to pre-stored service configuration information, and the access request is transmitted to the target device providing the specific service according to the target device identifier included by the connection between the devices;
- the access request includes at least a service identifier of the specific service accessed by the first program and the target device identifier;
- the target device forwards the received access request to a second program running thereon, and performs a corresponding service function by the second program, including:
- the target device forwards the access request to the second program running thereon according to pre-stored service configuration information, and the corresponding service function is executed by the second program.
- the service configuration information of the source device includes a remote service configuration item having at least the following information: the target device identifier, and a service identifier of the specific service; the service identifier includes: a service name;
- the service configuration information of the target device includes a local service configuration item having at least information of a service identifier of the specific service and an identifier of a second program process providing the specific service.
- the method for generating the service configuration information of the source device includes the service mounting process as follows:
- a service mount request including at least the target device identifier and the service identifier of the specific service is sent by the target device, and is transmitted to each device including at least the source device by a connection between the devices;
- the source device generates a remote service configuration item including at least the target device identifier and a service identifier of the specific service according to the received service mount request, and adds the remote service configuration item to its own service configuration information. in.
- the target device generates the service mount request by:
- the second program registers the specific service provided by itself to the service configuration information of the target device, to generate a corresponding local service configuration item in the service configuration information;
- the source device when the source device is a master device, the source device encapsulates and sends an access request according to pre-stored service configuration information, where the access request is connected according to the target, according to the target included
- the device identification is transmitted to the target device providing the specific service, including:
- the source device encapsulates the access request by querying the pre-stored service configuration information, where the access request includes at least the service identifier of the specific service and the target device identifier accessed by the first program;
- the source device sends the access request to the target device by using a connection established with the target device according to the target device identifier included in the encapsulated access request.
- the source device encapsulates and sends an access request according to pre-stored service configuration information, where the access request is connected according to the target, according to the target included
- the device identification is transmitted to the target device providing the specific service, including:
- the source device encapsulates the access request by querying the pre-stored service configuration information, where the access request includes at least the service identifier of the specific service and the target device identifier accessed by the first program;
- the source device transmits the encapsulated access request to the target device by using a connection established with the target device.
- the source device and the target device are not the master device
- the source device is pre-stored according to the
- the stored service configuration information encapsulates and sends an access request, and the access request is transmitted to the target device providing the specific service according to the target device identifier included in the connection between the devices, including:
- the source device encapsulates the access request by querying the pre-stored service configuration information, where the access request includes at least the identifier of the specific service and the target device identifier accessed by the first program;
- the source device sends the encapsulated access request to the master device by using a connection established with the master device;
- the master device sends the access request to the target device by using a connection established with the target device according to the received target device identifier included in the access request.
- the target device forwards the access request to the second program running thereon according to the pre-stored service configuration information, and performs a corresponding service function by the second program, including:
- the target device After receiving the access request, the target device performs a decapsulation operation and acquires the accessed service identifier.
- the target device forwards the decapsulated access request to the second program according to the identifier of the second program process, where the second program executes a corresponding service function.
- the information in the remote service configuration item corresponding to the specific service in the service configuration information of the source device further includes: a proxy identifier, where the corresponding proxy is generated when the remote service configuration item is generated.
- a proxy identifier responsible for providing proxy services that include at least encapsulation functionality for accessing the particular service
- the source device encapsulates the access request by querying the pre-stored service configuration information, where the access request includes at least the service identifier of the specific service and the target device identifier that are accessed by the first program, including:
- the first program queries the service configuration information according to the service identifier of the specific service, and acquires a proxy identifier that provides a proxy service for accessing the specific service;
- the first program sends, according to the proxy identifier, an access request that includes a service identifier of the specific service to a corresponding proxy, and the proxy encapsulates the target device identifier for the access request.
- the first program queries the service configuration information according to the service identifier of the specific service, and obtains the proxy identifier for providing the proxy service for accessing the specific service, including:
- the first program queries service configuration information according to the service identifier of the specific service
- the proxy identifier in one of the remote service configuration items is selected as the preset priority rule. Access the proxy ID of the specific service provider proxy service.
- the operation of the slave device to forward messages between the device and the master device and to provide proxy services is performed by the bus control module on the slave device.
- the method includes: The master device determines, according to a preset message forwarding rule, whether the access request can be forwarded by using a connection between devices, and performs a corresponding forwarding operation when possible.
- the method further includes:
- the response information of the second program for the access request is sent by the target device and transmitted to the source device through a connection between the devices;
- the source device returns the received response information to the first program.
- the number of the master devices is greater than 1, and the master devices are cascaded with each other, and the devices of the non-master devices are respectively subordinate to one master device;
- connection between the devices includes: a connection established by a different device through a connection port provided by its master device with the master device, and a cascade connection between the master devices.
- connection port comprises: a TCP port, or a UDP port.
- the method is applied to an in-vehicle system, where the specific service includes: an audio playing service, the source device includes: a smart phone, and the target device includes: a car audio device;
- the access request of the first program to the specific service is sent by the source device running the first program, and is transmitted to the target device providing the specific service by a connection between the devices, including: the first program is used for the audio playback service.
- the access request is sent by the smartphone running the first program and transmitted to the in-vehicle audio device providing the audio playing service through a connection between the devices;
- the method is applied to an in-vehicle system, where the specific service includes: a video playing service, the source device includes: a smart phone, and the target device includes: a car DVD;
- the access request of the first program to a specific service is sent by a source device running the first program, and
- the inter-standby connection is transmitted to the target device providing the specific service, including: the first program access request for the video playing service is sent by the smartphone running the first program, and transmitted to the providing by the connection between the devices Car DVD for video playback service;
- the target device forwards the received access request to a second program running thereon, and the second program executes a corresponding service function, including: the access request that the car DVD will receive Forwarded to the video player running on it, and the corresponding video playback function is performed by the video player.
- the method is applied to an in-vehicle system, where the specific service includes: a data storage service, the source device includes: a smart phone, and the target device includes: a car-mounted hard disk drive;
- the first program access request for the specific service is sent by the source device running the first program, and is transmitted to the target device providing the specific service through a connection between the devices, including: the first program is for the data storage service
- the access request is sent by the smartphone running the first program and transmitted to the in-vehicle hard disk drive providing the data storage service through a connection between the devices;
- the target device forwards the received access request to a second program running thereon, and performs a corresponding service function by the second program, including: the access that the onboard hard disk machine will receive
- the request is forwarded to a data storage program running thereon, and the data storage program performs a corresponding data storage function.
- the method is applied to a home entertainment system, where the specific service includes: a video playing service, the source device includes: a smart phone, and the target device includes: a smart TV or a tablet computer;
- the access request of the first program to the specific service is sent by the source device running the first program, and is transmitted to the target device providing the specific service by the connection between the devices, including: the first program is for the video playing service.
- the access request is sent by the smartphone running the first program and transmitted to the smart TV or tablet providing the video playing service through a connection between the devices;
- the target device forwards the received access request to a second program running thereon, and executes a corresponding service function by the second program, including: the smart TV or tablet computer will receive the received
- the access request is forwarded to a video play program running thereon, and the corresponding video play function is executed by the video play program.
- the application further provides an access device for an inter-device service, including:
- An access request transmitting unit wherein the access request for the specific service by the first program is sent by the source device running the first program, and transmitted to the target device providing the specific service by a connection between the devices;
- a target service providing unit configured to forward, by the target device, the received access request to a second program running thereon, and execute a corresponding service function by the second program.
- the device includes:
- connection port creation unit configured to create, by the master device, a connection port for establishing a connection with another device
- a source device connection unit configured to: when the source device is a slave device that is not a master device, send the connection request to the connection port, where the master device establishes a master device and a source according to the received connection request a data connection between devices to complete the connection process between the source device and the master device;
- a target device coupling unit configured to: when the target device is a slave device that is not a master device, send the connection request to the connection port, and the master device establishes a master device and a target according to the received connection request A data connection between devices to complete the connection process between the target device and the master device.
- the access request sending unit is specifically configured to: encapsulate, by the source device, an access request according to pre-stored service configuration information, where the access request passes the connection between the devices, according to the target included
- the device identifier is transmitted to the target device that provides the specific service;
- the access request includes at least a service identifier of the specific service accessed by the first program and the target device identifier;
- the target service providing unit is specifically configured to forward, by the target device, the access request to the second program running thereon according to the pre-stored service configuration information, and execute the corresponding service function by the second program .
- the device includes:
- a target device service mount request transmitting unit a service mount request for at least the target device identifier and the service identifier of the specific service is sent by the target device, and is transmitted to the at least through the connection between the devices Each device of the source device;
- a source device service configuration information storage unit configured to generate, by the source device, a remote service configuration item including at least the target device identifier and a service identifier of the specific service according to the received service mount request, and the remote device Service configuration items are added to their own service configuration information.
- the device further includes:
- a local service registration unit configured to register, by the second program, the specific service provided by itself to service configuration information of the target device, to generate a corresponding local service configuration item in the service configuration information
- the service mount request generating unit is configured to generate the service mount request according to the identifier of the specific service included in the local service configuration item and the target device identifier.
- the access request sending unit includes:
- An access request encapsulation subunit configured to encapsulate, by the source device, an access request by querying a pre-stored service configuration information, where the access request includes at least a service identifier of the specific service accessed by the first program and the target device Identification
- a first access request sending subunit configured to be used by the source device according to the encapsulated access request Identifying that the access request is sent to the target device using a connection that has been established with the target device.
- the access request sending unit includes:
- An access request encapsulation subunit configured to encapsulate, by the source device, an access request by querying a pre-stored service configuration information, where the access request includes at least a service identifier of the specific service accessed by the first program and the target device Identification
- a second access request sending subunit configured to send, by the source device, the encapsulated access request to the target device by using a connection established with the target device.
- the access request sending unit includes:
- An access request encapsulation subunit configured to encapsulate, by the source device, an access request by querying a pre-stored service configuration information, where the access request includes at least a service identifier of the specific service accessed by the first program and the target device Identification
- a third access request sending subunit configured to send, by the source device, the encapsulated access request to the master device by using a connection established with the master device
- an access request forwarding subunit configured to send, by the master device, the access request to the target device by using a connection established with the target device according to the received target device identifier included in the access request.
- the target service providing unit includes:
- An access request receiving subunit configured to perform a decapsulation operation after the target device receives the access request, and obtain a accessed service identifier
- a target process search subunit configured to: find, by the target device, a local service configuration item in the service configuration information according to the accessed service identifier, and obtain an identifier of a second program process that provides a corresponding service;
- a destination service providing subunit configured to: forward, by the target device, the decapsulated access request to the second program according to the identifier of the second program process, where the second program executes a corresponding service function.
- the access request encapsulation subunit includes:
- a proxy identifier obtaining subunit configured to: query, by the first program, the service configuration information according to the service identifier of the specific service, to obtain a proxy identifier that provides a proxy service for accessing the specific service;
- a proxy service encapsulating subunit configured to send, by the first program, an access request including a service identifier of the specific service to a corresponding proxy according to the proxy identifier, and the proxy encapsulates the access request for the access request Target device ID.
- the device further includes:
- a response information transmitting unit configured to: when the target service providing unit performs its function, the second program pin The response information to the access request is sent by the target device and transmitted to the source device through a connection between the devices;
- a response information returning unit configured to return, by the source device, the received response information to the first program.
- the application further provides a configuration method for an inter-device service, including:
- a service mount request including at least a service identifier of the service provided by the first device and the first device identifier is sent by the first device and transmitted to each device interconnected with the master device by a connection between the devices;
- each device other than the first device generates a remote service configuration item including at least the first device identifier and a service identifier of the service provided by the first device according to the received service mount request, and the remote device Service configuration items are added to their own service configuration information.
- the connection between the devices includes: a connection established by different devices through the connection port provided by the main device and the master device.
- the first device generates the service mount request by:
- the application running on the first device registers the service provided by the respective device into the service configuration information of the first device to generate a local service configuration item in the service configuration information;
- the method further includes:
- a service offload request including at least the service identifier of the offloaded service is sent by the first device and transmitted to each device interconnected with the master device through a connection between the devices;
- Each device other than the first device deletes a remote service configuration item including the service identifier from its own service configuration information according to the received service offload request.
- the device after the first device is not the master device, after the device is added to the service configuration information, the device includes:
- the master device forwards the device disconnection request to each device through its connection with each device;
- Each device other than the first device deletes all remote service configuration items including the first device identifier from its own service configuration information according to the received device disconnection request.
- the present application further provides a configuration apparatus for an inter-device service, including:
- a mount request transmitting unit configured to include at least a service identifier of the service provided by the first device, and a first device identifier
- the service mount request is sent by the first device and transmitted to each device interconnected with the master device through a connection between the devices;
- a service configuration storage unit configured to generate, by the devices other than the first device, a remote service configuration that includes at least the first device identifier and a service identifier of a service provided by the first device according to the received service mount request Item and add the remote service configuration item to its own service configuration information.
- the device includes:
- an uninstallation request transmitting unit configured to: after the service configuration storage unit completes the adding operation of the remote service configuration item, the service uninstallation request including at least the service identifier of the uninstalled service is sent by the first device and connected through the device Transfer to each device interconnected with the master device;
- a first service configuration deleting unit configured to delete, by the devices other than the first device, the remote service configuration item that includes the service identifier from the service configuration information according to the received service uninstallation request.
- the device includes:
- a device disconnection request sending unit configured to: after the service configuration storage unit completes the adding operation of the remote service configuration item, the first device sends a device disconnection request to the primary device, where the request carries at least the first device identifier ;
- a device disconnect request forwarding unit configured to forward, by the master device, the device disconnection request to each device through a connection between the device and the device;
- a second service configuration deleting unit configured to delete, according to the received device disconnection request, each remote device configuration item including the first device identifier according to the received device disconnection request .
- the present application further provides an information broadcasting method for between devices, including:
- the broadcast request of the first application is sent by the first device running the first application, and is transmitted to each device interconnected with the master device through a connection between the devices;
- Each device other than the first device sends the received broadcast request to the respective hosted application
- the connection between the devices includes: a connection established by different devices through the connection port provided by the main device and the device.
- the present application further provides an information broadcasting apparatus for between devices, including:
- the broadcast request for the first application is sent by the first device running the first application, and transmitted to each device interconnected with the master device through a connection between the devices;
- the broadcast request reporting unit is configured to send, by each device other than the first device, the received broadcast request to the respective hosted application.
- the service access method for inter-device provided by the application the access request of the first program to the specific service is sent by the source device running the first program, and transmitted to the target device providing the specific service by the connection between the devices And the target device forwards the received access request to a second program running thereon, and performs a corresponding service function by the second program, where the connection between the devices includes: different devices respectively A connection established with the master device through a connection port provided by the master device.
- each device since each device establishes a connection with the master device through the connection port provided by the master device, it is equivalent to forming a virtual device bus between the devices, and can implement cross-device service based on the device bus. Access functions, so that part of the capabilities of a single device can become standardized functional modules to serve other devices, enabling a combination of functions between devices, resulting in a more complex and flexible functional system.
- 1 is a flow chart of an embodiment of an access method of an inter-device service of the present application
- FIG. 2 is a schematic structural diagram of a source device provided by an embodiment of the present application.
- FIG. 3 is a flowchart of a process of transmitting an access request to a target device when the source device is a master device according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of a target device provided by an embodiment of the present application.
- FIG. 5 is a flowchart of a process of transmitting an access request to a target device when the target device is a master device according to an embodiment of the present disclosure
- FIG. 6 is a schematic structural diagram of a source device and a target device provided by an embodiment of the present application.
- FIG. 7 is a flowchart of a process of transmitting an access request to a target device when both the source device and the target device are not the master device according to the embodiment of the present disclosure
- FIG. 8 is a flowchart of a process for a target device to forward an access request to a second program according to an embodiment of the present application
- FIG. 9 is a schematic diagram of an embodiment of an access device for an inter-device service of the present application.
- FIG. 10 is a flowchart of an embodiment of a method for configuring an inter-device service of the present application
- FIG. 11 is a schematic diagram of an embodiment of a configuration apparatus for an inter-device service of the present application.
- FIG. 12 is a flowchart of an embodiment of an information broadcasting method for devices between applications according to the present application.
- Figure 13 is a schematic diagram of an embodiment of an information broadcasting apparatus for use between devices of the present application.
- an access method and apparatus for inter-device services a configuration method and apparatus for inter-device services, and an information broadcast method and apparatus for inter-devices are respectively provided. Detailed description will be made one by one in the following embodiments.
- the embodiment provides a specific implementation manner of an access method for an inter-device service.
- the core of the method is that the main device provides a connection port, which is equivalent to providing an access slot of the virtual device bus to provide external devices.
- a service or a slave device that needs to access a service across devices may implement a connection with the master device through the connection port, that is, access the device bus; a service access request of the first program on a certain device may pass through the device bus ( The connection between the devices is transmitted to another device providing the service, and the corresponding service function is executed by the second program on the device, thereby implementing the service access function across the devices.
- the main device provides the device bus
- the external device provides services or the newly added device that needs to access the service across the device
- the device can be quickly connected to the device bus by sending a request to the host device connection port, and the devices on the device bus can be realized.
- the mutual access without having to connect with other devices, can reduce the complexity of networking, simplify the operation process, and improve the execution efficiency.
- the devices involved in the technical solution can be divided into a master device and a slave device, the master device is a device that creates a device bus, and the slave device is a device that accesses the device bus.
- the connection between the master device and the slave device may be established first.
- the specific implementation may be: the master device creates a connection port for establishing a connection with the slave device, and creating the connection port is equivalent to creating the device bus.
- the master device Sending a connection request of the access device bus from the device to the connection port, the master device establishes a data connection with the slave device according to the received connection request, and can associate each data connection with the device identifier of the slave device , thereby completing the connection process between the slave device and the master device (which may also be referred to as slave device connection to the bus). Thereafter, the slave device can perform message transmission with the master device through the connection with the master device, and the master device can forward the message by using the established corresponding connection according to the target device identifier carried by the message.
- the master device in order to ensure that only reliable devices can access the device bus, the master device can preset connection credentials, such as a password, and the slave device can also preset the connection credentials, and needs to carry when the slave device sends a connection request to the connection port. After the credentials are joined, the master device can verify the connection credentials and then establish a connection with the slave device. Similar The reason is that after establishing the connection relationship with the slave device, the master device can return a successful connection response to the slave device, and carry its own identity information in the response, for example, an identity certificate, so that the slave device can confirm the identity of the master device. And in the subsequent operations, various messages can be sent to the master device, for example, a service mount request, an access request, and the like.
- connection credentials such as a password
- the slave device can also preset the connection credentials, and needs to carry when the slave device sends a connection request to the connection port. After the credentials are joined, the master device can verify the connection credentials and then establish a connection with the slave device. Similar The reason is that
- the data connection between the master device and the slave device may be established by using a TCP or UDP protocol
- the connection port may be a preset TCP port or a UDP port, or may be established by using other network protocols, as long as
- the technical solution of the present application can also be implemented by establishing a data connection between the master device and the slave device.
- the device in which the program providing the service is located is referred to as the target device, and the device in which the program that issues the access request is referred to as the source device.
- the application can also be run on the master device. Therefore, for the service access process between devices, the source device may be the master device, the target device is the master device, and the source device and the target device are not. The case of the master device.
- the access method for the inter-device service includes the following steps: the first program access request for the specific service is sent by the source device running the first program, and is transmitted to the providing by the connection between the devices a target device of a specific service; the target device forwards the received access request to a second program running thereon, and the second program executes a corresponding service function.
- the first program that initiates the access request is usually an application, and the second program that provides the specific service may be an application or a system program.
- the source device can select an association established with the target device from among the numerous connections established with the target device to send the access request to the target device; if the target device is the master device, the source device can utilize the source device The connection established with the target device (master device) sends an access request to the target device; if both the source device and the target device are not the master device, the source device can use the connection established with the master device to send the access request to the master device.
- the master device forwards the access request to the target device using the connection that has been established with the target device.
- the access request may be transmitted to the target device through the connection between the devices according to a preset fixed manner without encapsulating the target device identifier and the identifier of the specific service, and the second device is triggered by the target device.
- the application scenario is usually more complicated.
- multiple services can be provided by multiple programs on more than one device, and applications on each device can access different services as needed.
- the service configuration information is stored in advance in each device.
- the service configuration information can include two types of service configuration items: a local service configuration item and a remote service configuration item, where the information in the local service configuration item At least: the identity of the local program process that provides the service (for example: process handle) and the service identifier of the service it provides (used to distinguish different services on the device, such as: service name or service sequence number); in the remote service configuration item
- the information includes at least: a device identifier of another device, and a service identifier of the service provided by the other device.
- the corresponding service configuration information item is called a remote service configuration item. Descriptive information about the corresponding service, and the like may also be included in the local service configuration item and the remote service configuration item.
- the source device can learn the target device identifier that provides the service according to the service identifier of the accessed service, and can encapsulate the information in the access request; when the access request is transmitted by using the connection between the devices, the master The device may decide to perform inter-device forwarding according to the target device identifier carried in the access request or perform internal and external forwarding of the device, so as to transmit the access request to the target device.
- the target device After receiving the access request, the target device may obtain the service configuration information.
- the program process ID of the service and forwards the access request to the correct program process.
- the service configuration information on the device may be configured by the device management personnel through the configuration interface, or may be generated by reading a configuration file.
- the embodiment provides an implementation manner of dynamically mounting the service through the device bus, that is, A device bus interconnected device can transmit service information provided by it to other devices on the device bus through the device bus.
- the second program running on the target device may register the service provided by the target device to the service configuration information of the target device, thereby generating a local service configuration item in the service configuration information of the target device;
- a service mount request is generated by the identity of the device and the service identity of the specific service included in the local service configuration item.
- the target device issues a service mount request, and the service mount request is transmitted to each device interconnected with the master device through a connection between devices, for example, when the target device is not the master device, it can send a service mount request to the master device.
- the device, the master device forwards the mount request to other devices through the device bus (ie, its connection with each device), which is equivalent to a broadcast transmission process.
- Each device other than the target device, including the source device described in this embodiment generates a remote service configuration item including at least the target device identifier and the specific service identifier according to the received service mount request. And add the remote service configuration item to your own service configuration information.
- the target device can directly broadcast the service mount request to other devices through the device bus, so that the devices (including the source device) can generate corresponding information in their service configuration information.
- Remote service configuration item if the target device is a master device, the target device can directly broadcast the service mount request to other devices through the device bus, so that the devices (including the source device) can generate corresponding information in their service configuration information.
- Remote service configuration item if the target device is a master device, the target device can directly broadcast the service mount request to other devices through the device bus, so that the devices (including the source device) can generate corresponding information in their service configuration information.
- the master device and each device interconnected with the master device can notify the other devices on the device bus by using the service information provided by the local program in the manner described above, so that each device on the device bus can be informed by other devices.
- Service the management of the service configuration information may be performed by a special module, for example, a service manager module (Service Manager - SM for short), each device may have its own SM, and the module is responsible for generating a service according to the registration of the local program.
- the local service configuration item in the configuration information and initiates the service mount request; and is also responsible for generating the remote service configuration item in the service configuration information according to the service mount request from other devices, and providing the query function for the service configuration information.
- the corresponding target device identifier may be queried according to the service identifier of the specific service, and for the target device, the corresponding service identifier of the specific service included in the received access request may be queried.
- the identity of the second program process may be queried according to the service identifier of the specific service, and for the target device, the corresponding service identifier of the specific service included in the received access request may be queried.
- the SM may initiate a service mount request.
- the services provided by the program are usually registered with the SM.
- the SM can initiate a service mount request according to the service information in the local service configuration item, thereby broadcasting the local service information to other devices on the bus in a full amount; in addition, if the target device starts a new device
- the program, or an activated program that provides a new service will also register with the SM.
- the SM can also initiate a service mount request to broadcast the new service information incrementally. Give other devices on the bus.
- the program registers the service with the SM, it can also carry the attribute that the service can provide externally, so that the SM can initiate the service mount request only for the service information that can be provided externally.
- the device bus-related operations performed by the master device and the slave device may be respectively implemented in a specific function module.
- a bus control module also called a BusHost module
- the master device responsible for creating a connection port, establishing a data connection with the slave device according to the received connection request, and forwarding the message between the different devices using the established connection.
- the device forwards messages with other devices;
- the bus client module also known as the BusClient module
- the message includes: a service mount message, an access message, and the like.
- each program, the SM module, and the bus control module are usually executed in the form of a process.
- each process performs message forwarding through a local bus, for example, D-Bus. Wait for interaction.
- inter-process communication may also be implemented by using other IPC mechanisms, which is not specifically limited in this application.
- the service configuration information of the source device includes a remote service configuration item having the following information: the target device identifier, and a service identifier of the specific service;
- the service configuration information of the target device includes a local service configuration item having information of a service identifier of the specific service and an identifier of a second program process providing the specific service.
- the method provided in this embodiment can be executed, and the first program on the source device accesses the service provided by the second program on the target device.
- the specific implementation manner of the access process of the above-mentioned inter-device service will be described in detail below based on a preferred implementation manner using service configuration information.
- FIG. 1 is a flowchart of an embodiment of an access method for an inter-device service according to the present application.
- the method includes the following steps:
- Step 101 The access request of the first program to the specific service is sent by the source device running the first program, and is transmitted to the target device providing the specific service by a connection between the devices.
- the source device encapsulates and sends an access request according to the pre-stored service configuration information, and the access request is transmitted to the providing the specific service according to the target device identifier included by the connection between the devices.
- a target device the access request includes at least a service identifier of the specific service accessed by the first program and the target device identifier.
- the source device that initiates the access request is the master device
- the target device that provides the specific service is the master device
- the source device and the target device are not the master devices. The following describes each of the three cases separately.
- the source device is the master device.
- FIG. 2 is a schematic diagram of the architecture when the source device is the master device.
- the process of transmitting the access request to the target device includes the following steps 101-1-1 to 101-1-2, which will be described below with reference to FIG. 3.
- step 101-1-1 the source device encapsulates an access request by querying the pre-stored service configuration information, where the access request includes at least the service identifier of the specific service and the target device identifier accessed by the first program. .
- the first program on the source device may generate an access request for a specific service, where the access request includes a service identifier (eg, a service name) of the specific service, and then initiates a query request to the SM, and the SM provides according to the first program.
- the service identifier of the specific service finds the service configuration information, finds the target device identifier corresponding to the service identifier in its remote service configuration item, and returns it to the first program, and the first program may encapsulate the target for its access request.
- the device identifier may also be encapsulated according to a message format that the target device can recognize. Thereafter, the first program can send the encapsulated access request to the bus control module over the local bus.
- the present embodiment provides a preferred embodiment in which the encapsulation function is separated from the application and submitted to the agent.
- the application does not perceive the location of the service, which is equivalent to blocking the application from accessing local and remote services.
- the device receiving the service mount request may generate a corresponding proxy for each of the services.
- the source device may also generate the remote service configuration item including the service identifier of the specific service and the target device identifier in the bus control module.
- the corresponding agent if the source device is not the master device, may generate a corresponding agent in its bus client module) for providing the specific service with a proxy service including at least the encapsulation function. Therefore, the remote service configuration item corresponding to the specific service in the service configuration information of the source device may further include the following information: an identifier of the corresponding proxy (for example, a handle of the proxy).
- the implementation process of the step may include: the first program on the source device initiates a query request to the SM before initiating an access request for the specific service, and the service identifier (eg, the service name) of the specific service provided by the SM according to the first program.
- Finding service configuration information finding a proxy identifier corresponding to the service identifier in its remote service configuration item, and returning it to the first program, where the first program includes the service identifier of the specific service according to the proxy identifier
- the access request is sent to the corresponding agent in the bus control module via the local bus, and the target device identifier is encapsulated by the agent for the access request.
- the proxy may also perform other encapsulation operations, such as encapsulating the access request into a message format that the target device can recognize, and the like.
- the SM may follow the preset.
- the priority rule selects the agent ID in one of the remote service configuration items to return to the first program.
- the first program queries the SM with the name serv1 of the specific service. If the SM finds two remote service configuration items, the two devices provide the service named serv1. In this case, the SM can follow the preset priority rule. select. For example, the service mount time is prioritized, that is, the remote service configuration item with the earlier mount time is selected, and then the proxy identifier in the selected configuration item is returned to the first program.
- Step 101-1-2 The source device sends the access request to the target device by using a connection established with the target device according to the target device identifier included in the encapsulated access request.
- the bus control module of the source device performs the access by using a connection established with the target device (ie, a data connection corresponding to the target device identifier) according to the target device identifier included in the encapsulated access request.
- a bus client module requesting to be sent to the target device.
- a message forwarding rule may be preset for the master device to explicitly specify which devices can be forwarded between messages. Then, in this step, since the source device is the master device, the bus control module may extract the target device identifier from the access request before forwarding the access request, and determine whether the source device may be internal according to the message forwarding rule. The access request is sent to the target set Ready, and perform the corresponding forwarding operation when possible, otherwise the access failure response can be returned to the first program, and subsequent operations are not performed.
- the target equipment is the main equipment.
- FIG. 4 is a schematic diagram of the architecture when the target device is the master device.
- the process of transmitting the access request to the target device includes the following steps 101-2-1 to 101-2-2, which will be described below with reference to FIG. 5, and the same portions as those in the above (1) are not described again.
- Step 101-2 The source device encapsulates an access request by querying the pre-stored service configuration information, where the access request includes at least the service identifier of the specific service and the target device identifier accessed by the first program. .
- the first program may send the encapsulated access request to the bus client module through the local bus; if a proxy-based preferred implementation is adopted, then the bus client module The agent finally completes the encapsulation operation of the access request.
- Step 101-2-2 The source device sends the encapsulated access request to the target device by using a connection established with the target device.
- the bus client module of the source device transmits the access request to the bus control module of the target device using a connection that has been established with the target device (ie, a data connection between the source device and the master device).
- the bus control module of the target device After receiving the access request, the bus control module of the target device (the master device) determines, according to the target device identifier carried in the access request, that the device is the target device of the access request, and therefore does not forward the device to other devices. Said access request.
- the bus control module can determine whether the access request received from the source device can be sent to the target device according to a preset message forwarding rule, that is, the target device is delivered to the target device through the local bus. Internally, if not, an access failure response is returned to the source device and no further operations are performed.
- the source device and the target device are not the master devices.
- FIG. 6 is a schematic diagram of the architecture when the source device and the target device are not the master device.
- the process of transmitting the access request to the target device includes the following steps 101-3-1 to 101-3-3, which will be described below with reference to FIG. 7, wherein the same content as in the above (1) or (2) is no longer Narration.
- the source device encapsulates the access request by querying the pre-stored service configuration information, where the access request includes at least the identifier of the specific service and the target device identifier accessed by the first program.
- the first program may send the encapsulated access request to the bus client module through the local bus; if the proxy-based preferred implementation is used, then the bus client The agent in the end module finally completes the encapsulation operation of the access request.
- Step 101-3-2 The source device sends the encapsulated access request to the master device by using a connection established with the master device.
- the bus client module of the source device transmits the access request to the bus control module of the master device using the connection established with the master device (ie, the data connection between the source device and the master device).
- step 101-3-3 the master device sends the access request to the target device by using a connection established with the target device according to the received target device identifier included in the access request.
- the bus control module of the master device may forward the access request to the bus client of the target device by using a connection established with the target device (ie, a data connection corresponding to the target device identifier) Module.
- the bus control module of the master device may extract the target device identifier from the access request before performing the foregoing forwarding operation, and determine whether the slave device may receive the message according to a preset message forwarding rule.
- the access request is forwarded to the target device. If the corresponding forwarding operation can be performed, the access failure response can be returned to the source device, and subsequent operations are not performed.
- Step 102 The target device forwards the received access request to a second program running thereon, and executes a corresponding service function by the second program.
- the target device may forward the access request to the second program running thereon according to the pre-stored service configuration information, and execute the corresponding service function by the second program.
- steps 102-1 to 102-3 may be included in the specific implementation, which will be described below with reference to FIG. 8.
- Step 102-1 After receiving the access request, the target device performs a decapsulation operation, and acquires the accessed service identifier.
- the access request is received by the bus control module, and if the target device is a slave device, the access request is received by the bus client module.
- the two modules are collectively referred to as a bus interface module, and the bus interface module performs a decapsulation operation on the received access request, and acquires the accessed service identifier carried by the first interface, that is, the specific access of the first program.
- the service identifier of the service is not limited to a bus interface module.
- Step 102-2 The target device searches for the local service configuration item in the service configuration information according to the accessed service identifier, and obtains an identifier of the second program process that provides the corresponding service.
- the bus interface module queries the SM through the local bus, and the SM finds the process identifier corresponding to the service identifier in the local service configuration item according to the service identifier carried in the query request, that is, the identifier of the second program process that provides the specific service, For example: process handle.
- Step 102-3 The target device forwards the decapsulated access request to the second program according to the identifier of the second program process, and the second program executes a corresponding service function.
- the bus interface module sends the decapsulated access request to the second program through the local bus according to the identifier of the second program process, and after receiving the access request, the second program performs a corresponding operation to provide the specific service.
- the corresponding response information may be returned to the first program, so that the first program performs the corresponding processing.
- the return process of the response information may include: the second program sends the response information to the bus control module, and the bus control module sends the response information to the source device through the connection between the source device and the target device.
- the bus client module, the bus client module of the source device sends the response message to the first program.
- the embodiment described in this embodiment may be further extended by a cascade between multiple master devices, that is, the number of master devices is greater than 1, and the master devices are cascaded with each other, and the non-master devices are not connected to each other.
- the devices are respectively subordinate to one master device; the connection between the devices includes: a connection established by different devices through the connection ports provided by the master devices, and a cascade connection between the master devices.
- the above cascaded architecture it is easy to access and manage more devices, and access to services between devices can also be achieved.
- device A creates the device bus ABUS as the master device by starting the connection port, and several other devices are connected to the ABUS; device B also starts the connection port, creates the device bus BBUS with B as the master device, and several other devices are connected to the BBUS.
- Device B can also be connected to the ABUS through the connection port of device A, that is, device A and device B are cascaded, and message forwarding rules can be set on device B, thereby realizing message forwarding between device bus ABUS and BBUS. (Includes: forwarding service mount requests, forwarding service access requests, etc.).
- devices connected to the ABUS bus can access the services provided by the devices on the BBUS bus, and devices connected to the BBUS bus can also access the services provided by the devices on the ABUS bus, thereby implementing cross-devices in a cascaded architecture. Service access process.
- the method provided in this embodiment can be applied to a scenario with cross-device service access requirements, and in particular, can be applied in a system deployed in a limited space, thereby providing users with more intuitive and convenient service functions.
- it can be applied to an in-vehicle system or a home entertainment system, and the two application scenarios are separately described below.
- the in-vehicle control device can create a device bus as a master device, and devices such as a smart phone, a car audio device, a car hard disk drive, and a car DVD are connected to the device bus, so that each device can access each other's service functions. .
- car audio equipment provides audio playback services
- an application on a smartphone The program needs to access the audio playing service
- the smart phone can send an access request to the car audio device through the device bus, and carry relevant data of the audio to be played in the request, for example, an audio data file, or related resource address information, etc., the access request It is transmitted to the car audio device through the connection between the devices, and the car audio device forwards the received access request to the audio playing program running thereon, and the audio playing program performs the corresponding audio playing function, thereby accessing the in-vehicle system.
- the smartphone provides an audio playback service.
- the smartphone can also access the video playback service provided by the car DVD device and the data storage service provided by the car disk drive.
- the basic access process is similar to the above audio playback service, and will not be described here.
- the smart TV can create a device bus as a master device, and devices such as smart phones and tablet computers are connected to the device bus, so that each device can access each other's service functions.
- a smart TV provides a video playing service, and an application on a smart phone needs to access a video playing service.
- the smart phone can send an access request to the smart TV through the device bus, and carry relevant data of the to-be-played video in the request, for example, a video.
- the access request is transmitted to the smart TV through a connection between the devices, and the smart TV forwards the received access request to the video playing program running thereon, and the video playing program executes the corresponding
- the video playback function provides a video playback service for smartphones that access the home entertainment system.
- each device establishes a connection with the master device through the connection port provided by the master device, which is equivalent to forming a virtual device bus between the devices, and
- the service access function across devices is implemented based on the device bus, so that part of the capabilities of a single device can become standardized functional modules to serve other devices, enabling functional combinations between devices, thereby forming a more complex and flexible functional system.
- the method is applied in a system deployed in a limited space (for example, an in-vehicle system or a home entertainment system), on the basis of implementing a cross-device service access system based on a device bus, and on the one hand, due to the limited number of access devices, It can better protect user privacy and provide security for cross-device service access.
- a limited space for example, an in-vehicle system or a home entertainment system
- a cross-device service access system based on a device bus
- FIG. 9 is a schematic diagram of an embodiment of an access device for an inter-device service according to the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative Intentional.
- An access device for the inter-device service of the embodiment comprising: an access request transmitting unit 901, wherein the access request for the specific service by the first program is sent by the source device running the first program and passes through the device The connection is transmitted to the target device providing the specific service; the target service providing unit 902 is configured to forward the received access request to the second program running on the target device by the target device, and by the second The program performs the corresponding service functions.
- the device includes:
- connection port creation unit configured to create, by the master device, a connection port for establishing a connection with another device
- a source device connection unit configured to: when the source device is a slave device that is not a master device, send the connection request to the connection port, where the master device establishes a master device and a source according to the received connection request a data connection between devices to complete the connection process between the source device and the master device;
- a target device coupling unit configured to: when the target device is a slave device that is not a master device, send the connection request to the connection port, and the master device establishes a master device and a target according to the received connection request A data connection between devices to complete the connection process between the target device and the master device.
- the access request sending unit is specifically configured to: encapsulate, by the source device, an access request according to pre-stored service configuration information, where the access request passes the connection between the devices, according to the target included
- the device identifier is transmitted to the target device that provides the specific service;
- the access request includes at least a service identifier of the specific service accessed by the first program and the target device identifier;
- the target service providing unit is specifically configured to forward, by the target device, the access request to the second program running thereon according to the pre-stored service configuration information, and execute the corresponding service function by the second program .
- the device includes:
- a target device service mount request transmitting unit a service mount request for at least the target device identifier and the service identifier of the specific service is sent by the target device, and is transmitted to the at least through the connection between the devices Each device of the source device;
- a source device service configuration information storage unit configured to generate, by the source device, a remote service configuration item including at least the target device identifier and a service identifier of the specific service according to the received service mount request, and the remote device Service configuration items are added to their own service configuration information.
- the device further includes:
- a local service registration unit configured to register, by the second program, the specific service provided by itself to service configuration information of the target device, to generate a corresponding local service configuration item in the service configuration information
- the service mount request generating unit is configured to generate the service mount request according to the identifier of the specific service included in the local service configuration item and the target device identifier.
- the access request sending unit includes:
- An access request encapsulation subunit configured to encapsulate, by the source device, an access request by querying a pre-stored service configuration information, where the access request includes at least a service identifier of the specific service accessed by the first program and the target device Identification
- a first access request sending subunit configured to send, by the source device, the access request to the target device by using a connection established with the target device according to the target device identifier included in the encapsulated access request.
- the access request sending unit includes:
- An access request encapsulation subunit configured to encapsulate, by the source device, an access request by querying a pre-stored service configuration information, where the access request includes at least a service identifier of the specific service accessed by the first program and the target device Identification
- a second access request sending subunit configured to send, by the source device, the encapsulated access request to the target device by using a connection established with the target device.
- the access request sending unit includes:
- An access request encapsulation subunit configured to encapsulate, by the source device, an access request by querying a pre-stored service configuration information, where the access request includes at least a service identifier of the specific service accessed by the first program and the target device Identification
- a third access request sending subunit configured to send, by the source device, the encapsulated access request to the master device by using a connection established with the master device
- an access request forwarding subunit configured to send, by the master device, the access request to the target device by using a connection established with the target device according to the received target device identifier included in the access request.
- the target service providing unit includes:
- An access request receiving subunit configured to perform a decapsulation operation after the target device receives the access request, and obtain a accessed service identifier
- a target process search subunit configured to: find, by the target device, a local service configuration item in the service configuration information according to the accessed service identifier, and obtain an identifier of a second program process that provides a corresponding service;
- a destination service providing subunit configured to: forward, by the target device, the decapsulated access request to the second program according to the identifier of the second program process, where the second program executes a corresponding service function.
- the access request encapsulation subunit includes:
- a proxy identifier obtaining subunit configured to: query, by the first program, the service configuration information according to the service identifier of the specific service, to obtain a proxy identifier that provides a proxy service for accessing the specific service;
- a proxy service encapsulating subunit configured to send, by the first program, an access request including a service identifier of the specific service to a corresponding proxy according to the proxy identifier, and the proxy encapsulates the access request for the access request Target device ID.
- the device further includes:
- a response information transmitting unit configured to: when the target service providing unit performs its function, the response information of the second program for the access request is sent by the target device, and is transmitted to the Source device
- a response information returning unit configured to return, by the source device, the received response information to the first program.
- FIG. 10 is a flowchart of an embodiment of a method for configuring an inter-device service provided by the present application.
- the parts in this embodiment that are identical to the steps in the foregoing method embodiments are not described again. The differences are mainly described below.
- a configuration method for inter-device service provided by the present application includes:
- Step 1001 A service mount request including at least a service identifier of a service provided by the first device and a first device identifier is sent by the first device and transmitted to each device interconnected with the master device by a connection between the devices.
- the connection between the devices includes: a connection established by different devices through the connection port provided by the main device and the master device.
- the first device may generate the service mount request by: a program running on the first device registers a service provided by the first device into service configuration information of the first device to generate in the service configuration information. a local service configuration item; generating the service mount request according to the service identifier included in the local service configuration item and the device identifier of the first device.
- Step 1002 Each device except the first device generates a remote service configuration item that includes at least the first device identifier and a service identifier of a service provided by the first device according to the received service mount request, and The remote service configuration item is added to its own service configuration information.
- each device except the first device connected to the device bus created by the master device generates a remote service configuration item for the service provided by the first device, that is, the service information provided by the first device is obtained. So that the application running on each device can access the corresponding service provided by the first device.
- a certain program on the first device may need to stop or suspend providing a certain service function.
- a service offload request including at least the service identifier of the uninstalled service is sent by the first device, and Transferring to each device interconnected with the master device through a connection between devices; each device other than the first device deletes the remote service including the service identifier from its own service configuration information according to the received service uninstallation request Configuration item.
- the program running on the first device that needs to stop or suspend the service may first cancel the service provided by the SM, and the SM deletes the corresponding local service configuration item, and generates the inclusion according to the change of the local service configuration item.
- Service offload request for the service ID of the uninstall service When the first device is the master device, the SM of the first device sends a service offload request to the bus control module, and when the first device is the slave device, the SM of the first device sends a service offload request to the bus client module, and the bus The client module sends a service offload request to the bus control module of the master device.
- the bus control module sends a service offload request to each device in a broadcast manner by using the device bus, and each device except the first device sends the received service offload request to the SM on the device, and the SM deletes the service configuration information from the SM.
- the remote service configuration item of the service identifier of the uninstalled service if the corresponding proxy has been previously generated for the uninstalled service, the SM may trigger an operation of deleting the corresponding proxy.
- the first device may send a device disconnection request to the master device, where the request carries at least the first device identifier; and the master device connects the device with the device, The device disconnection request is forwarded to each device; each device except the first device deletes all remote service configuration items including the first device identifier from its own service configuration information according to the received device disconnection request. .
- the device disconnection command is usually issued by the user or the system to the first device, and the bus client module of the first device sends a device disconnect request to the bus control module of the master device, where the request carries at least the first device. Identifying; the bus control module of the master device forwards the device disconnection request to each device on the device bus through a connection between the device and the device; and the devices other than the first device After receiving the device disconnection request, the bus client module sends the device disconnection request to the respective SM, and the SM of each device deletes the remote service configuration item related to the first device from the service configuration information, that is, deletes All remote service configuration items including the first device identifier may be notified to the bus client module to delete the corresponding proxy if the corresponding proxy has been generated for each service provided by the first device.
- the device bus can also be logged out.
- the first device is the master device, after receiving the bus logout command, the first device sends the bus logout command to each device by means of broadcast transmission by using the device bus.
- the devices remove all remote service configuration items from their service configuration information according to the received bus destruction instruction.
- the bus destruction instruction is usually sent by the user or the system to the main device, and the bus control module of the first device (the main device) broadcasts the bus destruction instruction to each device on the device bus, and the bus client of each device The module sends the received bus destruction instruction to the SM, and the SM deletes all the remote service configuration items in the service configuration information. If the deleted remote service configuration item has a corresponding agent, the SM may notify the bus control module to delete the corresponding agent. Thereafter, the first device can delete the connection port, thereby completing the destruction process of the device bus.
- the remote service configuration item in the service configuration information may further include a device bus identifier (for example, a device bus name) for indicating a device bus providing the corresponding service, which may be carried in the bus destruction instruction.
- the bus identifier of the bus created by the first device so that the SM on each device can delete the remote service configuration item related to the bus identifier from the service configuration information according to the received bus destruction instruction (and notify the bus control module to delete the corresponding Agent).
- the first device in this embodiment may be any device on the device bus, that is, each device connected to the device bus may be based on itself.
- the actual situation can be performed by mounting the service, uninstalling the service, or disconnecting the device.
- the device bus can also be destroyed.
- the real-time update of the service configuration information can be implemented based on the device bus, so that each device on the device bus can correctly learn the service information provided by other devices, thereby providing a reliable basis for the cross-device access service.
- FIG. 11 is a schematic diagram of an embodiment of a configuration apparatus for an inter-device service according to the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment. The device embodiments described below are merely illustrative.
- the configuration device for the inter-device service of the embodiment includes: a mount request transmitting unit 1101, a service mount request for at least a service provided by the first device, and a service mount request of the first device identifier by the The first device sends out and transmits to each device interconnected with the master device through a connection between the devices; the service configuration storage unit 1102 is configured to generate, according to the received service mount request, each device except the first device A remote service configuration item including at least the first device identifier and a service identifier of a service provided by the first device, and adding the remote service configuration item to its own service configuration information.
- the device includes:
- a service offload request transmitting unit configured to: after the service configuration storage unit completes the adding operation of the remote service configuration item, the service offloading request including at least the service identifier of the uninstalled service is sent by the first device and passed between the devices The connection is transmitted to each device interconnected with the master device;
- a first service configuration deleting unit configured to delete, by the devices other than the first device, the remote service configuration item that includes the service identifier from the service configuration information according to the received service uninstallation request.
- the device includes:
- a device disconnection request sending unit configured to: after the service configuration storage unit completes the adding operation of the remote service configuration item, the first device sends a device disconnection request to the primary device, where the request carries at least the first device identifier ;
- a device disconnect request forwarding unit configured to forward, by the master device, the device disconnection request to each device through a connection between the device and the device;
- a second service configuration deleting unit configured to delete, according to the received device disconnection request, each remote device configuration item including the first device identifier according to the received device disconnection request .
- FIG. 12 is a flowchart of an embodiment of a method for broadcasting information between devices according to the present application. The parts in this embodiment that are identical to the steps in the foregoing method embodiments are not described again. .
- a method for information broadcasting between devices provided by the present application includes:
- Step 1201 The broadcast request of the first application is sent by the first device running the first application, and is transmitted to each device interconnected with the master device through a connection between the devices.
- connection between the devices includes: a connection established by different devices through the connection port provided by the main device and the device.
- the following describes an example in which the first device is not the master device.
- the first application needs to broadcast information to the application on other devices.
- a broadcast request can be sent to the bus client module, and the broadcast request can carry the broadcasted information.
- the bus client module of the first device sends a broadcast request to the bus control module of the master device, and the bus control module of the master device transmits the broadcast request to each device on the device bus by means of broadcast transmission.
- Step 1202 Each device except the first device sends the received broadcast request to the respective hosted application.
- each device After receiving the broadcast request through the bus control module or the bus client module, each device (including the master device and each slave device) other than the first device sends the broadcast request to the respective hosted application process, each application.
- the program process can process the broadcast request according to its own needs, for example, can extract broadcast information from it. Or discard the broadcast request directly.
- the information bus method based on device bus has been described. It can be seen from the above description that the above method provides a weakly coupled communication mode, which is convenient for an application on a device to affirm information to an application on another device. Or sending a notification is a useful complement to the way information is exchanged between devices.
- FIG. 13 is a schematic diagram of an embodiment of an information broadcasting apparatus for inter-devices according to the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
- the device embodiments described below are merely illustrative.
- An information broadcasting apparatus for inter-devices of the embodiment includes: a broadcast request transmitting unit 1301, and a broadcast request for the first application is sent by the first device running the first application, and passes between the devices The connection is transmitted to each device interconnected with the master device; the broadcast request reporting unit 1302 is configured to send, by each device other than the first device, the received broadcast request to the respective hosted application.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media including both permanent and non-persistent, removable and non-removable media may be implemented by any method or technology.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- Computer readable media does not include non-transitory computer readable media as defined herein (transitory media), such as modulated data signals and carrier waves.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
- the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请公开了一种用于设备间服务的访问方法、配置方法及装置,其中,所述用于设备间服务的访问方法,包括:第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能;其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。采用本方法,单个设备的部分能力可以成为标准化的功能模块为其他设备服务,使设备间的功能组合成为可能,进而形成更为复杂和灵活的功能系统。本申请还提供了一种设备间的信息广播方法及装置。
Description
本申请要求2016年03月22日递交的申请号为201610166346.8、发明名称为“用于设备间服务的访问方法、配置方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及服务访问技术,具体涉及一种用于设备间服务的访问方法及装置。本申请同时涉及一种用于设备间服务的配置方法及装置,以及一种设备间的信息广播方法及装置。
随着计算机和网络技术的发展,个人电脑、智能手机等电子设备都得到了广泛的应用。这些电子设备上不仅可以安装应用程序,为用户提供丰富的服务功能,例如:播放音乐、存储数据等;还可以具有通过特定的访问接口为应用程序提供服务的服务提供方,所述服务提供方可以是应用程序,也可以是系统程序。
在具体应用中,为了便于应用程序之间、以及应用程序与系统程序之间的互通,满足不同程序之间的服务访问需求,出现了很多IPC(Interprocess Communication进程间通信)机制,用来实现程序进程之间的通信,D-Bus就是其中一种,其主要用途是在Linux桌面环境为进程提供通信,同时能将Linux桌面环境和Linux内核事件作为消息传递到进程,并能够实现各种复杂的进程间通信任务。
但是D-Bus的应用仅仅局限于一个设备内部,对于设备之间服务的访问需求则无法满足。例如在车载系统中包括智能手机、wifi音箱等多个电子设备,各个设备提供的功能彼此独立,如果用户希望欣赏某个电子设备(例如:智能手机)中的乐曲,而该电子设备由于音频硬件设施发生故障无法实现音频播放功能,那么用户或者放弃欣赏,或者需要手动将待播放曲目复制到wifi音箱的存储介质中才能播放。由此可见,现有各设备之间提供的服务功能彼此独立,不便于用户使用,影响用户的使用体验。
发明内容
本申请实施例提供一种用于设备间服务的访问方法和装置,以解决现有设备之间提供的服务功能彼此独立、不便于用户使用的问题。本申请实施例还提供用于设备间服务
的配置方法及装置,以及一种设备间的信息广播方法及装置。
本申请提供一种用于设备间服务的访问方法,包括:
第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;
所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能;
其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。
可选的,所述设备间的联接是通过如下方式预先建立的:
所述主设备创建用于与其他设备建立联接的联接端口;
当所述源设备为非主设备的从设备时,所述源设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和源设备之间的数据连接,以完成源设备和主设备之间的联接过程;
当所述目标设备为非主设备的从设备时,所述目标设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和目标设备之间的数据连接,以完成目标设备和主设备之间的联接过程。
可选的,所述主设备创建联接端口、以及根据接收到的联接请求与从设备建立数据连接的操作,由所述主设备上的总线控制模块执行;
所述从设备通过发送联接请求与主设备建立数据连接的操作,由所述从设备上的总线客户端模块执行。
可选的,所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:
所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备;所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:
目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能。
可选的,所述源设备的服务配置信息包括至少具有以下信息的远程服务配置项:所述目标设备标识,以及所述特定服务的服务标识;所述服务标识包括:服务名称;
所述目标设备的服务配置信息包括至少具有以下信息的本地服务配置项:所述特定服务的服务标识,以及提供所述特定服务的第二程序进程的标识。
可选的,所述源设备的服务配置信息的生成方式包括如下所述的服务挂载过程:
至少包含所述目标设备标识以及所述特定服务的服务标识的服务挂载请求由所述目标设备发出,并通过所述设备间的联接传送给至少包括所述源设备的各设备;
所述源设备根据接收到的服务挂载请求,生成至少包含所述目标设备标识以及所述特定服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
可选的,所述目标设备通过如下方式生成所述服务挂载请求:
所述第二程序将自己提供的所述特定服务注册到目标设备的服务配置信息中,以在所述服务配置信息中生成相应的本地服务配置项;
根据所述本地服务配置项中包含的所述特定服务的服务标识以及所述目标设备标识,生成所述服务挂载请求。
可选的,当所述源设备为主设备时,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备,包括:
所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
所述源设备根据封装后的访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
可选的,当所述目标设备为主设备时,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备,包括:
所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
所述源设备利用已与所述目标设备建立的联接,将封装后的访问请求发送给所述目标设备。
可选的,当所述源设备以及所述目标设备都不为主设备时,所述源设备根据预先存
储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备,包括:
所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的标识和所述目标设备标识;
所述源设备利用已与所述主设备建立的联接,将封装后的访问请求发送给所述主设备;
所述主设备根据接收到的所述访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
可选的,所述目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能,包括:
所述目标设备接收所述访问请求后执行解封装操作,并获取被访问的服务标识;
所述目标设备根据所述被访问的服务标识查找服务配置信息中的本地服务配置项,获取提供相应服务的第二程序进程的标识;
所述目标设备根据所述第二程序进程的标识,将解封装后的访问请求转发给所述第二程序,由所述第二程序执行相应的服务功能。
可选的,所述源设备的服务配置信息中的、对应于所述特定服务的远程服务配置项中的信息还包括:代理标识,其对应的代理是在生成所述远程服务配置项时生成的、负责为访问所述特定服务提供至少包括封装功能的代理服务;
所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识,包括:
所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识;
所述第一程序根据所述代理标识,将包含所述特定服务的服务标识的访问请求发送给相应的代理,并由所述代理为所述访问请求封装所述目标设备标识。
可选的,所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识,包括:
所述第一程序根据所述特定服务的服务标识查询服务配置信息;
当服务配置信息中存在两个或者两个以上与所述特定服务的服务标识相对应的远程服务配置项时,则按照预设的优先级规则选择其中一个远程服务配置项中的代理标识作为为访问所述特定服务提供代理服务的代理标识。
可选的,所述主设备在非主设备的从设备间转发消息、在本设备与从设备间转发消息、以及提供代理服务的操作,由主设备上的总线控制模块执行;
从设备在本设备与主设备间转发消息、以及提供代理服务的操作,由从设备上的总线控制模块执行。
可选的,在第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备的过程中,包括:所述主设备根据预设的消息转发规则,判断是否可以利用设备间的联接转发所述访问请求,并在可以时执行相应的转发操作。
可选的,所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序后,还包括:
第二程序针对所述访问请求的应答信息由所述目标设备发出、并通过所述设备间的联接传送给所述源设备;
所述源设备将接收到的所述应答信息返回给所述第一程序。
可选的,所述主设备的数目大于1,各主设备之间彼此级联,非主设备的设备分别从属于一个主设备;
所述设备间的联接包括:不同设备分别通过其主设备提供的联接端口与所述主设备建立的联接,以及主设备之间的级联联接。
可选的,所述联接端口包括:TCP端口,或者UDP端口。
可选的,所述方法应用于车载系统中,所述特定服务包括:音频播放服务,所述源设备包括:智能手机,所述目标设备包括:车载音响设备;
所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对音频播放服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述音频播放服务的车载音响设备;
所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述车载音响设备将接收到的所述访问请求转发给在其上运行的音频播放程序,并由所述音频播放程序执行相应的音频播放功能。
可选的,所述方法应用于车载系统中,所述特定服务包括:视频播放服务,所述源设备包括:智能手机,所述目标设备包括:车载DVD;
所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设
备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对视频播放服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述视频播放服务的车载DVD;
所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述车载DVD将接收到的所述访问请求转发给在其上运行的视频播放程序,并由所述视频播放程序执行相应的视频播放功能。
可选的,所述方法应用于车载系统中,所述特定服务包括:数据存储服务,所述源设备包括:智能手机,所述目标设备包括:车载硬盘机;
所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对数据存储服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述数据存储服务的车载硬盘机;
所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述车载硬盘机将接收到的所述访问请求转发给在其上运行的数据存储程序,并由所述数据存储程序执行相应的数据存储功能。
可选的,所述方法应用于家庭娱乐系统中,所述特定服务包括:视频播放服务,所述源设备包括:智能手机,所述目标设备包括:智能电视或者平板电脑;
所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对视频播放服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述视频播放服务的智能电视或者平板电脑;
所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述智能电视或者平板电脑将接收到的所述访问请求转发给在其上运行的视频播放程序,并由所述视频播放程序执行相应的视频播放功能。
相应的,本申请还提供一种用于设备间服务的访问装置,包括:
访问请求传送单元,用于第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;
目标服务提供单元,用于所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能。
可选的,所述装置包括:
联接端口创建单元,用于所述主设备创建用于与其他设备建立联接的联接端口;
源设备联接单元,用于当所述源设备为非主设备的从设备时,所述源设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和源设备之间的数据连接,以完成源设备和主设备之间的联接过程;
目标设备联接单元,用于当所述目标设备为非主设备的从设备时,所述目标设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和目标设备之间的数据连接,以完成目标设备和主设备之间的联接过程。
可选的,所述访问请求传送单元具体用于,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备;所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
所述目标服务提供单元具体用于,目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能。
可选的,所述装置包括:
目标设备服务挂载请求传送单元,用于至少包含所述目标设备标识以及所述特定服务的服务标识的服务挂载请求由所述目标设备发出,并通过所述设备间的联接传送给至少包括所述源设备的各设备;
源设备服务配置信息存储单元,用于所述源设备根据接收到的服务挂载请求,生成至少包含所述目标设备标识以及所述特定服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
可选的,所述装置还包括:
本地服务注册单元,用于所述第二程序将自己提供的所述特定服务注册到目标设备的服务配置信息中,以在所述服务配置信息中生成相应的本地服务配置项;
服务挂载请求生成单元,用于根据所述本地服务配置项中包含的所述特定服务的标识以及所述目标设备标识,生成所述服务挂载请求。
可选的,所述访问请求传送单元包括:
访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
第一访问请求发送子单元,用于所述源设备根据封装后的访问请求包含的目标设备
标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
可选的,所述访问请求传送单元包括:
访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
第二访问请求发送子单元,用于所述源设备利用已与所述目标设备建立的联接,将封装后的访问请求发送给所述目标设备。
可选的,所述访问请求传送单元包括:
访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
第三访问请求发送子单元,用于所述源设备利用已与所述主设备建立的联接,将封装后的访问请求发送给所述主设备;
访问请求转发子单元,用于所述主设备根据接收到的所述访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
可选的,所述目标服务提供单元包括:
访问请求接收子单元,用于所述目标设备接收所述访问请求后执行解封装操作,并获取被访问的服务标识;
目标进程查找子单元,用于所述目标设备根据所述被访问的服务标识查找服务配置信息中的本地服务配置项,获取提供相应服务的第二程序进程的标识;
目标服务提供子单元,用于所述目标设备根据所述第二程序进程的标识,将解封装后的访问请求转发给所述第二程序,由所述第二程序执行相应的服务功能。
可选的,所述访问请求封装子单元包括:
代理标识获取子单元,用于所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识;
代理服务封装子单元,用于所述第一程序根据所述代理标识,将包含所述特定服务的服务标识的访问请求发送给相应的代理,并由所述代理为所述访问请求封装所述目标设备标识。
可选的,所述装置还包括:
应答信息传送单元,用于当所述目标服务提供单元执行完毕其功能后,第二程序针
对所述访问请求的应答信息由所述目标设备发出、并通过所述设备间的联接传送给所述源设备;
应答信息返回单元,用于所述源设备将接收到的所述应答信息返回给所述第一程序。
此外,本申请还提供一种用于设备间服务的配置方法,包括:
至少包含第一设备所提供服务的服务标识以及第一设备标识的服务挂载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;
除所述第一设备之外的各设备根据接收到的服务挂载请求,生成至少包含所述第一设备标识以及第一设备所提供服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。
可选的,所述第一设备通过如下方式生成所述服务挂载请求:
在第一设备上运行的应用程序将各自提供的服务注册到第一设备的服务配置信息中,以在所述服务配置信息中生成本地服务配置项;
根据所述本地服务配置项中包含的服务标识以及第一设备的设备标识,生成所述服务挂载请求。
可选的,在所述除所述第一设备之外的各设备将所述远程服务配置项添加到自己的服务配置信息中后,还包括:
至少包含被卸载服务的服务标识的服务卸载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;
除所述第一设备之外的各设备根据接收到的服务卸载请求,从自己的服务配置信息中删除包含所述服务标识的远程服务配置项。
可选的,当所述第一设备不是主设备时,在所述除所述第一设备之外的各设备将所述远程服务配置项添加到自己的服务配置信息中后,还包括:
所述第一设备向主设备发送设备断开请求,所述请求中至少携带第一设备标识;
所述主设备通过其与各设备之间的联接、将所述设备断开请求转发给各设备;
除所述第一设备之外的各设备根据接收到的设备断开请求,从自己的服务配置信息中删除包含所述第一设备标识的所有远程服务配置项。
相应的,本申请还提供一种用于设备间服务的配置装置,包括:
挂载请求传送单元,用于至少包含第一设备所提供服务的服务标识以及第一设备标
识的服务挂载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;
服务配置存储单元,用于除所述第一设备之外的各设备根据接收到的服务挂载请求,生成至少包含所述第一设备标识以及第一设备所提供服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
可选的,所述装置包括:
卸载请求传送单元,用于在所述服务配置存储单元完成远程服务配置项的添加操作后,至少包含被卸载服务的服务标识的服务卸载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;
第一服务配置删除单元,用于除所述第一设备之外的各设备根据接收到的服务卸载请求,从自己的服务配置信息中删除包含所述服务标识的远程服务配置项。
可选的,所述装置包括:
设备断开请求发送单元,用于在所述服务配置存储单元完成远程服务配置项的添加操作后,所述第一设备向主设备发送设备断开请求,所述请求中至少携带第一设备标识;
设备断开请求转发单元,用于所述主设备通过其与各设备之间的联接、将所述设备断开请求转发给各设备;
第二服务配置删除单元,用于除所述第一设备之外的各设备根据接收到的设备断开请求,从自己的服务配置信息中删除包含所述第一设备标识的所有远程服务配置项。
此外,本申请还提供一种用于设备间的信息广播方法,包括:
第一应用程序的广播请求由运行所述第一应用程序的第一设备发出,并通过设备间的联接传送到与主设备互联的各设备;
除所述第一设备之外的各设备将接收到的广播请求发送给各自承载的应用程序;
其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述设备建立的联接。
相应的,本申请还提供一种用于设备间的信息广播装置,包括:
广播请求传送单元,用于第一应用程序的广播请求由运行所述第一应用程序的第一设备发出,并通过设备间的联接传送到与主设备互联的各设备;
广播请求上报单元,用于除所述第一设备之外的各设备将接收到的广播请求发送给各自承载的应用程序。
与现有技术相比,本申请具有以下优点:
本申请提供的用于设备间的服务访问方法,第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。
采用本申请提供的上述方法,由于各设备通过主设备提供的联接端口与主设备建立联接,相当于在各设备之间形成了虚拟的设备总线,并可以基于所述设备总线实现跨设备的服务访问功能,从而单个设备的部分能力可以成为标准化的功能模块为其他设备服务,使设备间的功能组合成为可能,进而形成更为复杂和灵活的功能系统。
图1是本申请的一种设备间服务的访问方法的实施例的流程图;
图2是本申请实施例提供的源设备为主设备时的架构示意图;
图3是本申请实施例提供的源设备为主设备时、访问请求传送至目标设备的处理流程图;
图4是本申请实施例提供的目标设备为主设备时的架构示意图;
图5是本申请实施例提供的目标设备为主设备时、访问请求传送至目标设备的处理流程图;
图6是本申请实施例提供的源设备和目标设备都不为主设备时的架构示意图;
图7是本申请实施例提供的源设备和目标设备都不为主设备时、访问请求传送至目标设备的处理流程图;
图8是本申请实施例提供的目标设备将访问请求转发给第二程序的处理流程图;
图9是本申请的一种用于设备间服务的访问装置的实施例的示意图;
图10是本申请的一种用于设备间服务的配置方法的实施例的流程图;
图11是本申请的一种用于设备间服务的配置装置的实施例的示意图;
图12是本申请的一种用于设备间的信息广播方法的实施例的流程图;
图13是本申请的一种用于设备间的信息广播装置的实施例的示意图。
在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是,本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此,本申请不受下面公开的具体实施的限制。
在本申请中,分别提供了一种用于设备间服务的访问方法及装置,一种用于设备间服务的配置方法及装置,以及一种用于设备间的信息广播方法及装置。在下面的实施例中逐一进行详细说明。
本实施例提供一种用于设备间服务的访问方法的具体实施方式,所述方法的核心在于:主设备提供联接端口,相当于对外提供了虚拟设备总线的接入插槽,为其他设备提供服务或者需要跨设备访问服务的从设备,可以通过所述联接端口实现与主设备之间的联接,即:接入设备总线;某一设备上的第一程序的服务访问请求可以通过设备总线(设备间的联接)传送给提供所述服务的另一设备,并由该设备上的第二程序执行相应的服务功能,从而实现跨设备的服务访问功能。而且由于主设备提供了设备总线,对外提供服务或者需要跨设备访问服务的新增设备,可以通过向主设备联接端口发送请求的方式快捷地接入到设备总线上、实现与设备总线上各个设备的互相访问,而不必与其他各设备分别进行联接,可以降低组网复杂度,简化操作过程,提高执行效率。
从维护设备总线的角度出发,本技术方案中涉及的设备可以划分为主设备和从设备,主设备是创建设备总线的设备,从设备是接入设备总线的设备。在实施本实施例的方法之前,可以先建立主设备和从设备之间的联接,具体实现可以是:主设备创建用于与从设备建立联接的联接端口,创建联接端口相当于创建了设备总线;从设备向所述联接端口发送接入设备总线的联接请求,主设备则根据接收到的联接请求与所述从设备建立数据连接,并可以将每条数据连接与从设备的设备标识相对应,从而完成从设备和主设备之间的联接过程(也可以称为从设备联接到总线上)。此后,从设备可以通过与主设备间的联接与主设备进行消息传送,主设备则可以根据消息携带的目标设备标识,利用已建立的相应联接,进行消息的转发。
这里对本实施例中的“联接”以及“数据连接”的表述进行说明,对于本技术方案的实现来说,两种表述方式的含义是一致的,只是表述角度不同,其中,联接侧重表达的是以主设备为中心的连接,数据连接则是侧重表达两点之间的连接。
在具体实施时,为了保证只有可靠设备才能接入设备总线,主设备可以预设联接凭据,例如密码,从设备也可以预置所述联接凭据,当从设备向联接端口发送联接请求时需要携带联接凭据,主设备验证联接凭据正确后,才能够与从设备建立联接关系。类似
的道理,主设备在建立与从设备的联接关系后,可以向从设备返回联接成功应答,并在应答中携带自己的身份信息,例如:身份证书等,从而从设备可以确认主设备的身份,并可以在后续的操作中向主设备发送各种消息,例如:服务挂载请求、访问请求等。
需要说明的是,主设备和从设备之间的数据连接,可以采用TCP或者UDP协议建立,所述联接端口可以为预设的TCP端口或者UDP端口,也可以采用其他网络协议建立,只要能够在主设备和从设备之间建立数据连接,就同样可以实现本申请的技术方案。
在本技术方案中,针对一次设备间服务的访问过程,将其中提供服务的程序所在的设备称为目标设备,将发出访问请求的程序所在设备称为源设备。具体实施时,主设备上也可以运行应用程序,因此对于一次设备间服务访问过程来说,可能存在源设备为主设备的情况,目标设备为主设备的情况,以及源设备和目标设备都不是主设备的情况。
本实施例提供的用于设备间服务的访问方法,包括以下步骤:第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能。其中,发起所述访问请求的第一程序通常为应用程序,提供所述特定服务的第二程序可以是应用程序、也可以是系统程序。
下面对于访问请求通过设备间的联接传送到目标设备的过程作简要说明。如果源设备是主设备,那么源设备(主设备)可以从已与其建立的众多联接中选择与目标设备建立的联接将访问请求发送给目标设备;如果目标设备是主设备,那么源设备可以利用已与目标设备(主设备)建立的联接将访问请求发送给目标设备;如果源设备和目标设备都不是主设备,那么源设备可以利用已与主设备建立的联接将访问请求发送给主设备,主设备利用已与目标设备建立的联接将访问请求转发给目标设备。
可以考虑如下的相对简单的应用场景:在通过设备总线互联的各设备中,仅有所述目标设备上的第二程序对外提供所述特定服务,那么需要访问所述特定服务的源设备上的第一程序发起访问请求后,所述访问请求无需封装目标设备标识以及特定服务的标识,即可按照预设的固定方式通过设备间的联接传送到目标设备,并由目标设备触发第二程序执行相应的服务功能。
在具体实施时,应用场景通常更为复杂,例如可以由一个以上设备上的多个程序提供多个服务,并且各设备上的应用程序可以根据需要访问不同的服务,在这种情况下,可以在各设备中预先存储服务配置信息。对于某一设备来说,服务配置信息中可以包括两类服务配置项:本地服务配置项和远程服务配置项,其中,本地服务配置项中的信息
至少包括:提供服务的本地程序进程的标识(例如:进程句柄)以及其提供服务的服务标识(用于区分本设备上的不同服务,例如:服务名称或者服务序号);远程服务配置项中的信息至少包括:其他设备的设备标识、以及所述其他设备提供服务的服务标识,由于这类服务不是本地程序提供的,而是由其他设备提供的,因此在本实施例中称为远程服务,相应的服务配置信息项称为远程服务配置项。在本地服务配置项和远程服务配置项中还可以包括关于相应服务的描述信息等。
通过服务配置信息,源设备可以根据被访问服务的服务标识获知提供所述服务的目标设备标识,并可以将该信息封装在访问请求中;在利用设备间的联接传送所述访问请求时,主设备可以根据访问请求携带的目标设备标识决定执行设备间转发或者是执行设备内外间转发,从而将所述访问请求传送给目标设备;目标设备接收所述访问请求后,通过服务配置信息可以获知提供服务的程序进程标识,并将所述访问请求转发给正确的程序进程。在具体实施时,设备上的服务配置信息可以由设备管理人员通过配置接口进行配置,也可以通过读取配置文件等方式生成。
优选地,为了更为灵活地生成设备上的服务配置信息,真实地反映通过设备总线互联的各设备所提供的服务信息,本实施例提供通过设备总线动态挂载服务的实施方式,即:通过设备总线互联的设备,可以将其提供的服务信息通过设备总线传送给设备总线上的其他设备。
在本实施例中,在目标设备上运行的第二程序可以将其提供的服务注册到目标设备的服务配置信息中,从而在目标设备的服务配置信息中生成本地服务配置项;随后可以根据目标设备的标识以及所述本地服务配置项中包含的特定服务的服务标识生成服务挂载请求。目标设备将服务挂载请求发出,所述服务挂载请求通过设备间的联接传送到与主设备互联的各设备,例如:当目标设备不是主设备时,其可以将服务挂载请求发送给主设备,主设备通过设备总线(即:其与各设备建立的联接)将所述挂载请求转发给其他各设备,相当于一次广播发送的过程。除所述目标设备之外的各设备,其中包括本实施例所述的源设备,根据接收到的服务挂载请求,生成至少包含所述目标设备标识以及所述特定服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
类似的,如果目标设备是主设备,那么目标设备可以直接将服务挂载请求通过设备总线广播给其他各设备,从而所述各设备(包括源设备)可以在自己的服务配置信息中生成相应的远程服务配置项。
主设备以及与主设备互联的各个设备可以通过上述方式,将本地程序提供的服务信息以服务挂载的方式通知给设备总线上的其他设备,从而设备总线上的各设备都可以获知其他设备提供的服务。在具体实施时,对于服务配置信息的管理可以由专门的模块负责,例如:服务管理器模块(Service Manager—简称SM),各设备可以有自己的SM,该模块负责根据本地程序的注册生成服务配置信息中的本地服务配置项,并发起服务挂载请求;还负责根据来自其他设备的服务挂载请求,生成服务配置信息中的远程服务配置项,并可以提供对服务配置信息的查询功能,例如:对于本实施例中的源设备,可以根据特定服务的服务标识查询对应的目标设备标识,对于目标设备,则可以根据接收到的访问请求中包含的所述特定服务的服务标识查询对应的第二程序进程的标识。
在具体实施时,可以由SM检测到服务配置信息中增加本地服务配置项后,发起服务挂载请求,例如:目标设备上的各程序启动后通常会将其提供的服务向SM注册,当目标设备与主设备建立联接后,SM可以根据本地服务配置项中的服务信息发起服务挂载请求,从而以全量的形式将本地服务信息广播给总线上的其他设备;此外,如果目标设备启动新的程序、或者某个已启动程序提供新的服务,同样会向SM注册,SM检测到新增的本地服务配置项后,同样可以发起服务挂载请求,以增量的方式将新的服务信息广播给总线上的其他设备。需要说明的是,程序向SM注册服务时,还可以携带服务是否可以对外提供的属性,从而SM可以仅针对可对外提供的服务信息发起服务挂载请求。
在具体实施时,为了向上层应用屏蔽设备总线的细节,可以将主设备和从设备执行的与设备总线相关的操作,分别封装在特定的功能模块中实现。例如:可以在主设备中封装总线控制模块(也称BusHost模块),负责创建联接端口、根据接收到的联接请求与从设备建立数据连接,以及利用已建立的联接在不同设备间转发消息、在本设备与其他设备间转发消息;可以在从设备中封装总线客户端模块(也称BusClient模块),负责通过向联接端口发送联接请求与主设备建立数据连接、以及利用已建立的联接在本设备与主设备间转发消息。所述消息包括:服务挂载消息、访问消息等。
对于主设备来说,其上的各程序、SM模块、以及总线控制模块,通常是以进程的形式运行,在本实施例中,各个进程之间通过本地总线,例如:D-Bus进行消息转发等交互操作。在其他实施方式中,也可以采用其他IPC机制实现进程间通信,本申请对此不作具体限定。
在本实施例中,通过上面描述的服务挂载过程,所述源设备的服务配置信息包括具有以下信息的远程服务配置项:所述目标设备标识,以及所述特定服务的服务标识;所
述目标设备的服务配置信息包括具有以下信息的本地服务配置项:所述特定服务的服务标识,以及提供所述特定服务的第二程序进程的标识。在此基础上,就可以执行本实施例提供的方法,由源设备上的第一程序访问目标设备上的第二程序提供的服务。下面基于采用服务配置信息的优选实施方式,对上述设备间服务的访问过程的具体实施方式作详细说明。
请参考图1,其为本申请的一种用于设备间服务的访问方法的实施例的流程图。所述方法包括如下步骤:
步骤101、第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备。
本步骤中,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备;所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识。
考虑到在具体实施时可能存在三种情况:发起访问请求的源设备为主设备、提供特定服务的目标设备为主设备、源设备和目标设备都不是主设备。下面针对这三种情况分别进行描述。
(一)源设备为主设备。
请参见图2,其为源设备为主设备时的架构示意图。其中,访问请求传送到目标设备的处理过程包括以下步骤101-1-1至101-1-2,下面结合图3进行说明。
步骤101-1-1、所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识。
源设备上的第一程序可以生成对特定服务的访问请求,所述访问请求中包含所述特定服务的服务标识(例如:服务名称),随后向SM发起查询请求,SM根据第一程序提供的特定服务的服务标识查找服务配置信息,在其远程服务配置项中找到与所述服务标识对应的目标设备标识,并将其返回给第一程序,第一程序可以为其访问请求封装所述目标设备标识,还可以按照所述目标设备可以识别的消息格式进行相应的封装。此后,第一程序可以将封装好的访问请求通过本地总线发送给总线控制模块。
优选地,为了简化应用程序的代码设计,尽可能实现代码的复用,本实施例提供将封装功能从应用程序中剥离出来、交由代理完成的优选实施方式。采用这种方式,应用程序不会感知服务的位置,相当于对应用程序屏蔽了访问本地服务和远程服务的差异。
为了实施上述优选实施方式,接收到服务挂载请求的设备可以针对其中每个服务生成相应的代理。对于源设备为主设备的情况,在之前描述的服务挂载过程中,源设备在生成包含所述特定服务的服务标识以及目标设备标识的远程服务配置项时,还可以在总线控制模块中生成相应的代理(如果源设备不是主设备,则可以在其总线客户端模块中生成相应的代理),用于为所述特定服务提供至少包括封装功能的代理服务。因此所述源设备的服务配置信息中的、对应于所述特定服务的远程服务配置项还可以包括以下信息:对应代理的标识(例如:代理的句柄)。
因此本步骤的实施过程可以包括:源设备上的第一程序在发起对特定服务的访问请求前,向SM发起查询请求,SM根据第一程序提供的特定服务的服务标识(例如:服务名称)查找服务配置信息,在其远程服务配置项中找到与所述服务标识对应的代理标识,并将其返回给第一程序,第一程序根据所述代理标识,将包含所述特定服务的服务标识的访问请求通过本地总线发送给总线控制模块中的相应代理,并由所述代理为所述访问请求封装所述目标设备标识。在具体实施时,所述代理还可以执行其他封装操作,例如:将所述访问请求封装成所述目标设备可以识别的消息格式等。
优选地,如果SM根据第一程序提供的特定服务的服务标识查找服务配置信息时,找到了两个或者两个以上与所述服务标识相对应的远程服务配置项,那么SM可以按照预设的优先级规则选择其中一个远程服务配置项中的代理标识返回给第一程序。
举例说明,第一程序用特定服务的名称serv1查询SM,SM如果找到两个远程服务配置项,说明有两个设备都提供名称为serv1的服务,此时SM可以按照预设的优先级规则进行选择。例如,按照服务挂载时间优先进行选择,即:选择挂载时间较早的远程服务配置项,然后将所选配置项中的代理标识返回给第一程序。
步骤101-1-2、所述源设备根据封装后的访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
所述源设备的总线控制模块,根据封装后的访问请求包含的目标设备标识,利用已与所述目标设备建立的联接(即:与所述目标设备标识对应的数据连接),将所述访问请求发送给所述目标设备的总线客户端模块。
优选地,为了对设备总线上的消息转发功能进行控制,可以为所述主设备预设消息转发规则,明确指定可以在哪些设备间转发消息。那么本步骤,由于源设备是主设备,因此总线控制模块在转发所述访问请求之前,可以从所述访问请求中提取目标设备标识,并根据所述消息转发规则判断是否可以将来自源设备内部的所述访问请求发送给目标设
备,并在可以时执行相应的转发操作,否则可以向第一程序返回访问失败应答,并且不再执行后续的操作。
(二)目标设备为主设备。
请参见图4,其为目标设备为主设备时的架构示意图。其中,访问请求传送到目标设备的处理过程包括以下步骤101-2-1至101-2-2,下面结合图5进行说明,其中与上述(一)中内容相同的部分不再赘述。
步骤101-2-1、所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识。
如果由所述第一程序自行进行封装,那么第一程序可以将封装后的所述访问请求通过本地总线发送给总线客户端模块;如果采用基于代理的优选实施方式,那么由总线客户端模块中的代理最终完成所述访问请求的封装操作。
步骤101-2-2、所述源设备利用已与所述目标设备建立的联接,将封装后的访问请求发送给所述目标设备。
源设备的总线客户端模块,利用已与所述目标设备建立的联接(即:源设备与主设备之间的数据连接),将所述访问请求发送给所述目标设备的总线控制模块。
目标设备(主设备)的总线控制模块接收所述访问请求后,根据所述访问请求携带的目标设备标识,判断出本设备即为所述访问请求的目标设备,因此不再向其他设备转发所述访问请求。
此外,由于目标设备是主设备,因此总线控制模块可以根据预设的消息转发规则,判断是否可以将从源设备接收到的所述访问请求发送给目标设备,即:通过本地总线传递到目标设备内部,如果不可以,则向源设备返回访问失败应答,并且不再执行后续的操作。
(三)源设备和目标设备都不是主设备。
请参见图6,其为源设备和目标设备都不是主设备时的架构示意图。其中,访问请求传送到目标设备的处理过程包括以下步骤101-3-1至101-3-3,下面结合图7进行说明,其中与上述(一)或(二)中内容相同的部分不再赘述。
步骤101-3-1、所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的标识和所述目标设备标识。
如果由所述第一程序自行进行封装,那么第一程序可以将封装后的所述访问请求通过本地总线发送给总线客户端模块;如果采用基于代理优选实施方式,那么由总线客户
端模块中的代理最终完成所述访问请求的封装操作。
步骤101-3-2、所述源设备利用已与所述主设备建立的联接,将封装后的访问请求发送给所述主设备。
源设备的总线客户端模块,利用已与主设备建立的联接(即:源设备与主设备之间的数据连接),将所述访问请求发送给主设备的总线控制模块。
步骤101-3-3、所述主设备根据接收到的所述访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
主设备的总线控制模块接收所述访问请求后,可以利用已与目标设备建立的联接(即:与所述目标设备标识对应的数据连接),将所述访问请求转发给目标设备的总线客户端模块。
同样的道理,主设备的总线控制模块在执行上述转发操作之前,可以从所述访问请求中提取目标设备标识,并根据预设的消息转发规则,判断是否可以将从源设备接收到的所述访问请求转发给目标设备,如果可以执行相应的转发操作,否则可以向源设备返回访问失败应答,并且不再执行后续的操作。
步骤102、所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能。
在本步骤中,目标设备可以根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能。
在具体实现时可以包括以下步骤102-1至102-3,下面结合图8进行说明。
步骤102-1、所述目标设备接收所述访问请求后执行解封装操作,并获取被访问的服务标识。
如果目标设备为主设备,由总线控制模块接收所述访问请求,如果目标设备为从设备,由总线客户端模块接收所述访问请求。为了便于描述,将这两个模块统称为总线接口模块,总线接口模块针对接收到的访问请求执行解封装操作,并获取其携带的被访问的服务标识,即:第一程序访问的所述特定服务的服务标识。
步骤102-2、所述目标设备根据所述被访问的服务标识查找服务配置信息中的本地服务配置项,获取提供相应服务的第二程序进程的标识。
总线接口模块通过本地总线查询SM,SM根据查询请求中携带的服务标识在本地服务配置项中找到与所述服务标识对应的进程标识,即:提供所述特定服务的第二程序进程的标识,例如:进程句柄。
步骤102-3、所述目标设备根据所述第二程序进程的标识,将解封装后的访问请求转发给所述第二程序,由所述第二程序执行相应的服务功能。
总线接口模块根据第二程序进程的标识,通过本地总线将解封装后的访问请求发送给所述第二程序,第二程序接收所述访问请求后,执行相应的操作提供所述特定服务。
在具体实施时,当第二程序接收来自第一程序的所述访问请求后,可以将相应的应答信息返回给所述第一程序,以便于第一程序执行相应的处理。以目标设备为主设备为例,应答信息的返回过程可以包括:第二程序将应答信息发送给总线控制模块,总线控制模块通过源设备和目标设备之间的联接,将应答信息发送给源设备的总线客户端模块,源设备的总线客户端模块将所述应答信息发送给第一程序。
至此,通过步骤101-步骤102,对本实施例提供的用于设备间服务的访问方法的实施方式进行了详细说明。在具体应用中,还可以对本实施例描述的实施方式通过多个主设备之间的级联作进一步扩展,即:主设备的数目大于1,各主设备之间彼此级联,非主设备的设备分别从属于一个主设备;所述设备间的联接包括:不同设备分别通过其主设备提供的联接端口与所述主设备建立的联接,以及主设备之间的级联联接。在上述级联架构下,便于接入以及管理更多的设备,并且同样可以实现设备间服务的访问。
例如:设备A通过启动联接端口创建设备总线ABUS成为主设备,其他若干个设备联接到ABUS上;设备B也启动联接端口、创建以B为主设备的设备总线BBUS,其他若干个设备联接到BBUS上;设备B可以通过设备A的联接端口也联接到ABUS上,即:设备A与设备B级联联接,在设备B上可以设置消息转发规则,从而实现设备总线ABUS和BBUS之间的消息转发(包括:转发服务挂载请求、转发服务访问请求等)。在此基础上,联接到ABUS总线的设备可以访问BBUS总线上的设备提供的服务,联接到BBUS总线的设备也可以访问ABUS总线上的设备提供的服务,从而在级联架构下实现跨设备的服务访问过程。
在具体应用中,本实施例提供的方法可以应用于有跨设备服务访问需求的场景中,特别是可以在部署于有限空间的系统中应用,从而能够为用户提供更为直观、便捷的服务功能,例如可以应用于车载系统或者家庭娱乐系统中,下面对这两种应用场景分别进行说明。
在车载系统中,车载控制设备可以作为主设备创建设备总线,智能手机、车载音响设备、车载硬盘机、车载DVD等设备都联接到设备总线上,那么各设备就可以互相访问彼此提供的服务功能。例如:车载音响设备提供音频播放服务,智能手机上的某应用
程序需要访问音频播放服务,智能手机可以通过设备总线向车载音响设备发送访问请求,并在请求中携带待播放音频的相关数据,例如:音频数据文件,或者相关的资源地址信息等,该访问请求通过设备间的联接传送到车载音响设备,车载音响设备将接收到的该访问请求转发给在其上运行的音频播放程序,由音频播放程序执行相应的音频播放功能,从而为接入车载系统的智能手机提供了音频播放服务。同样的道理,智能手机也可以访问车载DVD设备提供的视频播放服务以及车载硬盘机提供的数据存储服务等,基本的访问过程与上述音频播放服务类似,此处不再赘述。
在家庭娱乐系统中,智能电视可以作为主设备创建设备总线,智能手机、平板电脑等设备都联接到设备总线上,那么各设备就可以互相访问彼此提供的服务功能。例如:智能电视提供视频播放服务,智能手机上的某应用程序需要访问视频播放服务,智能手机可以通过设备总线向智能电视发送访问请求,并在请求中携带待播放视频的相关数据,例如:视频数据文件,或者相关的资源地址信息等,该访问请求通过设备间的联接传送到智能电视,智能电视将接收到的该访问请求转发给在其上运行的视频播放程序,由视频播放程序执行相应的视频播放功能,从而为接入家庭娱乐系统的智能手机提供了视频播放服务。
综上所述,本实施例提供的用于设备间服务的访问方法,各设备通过主设备提供的联接端口与主设备建立联接,相当于在各设备之间形成了虚拟的设备总线,并可以基于所述设备总线实现跨设备的服务访问功能,从而单个设备的部分能力可以成为标准化的功能模块为其他设备服务,使设备间的功能组合成为可能,进而形成更为复杂和灵活的功能系统。
特别是,在部署于有限空间的系统(例如:车载系统或者家庭娱乐系统)中应用本方法,在基于设备总线实现跨设备服务访问体系的基础上,一方面由于接入设备的数量有限,从而能够较好地保护用户隐私,为跨设备服务访问提供安全性保障,另一方面,由于各设备都处于有限空间内,能够为用户提供更为直观的、近距离的服务体验,例如:更佳的视音频播放效果,从而显著提升用户的使用体验。
在上述的实施例中,提供了一种用于设备间服务的访问方法,与之相对应的,本申请还提供一种用于设备间服务的访问装置。请参看图9,其为本申请的一种用于设备间服务的访问装置实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示
意性的。
本实施例的一种用于设备间服务的访问装置,包括:访问请求传送单元901,用于第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;目标服务提供单元902,用于所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能。
可选的,所述装置包括:
联接端口创建单元,用于所述主设备创建用于与其他设备建立联接的联接端口;
源设备联接单元,用于当所述源设备为非主设备的从设备时,所述源设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和源设备之间的数据连接,以完成源设备和主设备之间的联接过程;
目标设备联接单元,用于当所述目标设备为非主设备的从设备时,所述目标设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和目标设备之间的数据连接,以完成目标设备和主设备之间的联接过程。
可选的,所述访问请求传送单元具体用于,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备;所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
所述目标服务提供单元具体用于,目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能。
可选的,所述装置包括:
目标设备服务挂载请求传送单元,用于至少包含所述目标设备标识以及所述特定服务的服务标识的服务挂载请求由所述目标设备发出,并通过所述设备间的联接传送给至少包括所述源设备的各设备;
源设备服务配置信息存储单元,用于所述源设备根据接收到的服务挂载请求,生成至少包含所述目标设备标识以及所述特定服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
可选的,所述装置还包括:
本地服务注册单元,用于所述第二程序将自己提供的所述特定服务注册到目标设备的服务配置信息中,以在所述服务配置信息中生成相应的本地服务配置项;
服务挂载请求生成单元,用于根据所述本地服务配置项中包含的所述特定服务的标识以及所述目标设备标识,生成所述服务挂载请求。
可选的,所述访问请求传送单元包括:
访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
第一访问请求发送子单元,用于所述源设备根据封装后的访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
可选的,所述访问请求传送单元包括:
访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
第二访问请求发送子单元,用于所述源设备利用已与所述目标设备建立的联接,将封装后的访问请求发送给所述目标设备。
可选的,所述访问请求传送单元包括:
访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;
第三访问请求发送子单元,用于所述源设备利用已与所述主设备建立的联接,将封装后的访问请求发送给所述主设备;
访问请求转发子单元,用于所述主设备根据接收到的所述访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
可选的,所述目标服务提供单元包括:
访问请求接收子单元,用于所述目标设备接收所述访问请求后执行解封装操作,并获取被访问的服务标识;
目标进程查找子单元,用于所述目标设备根据所述被访问的服务标识查找服务配置信息中的本地服务配置项,获取提供相应服务的第二程序进程的标识;
目标服务提供子单元,用于所述目标设备根据所述第二程序进程的标识,将解封装后的访问请求转发给所述第二程序,由所述第二程序执行相应的服务功能。
可选的,所述访问请求封装子单元包括:
代理标识获取子单元,用于所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识;
代理服务封装子单元,用于所述第一程序根据所述代理标识,将包含所述特定服务的服务标识的访问请求发送给相应的代理,并由所述代理为所述访问请求封装所述目标设备标识。
可选的,所述装置还包括:
应答信息传送单元,用于当所述目标服务提供单元执行完毕其功能后,第二程序针对所述访问请求的应答信息由所述目标设备发出、并通过所述设备间的联接传送给所述源设备;
应答信息返回单元,用于所述源设备将接收到的所述应答信息返回给所述第一程序。
此外,本申请还提供一种用于设备间服务的配置方法。请参考图10,其为本申请提供的用于设备间服务的配置方法的实施例的流程图,本实施例与上述方法实施例步骤相同的部分不再赘述,下面重点描述不同之处。本申请提供的一种用于设备间服务的配置方法包括:
步骤1001、至少包含第一设备所提供服务的服务标识以及第一设备标识的服务挂载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备。
其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。
所述第一设备可以通过如下方式生成所述服务挂载请求:在第一设备上运行的程序将各自提供的服务注册到第一设备的服务配置信息中,以在所述服务配置信息中生成本地服务配置项;根据所述本地服务配置项中包含的服务标识以及第一设备的设备标识,生成所述服务挂载请求。
步骤1002、除所述第一设备之外的各设备根据接收到的服务挂载请求,生成至少包含所述第一设备标识以及第一设备所提供服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
通过执行本步骤,联接在主设备创建的设备总线上的各个设备(除第一设备外)都针对第一设备提供的服务生成了远程服务配置项,即获知了第一设备对外提供的服务信息,从而在各设备上运行的应用程序就可以访问第一设备提供的相应服务了。
在此之后,还可以执行以下服务卸载流程、以及设备断开流程,下面分别进行说明。
(一)服务卸载流程
根据具体需求,第一设备上的某个程序可能需要对外停止或者暂停提供某个服务功能,这种情况下,至少包含被卸载服务的服务标识的服务卸载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;除所述第一设备之外的各设备根据接收到的服务卸载请求,从自己的服务配置信息中删除包含所述服务标识的远程服务配置项。
在具体实施时,在第一设备上运行的、需要停止或者暂停服务的程序可以先向SM注销其提供的服务,SM删除相应的本地服务配置项,并根据本地服务配置项的变更生成包含被卸载服务的服务标识的服务卸载请求。当第一设备为主设备时,第一设备的SM将服务卸载请求发送给总线控制模块,当第一设备为从设备时,第一设备的SM将服务卸载请求发送给总线客户端模块,总线客户端模块将服务卸载请求发送给主设备的总线控制模块。总线控制模块利用设备总线以广播方式将服务卸载请求发送给各个设备,除第一设备之外的各个设备将接收到的服务卸载请求发送给本设备上的SM,SM从服务配置信息中删除包含被卸载服务的服务标识的远程服务配置项,如果之前已针对所述被卸载服务生成了相应的代理,则SM可以触发删除相应代理的操作。
(二)设备断开流程
当第一设备不是主设备时,第一设备可以向主设备发送设备断开请求,所述请求中至少携带第一设备标识;所述主设备通过其与各设备之间的联接、将所述设备断开请求转发给各设备;除所述第一设备之外的各设备根据接收到的设备断开请求,从自己的服务配置信息中删除包含所述第一设备标识的所有远程服务配置项。
在具体实施时,通常由用户或者系统向第一设备下达设备断开指令,第一设备的总线客户端模块向主设备的总线控制模块发送设备断开请求,所述请求中至少携带第一设备标识;主设备的总线控制模块通过其与各设备之间的联接、采用广播的方式将所述设备断开请求转发给设备总线上的各设备;除所述第一设备之外的各设备的总线客户端模块接收所述设备断开请求后,将所述设备断开请求发送给各自的SM,各设备的SM从服务配置信息中删除与第一设备相关的远程服务配置项,即:删除包含所述第一设备标识的所有远程服务配置项,如果之前已针对第一设备提供的各服务生成了相应的代理,则SM可以通知总线客户端模块删除相应的代理。
此外,在具体应用中,还可以注销设备总线。当第一设备是主设备时,第一设备接收总线注销指令后,利用设备总线采用广播发送的方式将所述总线注销指令发送给各设
备;所述各设备根据接收到的总线销毁指令,从自己的服务配置信息中删除全部远程服务配置项。
在具体实施时,通常由用户或者系统向主设备发送总线销毁指令,第一设备(主设备)的总线控制模块将所述总线销毁指令广播给设备总线上个各设备,各设备的总线客户端模块将接收到的总线销毁指令发送给SM,SM删除服务配置信息中的全部远程服务配置项,如果被删除的远程服务配置项存在对应的代理,则SM可以通知总线控制模块删除相应的代理。此后,第一设备可以删除联接端口,从而完成设备总线的销毁流程。
对于多主设备级联的实施方式,服务配置信息中的远程服务配置项中还可以包含设备总线标识(例如:设备总线名称),用于表明提供相应服务的设备总线,总线销毁指令中可以携带第一设备所创建总线的总线标识,从而各个设备上的SM可以根据接收到的总线销毁指令,从服务配置信息中删除与所述总线标识相关的远程服务配置项(并通知总线控制模块删除相应的代理)。
至此对基于设备总线的服务配置过程进行了说明,实际应用中,本实施例中的第一设备可以为设备总线上的任意一个设备,即:联接到设备总线上的每个设备都可以根据自己的实际情况执行挂载服务、卸载服务、或者断开设备的操作,对于主设备还可以销毁设备总线。通过上述方式,可以基于设备总线实现服务配置信息的实时更新,使得设备总线上的各设备都可以正确获知其他设备提供的服务信息,从而可以为跨设备访问服务提供可靠依据。
在上述的实施例中,提供了一种用于设备间服务的配置方法,与之相对应的,本申请还提供一种用于设备间服务的配置装置。请参看图11,其为本申请的一种用于设备间服务的配置装置的实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例的一种用于设备间服务的配置装置,包括:挂载请求传送单元1101,用于至少包含第一设备所提供服务的服务标识以及第一设备标识的服务挂载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;服务配置存储单元1102,用于除所述第一设备之外的各设备根据接收到的服务挂载请求,生成至少包含所述第一设备标识以及第一设备所提供服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
可选的,所述装置包括:
服务卸载请求传送单元,用于在所述服务配置存储单元完成远程服务配置项的添加操作后,至少包含被卸载服务的服务标识的服务卸载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;
第一服务配置删除单元,用于除所述第一设备之外的各设备根据接收到的服务卸载请求,从自己的服务配置信息中删除包含所述服务标识的远程服务配置项。
可选的,所述装置包括:
设备断开请求发送单元,用于在所述服务配置存储单元完成远程服务配置项的添加操作后,所述第一设备向主设备发送设备断开请求,所述请求中至少携带第一设备标识;
设备断开请求转发单元,用于所述主设备通过其与各设备之间的联接、将所述设备断开请求转发给各设备;
第二服务配置删除单元,用于除所述第一设备之外的各设备根据接收到的设备断开请求,从自己的服务配置信息中删除包含所述第一设备标识的所有远程服务配置项。
此外,本申请还提供一种用于设备间的信息广播方法。请参考图12,其为本申请提供的一种用于设备间的信息广播方法的实施例的流程图,本实施例与上述方法实施例步骤相同的部分不再赘述,下面重点描述不同之处。本申请提供的一种用于设备间的信息广播方法包括:
步骤1201、第一应用程序的广播请求由运行所述第一应用程序的第一设备发出,并通过设备间的联接传送到与主设备互联的各设备。
其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述设备建立的联接。下面以第一设备不是主设备为例进行说明。
第一应用程序需要向其他设备上的应用程序广播信息,此时可以向总线客户端模块发送广播请求,广播请求中可以携带被广播的信息。第一设备的总线客户端模块将广播请求发送给主设备的总线控制模块,主设备的总线控制模块采用广播发送的方式,将广播请求发送给设备总线上的各设备。
步骤1202、除所述第一设备之外的各设备将接收到的广播请求发送给各自承载的应用程序。
除第一设备之外的各设备(包括主设备以及各从设备)通过总线控制模块或者总线客户端模块接收所述广播请求后,将所述广播请求发送给各自承载的应用程序进程,各应用程序进程可以根据自己的需要处理所述广播请求,例如:可以从中提取广播信息,
或者直接将所述广播请求丢弃。
至此,对基于设备总线的信息广播方法进行了描述,通过上述描述可以看出,上述方法提供了一种弱耦合的通讯方式,便于某一设备上的应用程序向其他设备上的应用程序申明信息或者发送通知,是设备间的信息交互方式的有益补充。
在上述的实施例中,提供了一种用于设备间的信息广播方法,与之相对应的,本申请还提供一种用于设备间的信息广播装置。请参看图13,其为本申请的一种用于设备间的信息广播装置的实施例的示意图。由于装置实施例基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例的一种用于设备间的信息广播装置,包括:广播请求传送单元1301,用于第一应用程序的广播请求由运行所述第一应用程序的第一设备发出,并通过设备间的联接传送到与主设备互联的各设备;广播请求上报单元1302,用于除所述第一设备之外的各设备将接收到的广播请求发送给各自承载的应用程序
本申请虽然以较佳实施例公开如上,但其并不是用来限定本申请,任何本领域技术人员在不脱离本申请的精神和范围内,都可以做出可能的变动和修改,因此本申请的保护范围应当以本申请权利要求所界定的范围为准。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
1、计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体
(transitory media),如调制的数据信号和载波。
2、本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
Claims (42)
- 一种用于设备间服务的访问方法,其特征在于,包括:第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能;其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。
- 根据权利要求1所述的用于设备间服务的访问方法,其特征在于,所述设备间的联接是通过如下方式预先建立的:所述主设备创建用于与其他设备建立联接的联接端口;当所述源设备为非主设备的从设备时,所述源设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和源设备之间的数据连接,以完成源设备和主设备之间的联接过程;当所述目标设备为非主设备的从设备时,所述目标设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和目标设备之间的数据连接,以完成目标设备和主设备之间的联接过程。
- 根据权利要求2所述的用于设备间服务的访问方法,其特征在于,所述主设备创建联接端口、以及根据接收到的联接请求与从设备建立数据连接的操作,由所述主设备上的总线控制模块执行;所述从设备通过发送联接请求与主设备建立数据连接的操作,由所述从设备上的总线客户端模块执行。
- 根据权利要求1所述的用于设备间服务的访问方法,其特征在于,所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备;所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第 二程序执行相应的服务功能,包括:目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能。
- 根据权利要求4所述的用于设备间服务的访问方法,其特征在于,所述源设备的服务配置信息包括至少具有以下信息的远程服务配置项:所述目标设备标识,以及所述特定服务的服务标识;所述服务标识包括:服务名称;所述目标设备的服务配置信息包括至少具有以下信息的本地服务配置项:所述特定服务的服务标识,以及提供所述特定服务的第二程序进程的标识。
- 根据权利要求5所述的用于设备间服务的访问方法,其特征在于,所述源设备的服务配置信息的生成方式包括如下所述的服务挂载过程:至少包含所述目标设备标识以及所述特定服务的服务标识的服务挂载请求由所述目标设备发出,并通过所述设备间的联接传送给至少包括所述源设备的各设备;所述源设备根据接收到的服务挂载请求,生成至少包含所述目标设备标识以及所述特定服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
- 根据权利要求6所述的用于设备间服务的访问方法,其特征在于,所述目标设备通过如下方式生成所述服务挂载请求:所述第二程序将自己提供的所述特定服务注册到目标设备的服务配置信息中,以在所述服务配置信息中生成相应的本地服务配置项;根据所述本地服务配置项中包含的所述特定服务的服务标识以及所述目标设备标识,生成所述服务挂载请求。
- 根据权利要求5所述的用于设备间服务的访问方法,其特征在于,当所述源设备为主设备时,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备,包括:所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;所述源设备根据封装后的访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
- 根据权利要求5所述的用于设备间服务的访问方法,其特征在于,当所述目标 设备为主设备时,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备,包括:所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;所述源设备利用已与所述目标设备建立的联接,将封装后的访问请求发送给所述目标设备。
- 根据权利要求5所述的用于设备间服务的访问方法,其特征在于,当所述源设备以及所述目标设备都不为主设备时,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所述特定服务的目标设备,包括:所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的标识和所述目标设备标识;所述源设备利用已与所述主设备建立的联接,将封装后的访问请求发送给所述主设备;所述主设备根据接收到的所述访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
- 根据权利要求8-10任一项所述的用于设备间服务的访问方法,其特征在于,所述目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能,包括:所述目标设备接收所述访问请求后执行解封装操作,并获取被访问的服务标识;所述目标设备根据所述被访问的服务标识查找服务配置信息中的本地服务配置项,获取提供相应服务的第二程序进程的标识;所述目标设备根据所述第二程序进程的标识,将解封装后的访问请求转发给所述第二程序,由所述第二程序执行相应的服务功能。
- 根据权利要求8-10任一项所述的用于设备间服务的访问方法,其特征在于,所述源设备的服务配置信息中的、对应于所述特定服务的远程服务配置项中的信息还包括:代理标识,其对应的代理是在生成所述远程服务配置项时生成的、负责为访问所述特定服务提供至少包括封装功能的代理服务;所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少 包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识,包括:所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识;所述第一程序根据所述代理标识,将包含所述特定服务的服务标识的访问请求发送给相应的代理,并由所述代理为所述访问请求封装所述目标设备标识。
- 根据权利要求12所述的用于设备间服务的访问方法,其特征在于,所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识,包括:所述第一程序根据所述特定服务的服务标识查询服务配置信息;当服务配置信息中存在两个或者两个以上与所述特定服务的服务标识相对应的远程服务配置项时,则按照预设的优先级规则选择其中一个远程服务配置项中的代理标识作为为访问所述特定服务提供代理服务的代理标识。
- 根据权利要求13所述的用于设备间服务的访问方法,其特征在于,所述主设备在非主设备的从设备间转发消息、在本设备与从设备间转发消息、以及提供代理服务的操作,由主设备上的总线控制模块执行;从设备在本设备与主设备间转发消息、以及提供代理服务的操作,由从设备上的总线控制模块执行。
- 根据权利要求1所述的用于设备间服务的访问方法,其特征在于,在第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备的过程中,包括:所述主设备根据预设的消息转发规则,判断是否可以利用设备间的联接转发所述访问请求,并在可以时执行相应的转发操作。
- 根据权利要求1所述的用于设备间服务的访问方法,其特征在于,所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序后,还包括:第二程序针对所述访问请求的应答信息由所述目标设备发出、并通过所述设备间的联接传送给所述源设备;所述源设备将接收到的所述应答信息返回给所述第一程序。
- 根据权利要求1所述的用于设备间服务的访问方法,其特征在于,所述主设备的数目大于1,各主设备之间彼此级联,非主设备的设备分别从属于一个主设备;所述设备间的联接包括:不同设备分别通过其主设备提供的联接端口与所述主设备建立的联接,以及主设备之间的级联联接。
- 根据权利要求1-10任一项所述的用于设备间服务的访问方法,其特征在于,所述联接端口包括:TCP端口,或者UDP端口。
- 根据权利要求1-10任一项所述的用于设备间服务的访问方法,其特征在于,所述方法应用于车载系统中,所述特定服务包括:音频播放服务,所述源设备包括:智能手机,所述目标设备包括:车载音响设备;所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对音频播放服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述音频播放服务的车载音响设备;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述车载音响设备将接收到的所述访问请求转发给在其上运行的音频播放程序,并由所述音频播放程序执行相应的音频播放功能。
- 根据权利要求1-10任一项所述的用于设备间服务的访问方法,其特征在于,所述方法应用于车载系统中,所述特定服务包括:视频播放服务,所述源设备包括:智能手机,所述目标设备包括:车载DVD;所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对视频播放服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述视频播放服务的车载DVD;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述车载DVD将接收到的所述访问请求转发给在其上运行的视频播放程序,并由所述视频播放程序执行相应的视频播放功能。
- 根据权利要求1-10任一项所述的用于设备间服务的访问方法,其特征在于,所述方法应用于车载系统中,所述特定服务包括:数据存储服务,所述源设备包括:智能手机,所述目标设备包括:车载硬盘机;所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对数据存储服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述数据存储服务的车载硬盘机;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第 二程序执行相应的服务功能,包括:所述车载硬盘机将接收到的所述访问请求转发给在其上运行的数据存储程序,并由所述数据存储程序执行相应的数据存储功能。
- 根据权利要求1-10任一项所述的用于设备间服务的访问方法,其特征在于,所述方法应用于家庭娱乐系统中,所述特定服务包括:视频播放服务,所述源设备包括:智能手机,所述目标设备包括:智能电视或者平板电脑;所述第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备,包括:第一程序对视频播放服务的访问请求由运行所述第一程序的智能手机发出、并通过设备间的联接传送到提供所述视频播放服务的智能电视或者平板电脑;所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能,包括:所述智能电视或者平板电脑将接收到的所述访问请求转发给在其上运行的视频播放程序,并由所述视频播放程序执行相应的视频播放功能。
- 一种用于设备间服务的访问装置,其特征在于,包括:访问请求传送单元,用于第一程序对特定服务的访问请求由运行所述第一程序的源设备发出、并通过设备间的联接传送到提供所述特定服务的目标设备;目标服务提供单元,用于所述目标设备将接收到的所述访问请求转发给在其上运行的第二程序,并由所述第二程序执行相应的服务功能。
- 根据权利要求23所述的用于设备间服务的访问装置,其特征在于,所述装置包括:联接端口创建单元,用于主设备创建用于与其他设备建立联接的联接端口;源设备联接单元,用于当所述源设备为非主设备的从设备时,所述源设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和源设备之间的数据连接,以完成源设备和主设备之间的联接过程;目标设备联接单元,用于当所述目标设备为非主设备的从设备时,所述目标设备向所述联接端口发送联接请求,所述主设备根据接收到的联接请求,建立主设备和目标设备之间的数据连接,以完成目标设备和主设备之间的联接过程。
- 根据权利要求23所述的用于设备间服务的访问装置,其特征在于,所述访问请求传送单元具体用于,所述源设备根据预先存储的服务配置信息封装访问请求并将其发出,所述访问请求通过设备间的联接、依照其包含的所述目标设备标识传送到提供所 述特定服务的目标设备;所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;所述目标服务提供单元具体用于,目标设备根据预先存储的服务配置信息,将所述访问请求转发给在其上运行的所述第二程序,并由所述第二程序执行相应的服务功能。
- 根据权利要求25所述的用于设备间服务的访问装置,其特征在于,所述装置包括:目标设备服务挂载请求传送单元,用于至少包含所述目标设备标识以及所述特定服务的服务标识的服务挂载请求由所述目标设备发出,并通过所述设备间的联接传送给至少包括所述源设备的各设备;源设备服务配置信息存储单元,用于所述源设备根据接收到的服务挂载请求,生成至少包含所述目标设备标识以及所述特定服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
- 根据权利要求26所述的用于设备间服务的访问装置,其特征在于,所述装置还包括:本地服务注册单元,用于所述第二程序将自己提供的所述特定服务注册到目标设备的服务配置信息中,以在所述服务配置信息中生成相应的本地服务配置项;服务挂载请求生成单元,用于根据所述本地服务配置项中包含的所述特定服务的标识以及所述目标设备标识,生成所述服务挂载请求。
- 根据权利要求25所述的用于设备间服务的访问装置,其特征在于,所述访问请求传送单元包括:访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;第一访问请求发送子单元,用于所述源设备根据封装后的访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
- 根据权利要求25所述的用于设备间服务的访问装置,其特征在于,所述访问请求传送单元包括:访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;第二访问请求发送子单元,用于所述源设备利用已与所述目标设备建立的联接,将封装后的访问请求发送给所述目标设备。
- 根据权利要求25所述的用于设备间服务的访问装置,其特征在于,所述访问请求传送单元包括:访问请求封装子单元,用于所述源设备通过查询预先存储的服务配置信息封装访问请求,所述访问请求中至少包含所述第一程序访问的所述特定服务的服务标识和所述目标设备标识;第三访问请求发送子单元,用于所述源设备利用已与所述主设备建立的联接,将封装后的访问请求发送给所述主设备;访问请求转发子单元,用于所述主设备根据接收到的所述访问请求包含的目标设备标识,利用已与所述目标设备建立的联接,将所述访问请求发送给所述目标设备。
- 根据权利要求28-30任一项所述的用于设备间服务的访问装置,其特征在于,所述目标服务提供单元包括:访问请求接收子单元,用于所述目标设备接收所述访问请求后执行解封装操作,并获取被访问的服务标识;目标进程查找子单元,用于所述目标设备根据所述被访问的服务标识查找服务配置信息中的本地服务配置项,获取提供相应服务的第二程序进程的标识;目标服务提供子单元,用于所述目标设备根据所述第二程序进程的标识,将解封装后的访问请求转发给所述第二程序,由所述第二程序执行相应的服务功能。
- 根据权利要求28-30任一项所述的用于设备间服务的访问装置,其特征在于,所述访问请求封装子单元包括:代理标识获取子单元,用于所述第一程序根据所述特定服务的服务标识查询服务配置信息,获取为访问所述特定服务提供代理服务的代理标识;代理服务封装子单元,用于所述第一程序根据所述代理标识,将包含所述特定服务的服务标识的访问请求发送给相应的代理,并由所述代理为所述访问请求封装所述目标设备标识。
- 根据权利要求23所述的用于设备间服务的访问装置,其特征在于,所述装置还包括:应答信息传送单元,用于当所述目标服务提供单元执行完毕其功能后,第二程序针对所述访问请求的应答信息由所述目标设备发出、并通过所述设备间的联接传送给所述 源设备;应答信息返回单元,用于所述源设备将接收到的所述应答信息返回给所述第一程序。
- 一种用于设备间服务的配置方法,其特征在于,包括:至少包含第一设备所提供服务的服务标识以及第一设备标识的服务挂载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;除所述第一设备之外的各设备根据接收到的服务挂载请求,生成至少包含所述第一设备标识以及第一设备所提供服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中;其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述主设备建立的联接。
- 根据权利要求34所述的用于设备间服务的配置方法,其特征在于,所述第一设备通过如下方式生成所述服务挂载请求:在第一设备上运行的应用程序将各自提供的服务注册到第一设备的服务配置信息中,以在所述服务配置信息中生成本地服务配置项;根据所述本地服务配置项中包含的服务标识以及第一设备的设备标识,生成所述服务挂载请求。
- 根据权利要求34所述的用于设备间服务的配置方法,其特征在于,在所述除所述第一设备之外的各设备将所述远程服务配置项添加到自己的服务配置信息中后,还包括:至少包含被卸载服务的服务标识的服务卸载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;除所述第一设备之外的各设备根据接收到的服务卸载请求,从自己的服务配置信息中删除包含所述服务标识的远程服务配置项。
- 根据权利要求34所述的用于设备间服务的配置方法,其特征在于,当所述第一设备不是主设备时,在所述除所述第一设备之外的各设备将所述远程服务配置项添加到自己的服务配置信息中后,还包括:所述第一设备向主设备发送设备断开请求,所述请求中至少携带第一设备标识;所述主设备通过其与各设备之间的联接、将所述设备断开请求转发给各设备;除所述第一设备之外的各设备根据接收到的设备断开请求,从自己的服务配置信息 中删除包含所述第一设备标识的所有远程服务配置项。
- 一种用于设备间服务的配置装置,其特征在于,包括:挂载请求传送单元,用于至少包含第一设备所提供服务的服务标识以及第一设备标识的服务挂载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;服务配置存储单元,用于除所述第一设备之外的各设备根据接收到的服务挂载请求,生成至少包含所述第一设备标识以及第一设备所提供服务的服务标识的远程服务配置项,并将所述远程服务配置项添加到自己的服务配置信息中。
- 根据权利要求38所述的用于设备间服务的配置装置,其特征在于,包括:卸载请求传送单元,用于在所述服务配置存储单元完成远程服务配置项的添加操作后,至少包含被卸载服务的服务标识的服务卸载请求由所述第一设备发出、并通过设备间的联接传送到与主设备互联的各设备;第一服务配置删除单元,用于除所述第一设备之外的各设备根据接收到的服务卸载请求,从自己的服务配置信息中删除包含所述服务标识的远程服务配置项。
- 根据权利要求38所述的用于设备间服务的配置装置,其特征在于,包括:设备断开请求发送单元,用于在所述服务配置存储单元完成远程服务配置项的添加操作后,所述第一设备向主设备发送设备断开请求,所述请求中至少携带第一设备标识;设备断开请求转发单元,用于所述主设备通过其与各设备之间的联接、将所述设备断开请求转发给各设备;第二服务配置删除单元,用于除所述第一设备之外的各设备根据接收到的设备断开请求,从自己的服务配置信息中删除包含所述第一设备标识的所有远程服务配置项。
- 一种用于设备间的信息广播方法,其特征在于,包括:第一应用程序的广播请求由运行所述第一应用程序的第一设备发出,并通过设备间的联接传送到与主设备互联的各设备;除所述第一设备之外的各设备将接收到的广播请求发送给各自承载的应用程序;其中,所述设备间的联接包括:不同设备分别通过主设备提供的联接端口与所述设备建立的联接。
- 一种用于设备间的信息广播装置,其特征在于,包括:广播请求传送单元,用于第一应用程序的广播请求由运行所述第一应用程序的第一设备发出,并通过设备间的联接传送到与主设备互联的各设备;广播请求上报单元,用于除所述第一设备之外的各设备将接收到的广播请求发送给各自承载的应用程序。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/137,831 US10771307B2 (en) | 2016-03-22 | 2018-09-21 | Method and system for inter-device service access |
US16/930,042 US20200403843A1 (en) | 2016-03-22 | 2020-07-15 | Method and system for inter-device service access |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610166346.8A CN107222326B (zh) | 2016-03-22 | 2016-03-22 | 用于设备间服务的访问方法、配置方法及装置 |
CN201610166346.8 | 2016-03-22 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/137,831 Continuation-In-Part US10771307B2 (en) | 2016-03-22 | 2018-09-21 | Method and system for inter-device service access |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017162043A1 true WO2017162043A1 (zh) | 2017-09-28 |
Family
ID=59899190
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/076227 WO2017162043A1 (zh) | 2016-03-22 | 2017-03-10 | 用于设备间服务的访问方法、配置方法及装置 |
Country Status (3)
Country | Link |
---|---|
US (2) | US10771307B2 (zh) |
CN (1) | CN107222326B (zh) |
WO (1) | WO2017162043A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108306856A (zh) * | 2017-12-26 | 2018-07-20 | 努比亚技术有限公司 | 一种接口合并方法、客户端、服务器及计算机可读存储介质 |
CN110166819A (zh) * | 2019-04-12 | 2019-08-23 | 华为技术有限公司 | 一种播放多媒体资源的方法、装置、终端及系统 |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108123862A (zh) * | 2017-12-18 | 2018-06-05 | 合肥华凌股份有限公司 | 家用电器的通信系统、通信方法以及家用电器 |
CN108123863B (zh) * | 2017-12-18 | 2020-11-24 | 合肥华凌股份有限公司 | 家用电器的通信系统、通信方法以及家用电器 |
US11422868B2 (en) * | 2018-08-24 | 2022-08-23 | Exosite LLC | Product-as-a-service for connected devices |
CN114077448B (zh) * | 2020-08-11 | 2024-09-27 | 深圳云天励飞技术股份有限公司 | 数据管理方法及相关设备 |
EP3975502B1 (de) * | 2020-09-28 | 2023-07-26 | Siemens Aktiengesellschaft | Verfahren und system zur bereitstellung von zeitkritischen diensten mittels einer ablaufsteuerungsumgebung |
CN112817779B (zh) * | 2021-01-29 | 2024-08-20 | 京东方科技集团股份有限公司 | 组件化应用程序通信方法、装置、设备及介质 |
US11570111B2 (en) * | 2021-03-25 | 2023-01-31 | Itron, Inc. | Enforcing access to endpoint resources |
CN114003337A (zh) * | 2021-10-12 | 2022-02-01 | 深圳思为科技有限公司 | 访问请求的分配方法及装置 |
CN116996341B (zh) * | 2023-09-26 | 2023-12-19 | 深圳市顾美科技有限公司 | 设备管理方法、装置、终端设备以及存储介质 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101714945A (zh) * | 2009-12-02 | 2010-05-26 | 浙江中控技术股份有限公司 | 一种实现跨网络通信的系统及方法 |
US20120166608A1 (en) * | 2010-12-27 | 2012-06-28 | Seiko Epson Corporation | Network communication method, network communication system, network communication apparatus and program therefor |
CN104113935A (zh) * | 2014-07-28 | 2014-10-22 | 普联技术有限公司 | 一种数据传输方法、系统及路由器 |
CN104467923A (zh) * | 2013-09-16 | 2015-03-25 | 北京三星通信技术研究有限公司 | 设备交互的方法、设备及系统 |
CN105100034A (zh) * | 2014-05-23 | 2015-11-25 | 阿里巴巴集团控股有限公司 | 一种网络应用中访问功能的方法和设备 |
CN105323310A (zh) * | 2015-09-30 | 2016-02-10 | 深圳市先河系统技术有限公司 | 网络通信方法、设备及网络附属存储设备 |
CN105376299A (zh) * | 2015-09-30 | 2016-03-02 | 深圳市先河系统技术有限公司 | 一种网络通信方法、设备及网络附属存储设备 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6339795B1 (en) | 1998-09-24 | 2002-01-15 | Egrabber, Inc. | Automatic transfer of address/schedule/program data between disparate data hosts |
US20020068584A1 (en) | 2000-12-05 | 2002-06-06 | Nortel Networks Limited | Method and system for transmitting data to a mobile device |
US8244179B2 (en) | 2005-05-12 | 2012-08-14 | Robin Dua | Wireless inter-device data processing configured through inter-device transmitted data |
US9398100B2 (en) * | 2012-12-29 | 2016-07-19 | Ricoh Company, Ltd. | Managing access of network services |
-
2016
- 2016-03-22 CN CN201610166346.8A patent/CN107222326B/zh active Active
-
2017
- 2017-03-10 WO PCT/CN2017/076227 patent/WO2017162043A1/zh active Application Filing
-
2018
- 2018-09-21 US US16/137,831 patent/US10771307B2/en active Active
-
2020
- 2020-07-15 US US16/930,042 patent/US20200403843A1/en not_active Abandoned
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101714945A (zh) * | 2009-12-02 | 2010-05-26 | 浙江中控技术股份有限公司 | 一种实现跨网络通信的系统及方法 |
US20120166608A1 (en) * | 2010-12-27 | 2012-06-28 | Seiko Epson Corporation | Network communication method, network communication system, network communication apparatus and program therefor |
CN104467923A (zh) * | 2013-09-16 | 2015-03-25 | 北京三星通信技术研究有限公司 | 设备交互的方法、设备及系统 |
CN105100034A (zh) * | 2014-05-23 | 2015-11-25 | 阿里巴巴集团控股有限公司 | 一种网络应用中访问功能的方法和设备 |
CN104113935A (zh) * | 2014-07-28 | 2014-10-22 | 普联技术有限公司 | 一种数据传输方法、系统及路由器 |
CN105323310A (zh) * | 2015-09-30 | 2016-02-10 | 深圳市先河系统技术有限公司 | 网络通信方法、设备及网络附属存储设备 |
CN105376299A (zh) * | 2015-09-30 | 2016-03-02 | 深圳市先河系统技术有限公司 | 一种网络通信方法、设备及网络附属存储设备 |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108306856A (zh) * | 2017-12-26 | 2018-07-20 | 努比亚技术有限公司 | 一种接口合并方法、客户端、服务器及计算机可读存储介质 |
CN108306856B (zh) * | 2017-12-26 | 2021-01-01 | 努比亚技术有限公司 | 一种接口合并方法、客户端、服务器及计算机可读存储介质 |
CN110166819A (zh) * | 2019-04-12 | 2019-08-23 | 华为技术有限公司 | 一种播放多媒体资源的方法、装置、终端及系统 |
US11785092B2 (en) | 2019-04-12 | 2023-10-10 | Petal Cloud Technology Co., Ltd. | Multimedia resource playing method, apparatus, terminal, and system |
Also Published As
Publication number | Publication date |
---|---|
US20200403843A1 (en) | 2020-12-24 |
US20190097867A1 (en) | 2019-03-28 |
CN107222326B (zh) | 2021-02-02 |
CN107222326A (zh) | 2017-09-29 |
US10771307B2 (en) | 2020-09-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017162043A1 (zh) | 用于设备间服务的访问方法、配置方法及装置 | |
US11336511B2 (en) | Managing network connected devices | |
US10637724B2 (en) | Managing network connected devices | |
WO2017049945A1 (zh) | 加速器虚拟化的方法、装置及集中资源管理器 | |
US10404812B2 (en) | Method and apparatus for providing a persistent USB service for wireless USB devices | |
JP2019522282A (ja) | クラウドコンピューティングノードのセキュアな設定 | |
WO2022135156A1 (zh) | 分布式跨设备协同方法、电子设备及通信系统 | |
US11889506B2 (en) | Method and apparatus for configuring 5G application servers in connected uplink-to-downlink streaming | |
EP3005760A1 (en) | Wireless docking architecture | |
EP3005762B1 (en) | Wireless docking | |
US12106253B2 (en) | Container management method, apparatus, and device | |
US20170310790A1 (en) | Employing an auxiliary device to implement usb device redirection | |
US20080294778A1 (en) | Network connection manager | |
WO2020188139A1 (en) | Network based media processing security | |
WO2023241331A1 (zh) | 物联网系统及其认证与通信方法、相关设备 | |
CN114584613B (zh) | 一种推送消息的方法、消息推送系统及电子设备 | |
US8886703B2 (en) | Advertising and facilitating management access to added capabilities of intelligent devices in a system | |
WO2022206770A1 (zh) | 一种设备间应用协同工作的方法及设备 | |
WO2019024844A1 (zh) | Bras转控分离架构下的用户认证 | |
US10735514B2 (en) | Remote application configuration on network-attached storage | |
WO2019011144A1 (zh) | 一种虚拟网络设备、路由设备及虚拟网络的连接方法 | |
WO2020044092A1 (zh) | 数据传输方法及其装置 | |
US10742776B1 (en) | Accelerating isochronous endpoints of redirected USB devices | |
JP7153474B2 (ja) | メッセンジャーでのファイル送信時に機器間の通信技術を活用する方法及びシステム | |
CN112383617B (zh) | 进行长连接的方法、装置、终端设备以及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17769320 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17769320 Country of ref document: EP Kind code of ref document: A1 |