CN110855539A - Device discovery method, device and storage medium - Google Patents

Device discovery method, device and storage medium Download PDF

Info

Publication number
CN110855539A
CN110855539A CN201911129164.3A CN201911129164A CN110855539A CN 110855539 A CN110855539 A CN 110855539A CN 201911129164 A CN201911129164 A CN 201911129164A CN 110855539 A CN110855539 A CN 110855539A
Authority
CN
China
Prior art keywords
service information
soft bus
information
equipment
devices
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911129164.3A
Other languages
Chinese (zh)
Other versions
CN110855539B (en
Inventor
董俊杰
徐琰
郭斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201911129164.3A priority Critical patent/CN110855539B/en
Publication of CN110855539A publication Critical patent/CN110855539A/en
Application granted granted Critical
Publication of CN110855539B publication Critical patent/CN110855539B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Abstract

The disclosure discloses a device discovery method, a device and a storage medium, and belongs to the technical field of Internet of things. The method comprises the following steps: in a system comprising at least two devices, the at least two devices are respectively accessed to a soft bus, firstly, service information of a second device issued to the soft bus by the second device in the at least two devices is obtained, then, the service information of the second device is analyzed, the device information of the second device is obtained, and finally, the second device is determined as a discovered device in the soft bus according to the device information of the second device; through the scheme, the service information of the devices is issued on the soft bus by the devices connected to the soft bus, so that the mutual discovery among the devices is realized, the time for the devices to discover and establish connection is shortened, and the mutual discovery efficiency among the devices is improved.

Description

Device discovery method, device and storage medium
Technical Field
The present disclosure relates to the field of internet of things technology, and in particular, to a device discovery method, apparatus, and storage medium.
Background
At present, the technology of internet of things is increasingly developed, and in order to achieve interconnection of everything, equipment needs to be connected with equipment to achieve the purpose of data information transmission.
In a conventional device connection scheme, if one device wants to acquire information of another device, the device needs to be connected with a physical line, or data information is uploaded to a cloud terminal through a wireless network, and a server of the cloud terminal sends the data information to the other device, so that data information transmission of the two devices is realized.
Disclosure of Invention
The disclosure provides a device discovery method, an apparatus and a storage medium. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a device discovery method, where the method is used in a system including at least two devices, and the at least two devices respectively access a soft bus; the method is performed by a first device of the at least two devices, the method comprising:
acquiring service information of a second device of the at least two devices, which is issued to the soft bus by the second device;
analyzing the service information of the second equipment to obtain the equipment information of the second equipment;
and determining the second device as the discovered device in the soft bus according to the device information of the second device.
Optionally, the acquiring service information, which is issued to the soft bus by a second device of the at least two electronic devices, of the second device includes:
and receiving service information of the second device periodically broadcasted in the soft bus by the second device.
Optionally, the service information of the second device further includes at least one of a file address of a multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
Optionally, when the service information of the second device further includes a file address of a multimedia file included in the second device, the method further includes:
acquiring the multimedia file from the second equipment through the soft bus according to the file address;
and playing the multimedia file.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the playing the multimedia file includes:
and playing the multimedia file according to the coding format.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the determining, according to the device information of the second device, the second device as a discovered device in the soft bus includes:
and when the coding format is the coding format supported by the first device, determining the second device as the found device in the soft bus according to the device information of the second device.
Optionally, the method further includes:
and displaying an icon of the second device in a display interface of the first device.
Optionally, the displaying an icon of the second device in the display interface of the first device includes:
and displaying the icon of the second device in an application interface of the fast application running in the first device.
Optionally, the method further includes:
and periodically issuing service information of the first device to the soft bus.
According to a second aspect of the embodiments of the present disclosure, there is provided a device discovery apparatus, where the apparatus is used in a system including at least two devices, and the at least two devices are respectively connected to a soft bus; the apparatus is for use in a first device of the at least two devices, the apparatus comprising:
a service information obtaining module, configured to obtain service information of a second device of the at least two electronic devices, where the service information is issued to the soft bus by the second device;
the equipment information acquisition module is used for analyzing the service information of the second equipment and acquiring the equipment information of the second equipment;
and the device determining module is used for determining the second device as the found device in the soft bus according to the device information of the second device.
Optionally, the service information obtaining module includes:
and the second information receiving submodule is used for receiving the service information of the second equipment, which is periodically broadcast in the soft bus by the second equipment.
Optionally, the service information of the second device further includes at least one of a file address of a multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
Optionally, the apparatus further comprises:
a file obtaining module, configured to, when the service information of the second device further includes a file address of a multimedia file included in the second device, obtain, according to the file address, the multimedia file from the second device through the soft bus;
and the file playing module is used for playing the multimedia file.
Optionally, the file playing module is configured to,
and when the service information of the second equipment further comprises the encoding format of the multimedia file contained in the second equipment, playing the multimedia file according to the encoding format.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the device determining module includes:
and the device determining submodule is used for determining the second device as the found device in the soft bus according to the device information of the second device when the coding format is the coding format supported by the first device.
Optionally, the apparatus further comprises:
and the icon display module is used for displaying the icon of the second equipment in the display interface of the first equipment.
Optionally, the icon presenting module is configured to,
and displaying the icon of the second device in an application interface of the fast application running in the first device.
Optionally, the apparatus further comprises:
and the service information issuing module is used for periodically issuing the service information of the first equipment to the soft bus.
According to a third aspect of the embodiments of the present disclosure, there is provided a device discovery apparatus, for use in a system including at least two devices, where the at least two devices respectively access a soft bus; the apparatus is for use in a first device of the at least two devices, the apparatus comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
acquiring service information of a second device of the at least two devices, which is issued to the soft bus by the second device;
analyzing the service information of the second equipment to obtain the equipment information of the second equipment;
and determining the second device as the discovered device in the soft bus according to the device information of the second device.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer device-readable storage medium containing executable instructions, which are invoked by a processor to perform the method for device discovery according to the first aspect or any one of the alternatives of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in a system comprising at least two devices, the at least two devices are respectively accessed to a soft bus, firstly, service information of a second device issued to the soft bus by the second device in the at least two devices is obtained, then, the service information of the second device is analyzed, the device information of the second device is obtained, and finally, the second device is determined as a discovered device in the soft bus according to the device information of the second device; through the scheme, the service information of the equipment is published on the soft bus by the plurality of equipment connected to the soft bus to realize mutual discovery among the equipment, so that the time for discovering and establishing connection among the equipment is shortened, the indirect connection among the equipment through a cloud server is avoided, and the efficiency of mutual discovery among the equipment is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a block diagram illustrating a fast application according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating the launching of a fast application in accordance with an exemplary embodiment;
FIG. 3 is a system diagram illustrating a device accessing a soft bus in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating a method of device discovery in accordance with an exemplary embodiment;
FIG. 5 is a flow chart illustrating a method of device discovery in accordance with another exemplary embodiment;
FIG. 6 is a schematic diagram of a device discovery interface of a system setup interface shown in the embodiment of FIG. 5;
FIG. 7 is a schematic diagram of a device discovery interface in a fast application display interface according to the embodiment shown in FIG. 5;
FIG. 8 is a block diagram illustrating a device discovery apparatus in accordance with an example embodiment;
fig. 9 shows a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It is to be understood that reference herein to "a number" means one or more and "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
For convenience of understanding, terms referred to in the embodiments of the present disclosure are explained below.
1) Internet of Things (Internet of Things, IoT)
The internet of things is an information carrier such as the internet and a traditional telecommunication network, and all common objects capable of performing independent functions are enabled to realize an interconnected network. The Internet of things mainly solves the interconnection among articles (thining to thining, T2T), people (Human to thining, H2T) and people (Human to Human, H2H).
2) Soft bus
The soft bus and the computer system bus hardware bus, hard bus for short, play the same role in the computer system, and the soft bus, like the hard bus, plays a role of connecting a bridge for transmitting information. Unlike a hard bus, which transfers information via a fixed number of lines and 0, 1 signals, a soft bus is a set of programs that establishes connections between processes, software functions, via buffers.
3) Fast application
The fast application is a new form application which does not need to be installed, can be developed by using a front-end technology stack, has the double advantages of an HTML (Hypertext Markup Language) page and a native application, and has the performance experience of the native application without installation, namely point-and-play. By deeply integrating the fast application framework into mobile phone systems of various manufacturers, seamless connection between user requirements and application services can be realized on the operating system level, and the use experience of users and the conversion efficiency of the application services are improved.
Illustratively, the fast application includes a number of functional modules including, but not limited to, basic functions, network access, file data, and the like. Each functional module includes a plurality of sub-functional modules.
Fig. 1 is a block diagram illustrating a fast application according to an exemplary embodiment, and as shown in fig. 1, a block 100 of the fast application includes: a scenario portal 120, a fast application engine 140, and Operating System (OS) infrastructure & hardware 160.
Optionally, the scene portal 120 may be at least one of a negative one-screen, a global search, a lock screen, a desktop, an application marketplace, a browser, and a two-dimensional code. The appearance of the scene portal 120 may be in the form of a page or a card.
The fast application engine 140 includes a front-end framework 141, a general scenario 142, a lightweight scenario 143, an embedded SDK (Software Development Kit) 144, and a business access 145. The front-end framework 141 includes a Model-View-Model (MVVM), a V-DOM, a router, an Application Programming Interface (API), a service API, a User Interface (UI) component, and the like. The general scene 142 and the lightweight scene 143 include a JavaScript engine, a standard rendering engine, an extreme rendering engine, an end-cloud-core acceleration, a security mechanism, an emerging scene AI (Artificial Intelligence), an AR (Augmented Reality), and the like, and system integration (application management, rights management, and the like). Service access 145 includes Push (Push), account/payment, etc. OS infrastructure & hardware 160 includes: graphics libraries, native controls, system services, and GPUs (Graphics Processing units)/NPUs (Neural-network Processing units), among others.
For example, from the execution path level, there are a standard HTML5 manner to support a general Web scene (generally through a Webview component of the system or a customized Webview) and a js (javascript) + Native manner to support a lighter-weight and faster experience.
FIG. 2 is a flow diagram illustrating the start-up of a fast application, as shown in FIG. 2, according to an example embodiment
1) When the fast application is started for the first time, a user triggers downloading of a program package of the fast application through click operation, and meanwhile, an engine of the fast application carries out initialization related work. When the complete downloading of the program package of the fast application is completed and the verification of the program package is completed, the JavaScript file of the first page that needs to be displayed by the fast application starts to be loaded and starts to be rendered. The program package downloading in the process is a bottleneck, and from the measured data in the previous period, the package downloading time of about 200K under the normal network is at least more than 400 milliseconds, and the 2M package is more than 2 seconds.
2) The page rendering comprises JavaScript loading, execution of page and JavaScript frame logic, layout operation and drawing of the native UI control. When the logic in the page is executed, one or more network requests (from the page to the application-own three-party server) are generated, and the data returned by the network requests drive the re-rendering of the page until the content of the first screen is completely displayed.
Here, the network request, JavaScript execution, typesetting and drawing are not simply in a serial relationship, but are parallelly interleaved to influence the rendering performance of the whole page, and are strongly related to the logic of page design, the network condition and the running state of the device.
Due to the specificity of fast applications, fast applications are expected to perform more tasks and perform more functions. At present, while the function of the fast application is being gradually improved, the embodiment of the present disclosure provides a new function of the fast application, and the new function is utilized to implement automatic discovery of devices in the soft bus, and execute related services based on the discovered devices, thereby expanding the function of the fast application and improving the processing capability and the practicability of the fast application.
Fig. 3 is a system diagram illustrating a device accessing a soft bus according to an example embodiment. As shown in fig. 3, includes at least two devices 310 and a soft bus 320, wherein any one of the devices 310 can access the soft bus 320 through a wireless network.
The device 310 may be a terminal or an electronic device having data transmission capabilities.
For example, the device 310 may be a mobile portable terminal such as a smart phone, a tablet computer, and an e-book reader, or an electronic device such as a fan, a television, a microphone, a speaker, and a keyboard.
When any device 310 performs a service, the device 310 runs a corresponding program, and at the same time, the device 310 generates a service packet containing information related to the performed service inside the device, and the device 310 uploads the service packet to the wireless network in a periodic broadcast manner.
Alternatively, each device 310 may access the soft bus via a wireless network. Optionally, the communication network is a wireless network.
Optionally, the wireless network described above uses standard communication techniques and/or protocols. The Network is typically the internet, but can be any Network including, but not limited to, a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Wide Area Network (WAN), a mobile, wireless Network, a private Network, or any combination of virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), and so on. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
Fig. 4 is a flow chart illustrating a method of device discovery in accordance with an example embodiment. The device discovery method may be applied to a system including at least two devices, where the at least two devices are respectively connected to a soft bus, so that the devices in the system can discover each other, for example, the system may be a system shown in fig. 3, the device may be a device 310 shown in fig. 3, the soft bus may be a soft bus 320 shown in fig. 3, and the device discovery method is performed by a first device. As shown in fig. 4, the device discovery method may include the steps of:
in step 401, service information of a second device of the at least two devices, the second device being issued to the soft bus, is obtained.
In step 402, the service information of the second device is parsed to obtain the device information of the second device.
In step 403, the second device is determined as the discovered device in the soft bus according to the device information of the second device.
Optionally, the acquiring service information of a second device of the at least two electronic devices, which is issued to the soft bus, includes:
and receiving service information of the second device periodically broadcasted in the soft bus by the second device.
Optionally, the service information of the second device further includes at least one of a file address of the multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
Optionally, when the service information of the second device further includes a file address of a multimedia file included in the second device, the method further includes:
acquiring the multimedia file from the second equipment through the soft bus according to the file address;
and playing the multimedia file.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the playing the multimedia file includes:
and playing the multimedia file according to the coding format.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, determining, according to the device information of the second device, the second device as a discovered device in the soft bus includes:
and when the coding format is the coding format supported by the first device, determining the second device as the found device in the soft bus according to the device information of the second device.
Optionally, the method further includes:
and displaying the icon of the second equipment in the display interface of the first equipment.
Optionally, the displaying an icon of the second device in the display interface of the first device includes:
and displaying the icon of the second device in an application interface of the fast application running in the first device.
Optionally, the method further includes:
service information of the first device is periodically issued to the soft bus.
To sum up, in a system including at least two devices, at least two devices respectively access a soft bus, first obtain service information of a second device issued to the soft bus by a second device of the at least two devices, then analyze the service information of the second device, obtain device information of the second device, and finally determine the second device as a discovered device in the soft bus according to the device information of the second device; through the scheme, the service information of the equipment is published on the soft bus by the plurality of equipment connected to the soft bus to realize mutual discovery among the equipment, so that the time for discovering and establishing connection among the equipment is shortened, the indirect connection among the equipment through a cloud server is avoided, and the efficiency of mutual discovery among the equipment is improved.
Fig. 5 is a flowchart illustrating a device discovery method according to another exemplary embodiment, where the device discovery method may be applied to a system including at least two devices, where the at least two devices are respectively connected to a soft bus, so that mutual discovery may be performed between the devices in the system, for example, the system may be the system illustrated in fig. 3, the device may be the device 310 illustrated in fig. 3, and the soft bus may be the soft bus 320 illustrated in fig. 3, and the device discovery method is performed by a first device. As shown in fig. 5, the device discovery method may include the steps of:
step 501, a first device obtains service information of a second device of the at least two devices, the service information being issued to the soft bus by the second device.
In the embodiment of the present disclosure, the service information at least includes device information, and the device information is basic information of a device that includes the service information, for example, the device information may be identity identification Information (ID) of the device, a Name (Name) of the device, Description information (Description) of the device, type information (Category) of the device, Version information (Version) of the device, and the like.
Optionally, the service information of the second device further includes at least one of a file address of the multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
The multimedia file can be any one type of video file, picture file or sound file, and the content in the file needs to be encoded in the transmission process of the multimedia file, wherein the encoding is to encode characters, numbers or other objects into digital codes by a preset method, or to convert information and data into a specified electric pulse signal.
Optionally, the first device receives service information of the second device, which is periodically broadcasted in the soft bus by the second device.
The device distributes the service information of the device to the soft bus in a periodic broadcast mode, and the service information can be acquired by other devices.
Optionally, the first device periodically issues service information of the first device to the soft bus.
The first device may also issue its own service information to the soft bus in the same periodic broadcast manner as the second device, so as to be used by devices other than its own device for acquisition.
For example, when two devices, namely a television and a sound box, exist in one system, and the two devices are connected in the same wireless network, the two devices periodically issue service information of the respective devices to the wireless network, and when the television in the system is determined to be the first device, the television acquires the service information in the wireless network, and at this time, the television can acquire the service information issued by the sound box to the wireless network.
Step 502, the first device parses the service information of the second device to obtain the device information of the second device.
In the embodiment of the present disclosure, the service information of each second device, which is acquired by the first device through the wireless network, may be obtained by analyzing each service information, where the device information may be provided to the first device for the basic information of the second device corresponding to the service information.
For example, when three devices, namely a camera, a television and a microphone, exist in a system and are all connected in the same wireless network, when the television is used as a first device, two service information issued by two second devices can be acquired, the television analyzes the two acquired service information, and corresponding device information in the two service information can be acquired, wherein one device information includes a device name called a microphone, and the device is described as basic information such as a sound acquisition device; the other device information includes basic information such as a device name of a camera, a device description of an image acquisition device, and the like.
Step 503, the first device determines the second device as the discovered device in the soft bus according to the device information of the second device.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, and when the encoding format is an encoding format supported by the first device, the first device determines, according to the device information of the second device, the second device as a discovered device in the soft bus.
Common encoding formats include ASCII (American Standard Code for information exchange Code), ANSI (American National Standards Institute), GBK (Chinese Internal Code Specification), Unicode (uniform Code), and the like.
The method includes that encoding formats supported by different types of devices may not be the same, so that when a first device receives service information issued by a second device and has an encoding format of a multimedia file, the first device may query the encoding format supported by the self device and compare the encoding format with the received encoding format one by one, and if the first device detects that the received encoding format exists in the self device, the second device corresponding to the service information including the encoding format may be determined to be a discovered device of the first device in a soft bus; if the first device does not detect that the received coding format exists in the device itself, it may be determined that the second device corresponding to the service information including the coding format is a device that is automatically ignored by the first device in the soft bus.
Optionally, the first device stores the service information issued by the second device determined as the discovered device in a memory of the first device, and may perform call parsing at any time.
For example, when three devices, i.e., a camera, a television and a microphone, exist in a system and the three devices are all connected in the same wireless network, when the television is used as a first device to acquire two types of service information issued by two second devices, the two types of service information both include encoding formats of multimedia files, the multimedia file generated by the camera is a video file, one encoding format for encoding the video file is adopted, the multimedia file generated by the microphone is a sound file, and the other encoding format for encoding the sound file is adopted. When the television serving as the first device analyzes the two service information to obtain the coding formats in the two service information, the television determines a multimedia file which can be decoded by the self device by comparing the coding formats supported by the self device, and if the coding formats are supported, the corresponding second device is determined to be found equipment of the television; and if the comparison shows that the television does not support the coding format, determining that the corresponding second equipment is the equipment ignored by the television. When the encoding format of the multimedia file generated by the camera is an encoding format supported by the television and the encoding format of the multimedia file generated by the microphone is an encoding format not supported by the television, the television can finally determine the camera as a found device and the microphone as an ignored device.
Optionally, an icon of the second device is displayed in the display interface of the first device.
The icon of the second device may be included in the service information issued by the second device, and specifically may be included in the device information in the service information.
Optionally, the second device corresponding to the icon displayed in the display interface of the first device may be the second device confirmed as the found device or the second device confirmed as the ignored device.
Optionally, the display interface of the first device may be a display interface of the first device system.
For example, fig. 6 is a schematic diagram of a device discovery interface in a system setup interface according to an embodiment of the present disclosure. As shown in fig. 6, when the first device is a mobile terminal and the user accesses the mobile terminal to the wireless network and opens the system setup interface of the mobile terminal, the other devices accessing the same wireless network, i.e., the second device, can be displayed on the interface of the mobile terminal. The displayed content includes icons and name information of the second devices, where the icons and the name information may be content in device information in service information issued by the second devices on the soft bus, and the icon information may also be content in device information in which the first device calls a corresponding picture in a picture template stored in a memory of the own device as an icon according to description information and type information in the device information of each second device, as shown in fig. 5, the devices of the same type may be displayed by the same type of icon, by comparing encoding formats in the acquired service information, if it is determined that the second device is a found device, the icons and the names of the second devices are displayed in an interface list of the first device, and if it is determined that the second device is a neglected device, the icons and the names of the second devices may be displayed in an interface list of the first device, but in an unselected state, the second device information display portion is shaded as in fig. 5; the icon and name of the second device may not be displayed in the interface list of the first device.
Optionally, an icon of the second device is presented in an application interface of a fast application running in the first device.
For example, fig. 7 is a schematic diagram of a device discovery interface in a fast application display interface according to an embodiment of the present disclosure. As shown in fig. 7, when the first device is a mobile terminal, and the user accesses the mobile terminal to the wireless network and opens the application center of the fast application of the mobile terminal, the application interface of the fast application center of the mobile terminal may display other devices, i.e., the second device, accessing the same wireless network. According to the result of comparing the coding format in the service information issued by the second device with the coding format supported by the first device, it is determined that a part of the second device is a discovered device and a part of the second device is an ignored device, and the icon and name information of the discovered device and the ignored device can be separately displayed on the application interface of the fast application.
Optionally, the display interface of the first device may also be an interface of a dedicated APP (Application).
Step 504, when the service information of the second device further includes a file address of a multimedia file included in the second device, the first device obtains the multimedia file from the second device through the soft bus according to the file address.
In the embodiment of the disclosure, when the second device contains the multimedia file, and the second device is confirmed by the first device as a discovered device, the first device may obtain a file address of the multimedia file in the second device by parsing the service information of the second device, and the first device obtains the multimedia file on the soft bus through the file address.
In the specific interface display of the first device, a user can select a found device to connect through a virtual control of a display interface, and the connected device can transmit a multimedia file.
In step 505, the first device plays the multimedia file.
In the embodiment of the present disclosure, the obtained multimedia file is decoded according to the encoding format of the second device obtained by the first device analyzing the service information of the second device, and the first device plays the decoded multimedia file.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the multimedia file is played according to the encoding format.
For example, the first device is a television, the second device determined as the discovered device by the television is a camera and a microphone, and when the user selects the camera and the microphone to be in a connected state in the display interface of the television, the video file acquired through the camera can be directly played in the display interface of the television, and the sound file acquired through the microphone can be directly played through a sound module of the television.
Optionally, the multimedia file may be directly played through a system function of the first device, or the multimedia file may be played through a fast application of a corresponding function of the fast application center, or the multimedia file may be played in a dedicated APP.
In the implementation of the application, a scheme for discovering devices in the soft bus and executing related services based on the discovered devices can be realized based on a fast application engine.
The fast application engine in the embodiment of the present application may include the following 3 layers.
1) Application development
Application development may include front-end framework development, development of components and API capabilities, front-end design of fast applications borrows and integrates design ideas of mainstream front-end frameworks (Vue, React, etc.): the application is built in a componentized mode, an MVVM design mode taking data binding as a core is adopted, the performance is improved in a V-DOM mode, and meanwhile, a concise and clear template of the class Vue is selected. Meanwhile, the layout aspect is correspondingly simplified. From the perspective of new application form, native UI mapping and capability opening, a set of components and API specifications need to be defined, and the rapid development and application are convenient to develop.
2) System integration (application management, card-embedded SDK, security mechanism, etc.)
The fast application, as a complete application modality, can be deeply integrated with the system, run as a native application, and interact with the system. There are currently two forms of rapid application: a full screen mode independent application mode and an embedded mode card mode. In the form of independent application, the experience of the user is similar to a native application program, and the method has complete life cycle management, page management, routing and the like. The fast application can be parasitized on the Activity of android, the page is parasitized on the Fragment, and the management and control of the instance are carried out through the independent background Service. The card is another form, and is embedded into each corner of the system as an independent local control through the embedded SDK, so that dynamic content is presented in a light weight mode. In the aspect of security isolation, better security guarantee can be achieved through a sandbox mechanism, process isolation and authority control in combination with the support of an operating system layer.
3) Performance experience & emerging scenes (JavaScript engine, rendering engine, end-cloud-core acceleration, emerging scenes)
In the aspects of interactive experience, resource overhead, stability and the like, the fast application realizes effective combination of a front-end development mode, native rendering and platform capacity by introducing a native rendering path.
Different from cross-platform frameworks of other application layers, the cross-platform framework is fast applied to an operating system planted on a mobile phone, and the deep integration of a chip operating system cloud can be realized. The combination of the end and the cloud takes the acceleration of the starting performance as an example, and the optimization of the network link layer can greatly accelerate the starting speed of the application through the cooperative rendering of the cloud and the end. Meanwhile, the special capability of the hardware platform can be integrated, and the experience is further improved. For example, the calculation power of the NPU can be integrated into a fast application engine by combining with a mobile phone AI chip, so that an AI scene (face recognition, image super-resolution, and the like) can be executed at a low delay and high performance on the end side, the privacy of a user is effectively protected, and the bandwidth is saved.
To sum up, in a system including at least two devices, at least two devices respectively access a soft bus, first obtain service information of a second device issued to the soft bus by a second device of the at least two devices, then analyze the service information of the second device, obtain device information of the second device, and finally determine the second device as a discovered device in the soft bus according to the device information of the second device; through the scheme, the service information of the equipment is published on the soft bus by the plurality of equipment connected to the soft bus to realize mutual discovery among the equipment, so that the time for discovering and establishing connection among the equipment is shortened, the indirect connection among the equipment through a cloud server is avoided, and the efficiency of mutual discovery among the equipment is improved.
Fig. 8 is a block diagram of a device discovery apparatus according to an exemplary embodiment, and as shown in fig. 8, the device discovery method may be applied to a system including at least two devices, where the at least two devices are respectively connected to a soft bus, so that the devices in the system can discover each other, for example, the system may be the system shown in fig. 3, the device may be the device 310 shown in fig. 3, and the soft bus may be the soft bus 320 shown in fig. 3; the device is used in a first device for example. As shown in fig. 8, the device discovery apparatus may include:
a service information obtaining module 810, configured to obtain service information of a second device of the at least two electronic devices, where the service information is issued to the soft bus by the second device;
a device information obtaining module 820, configured to analyze the service information of the second device to obtain device information of the second device;
a device determining module 830, configured to determine the second device as a discovered device in the soft bus according to the device information of the second device.
Optionally, the service information of the second device further includes at least one of a file address of a multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
Optionally, the apparatus further comprises:
a file obtaining module, configured to, when the service information of the second device further includes a file address of a multimedia file included in the second device, obtain, according to the file address, the multimedia file from the second device through the soft bus;
and the file playing module is used for playing the multimedia file.
Optionally, the file playing module is configured to,
and when the service information of the second equipment further comprises the encoding format of the multimedia file contained in the second equipment, playing the multimedia file according to the encoding format.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the device determining module 830 includes:
and the device determining submodule is used for determining the second device as the found device in the soft bus according to the device information of the second device when the coding format is the coding format supported by the first device.
Optionally, the apparatus further comprises:
and the icon display module is used for displaying the icon of the second equipment in the display interface of the first equipment.
Optionally, the icon presenting module is configured to,
and displaying the icon of the second device in an application interface of the fast application running in the first device.
Optionally, the apparatus further comprises:
and the service information issuing module is used for periodically issuing the service information of the first equipment to the soft bus.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the above functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides a device discovery apparatus, which may be implemented as all or part of an electronic device or a terminal in a hardware or software and hardware combination manner, and can implement all or part of the steps in any one of the embodiments shown in fig. 4 or fig. 5 in the present disclosure, where the device discovery method may be applied to a system including at least two devices, where at least two devices are respectively connected to a soft bus, so that the devices in the system may discover each other, for example, the system may be a system shown in fig. 3, the device may be the device 310 shown in fig. 3, and the soft bus may be the soft bus 320 shown in fig. 3; the device is used in a first device for example. The device discovery apparatus further includes: a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring service information of a second device of the at least two devices, which is issued to the soft bus by the second device;
analyzing the service information of the second equipment to obtain the equipment information of the second equipment;
and determining the second device as the discovered device in the soft bus according to the device information of the second device.
Optionally, the acquiring service information, which is issued to the soft bus by a second device of the at least two electronic devices, of the second device includes:
and receiving service information of the second device periodically broadcasted in the soft bus by the second device.
Optionally, the service information of the second device further includes at least one of a file address of a multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
Optionally, when the service information of the second device further includes a file address of a multimedia file included in the second device, the method further includes:
acquiring the multimedia file from the second equipment through the soft bus according to the file address;
and playing the multimedia file.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the playing the multimedia file includes:
and playing the multimedia file according to the coding format.
Optionally, when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the determining, according to the device information of the second device, the second device as a discovered device in the soft bus includes:
and when the coding format is the coding format supported by the first device, determining the second device as the found device in the soft bus according to the device information of the second device.
Optionally, the method further includes:
and displaying an icon of the second device in a display interface of the first device.
Optionally, the displaying an icon of the second device in the display interface of the first device includes:
and displaying the icon of the second device in an application interface of the fast application running in the first device.
Optionally, the method further includes:
and periodically issuing service information of the first device to the soft bus.
Fig. 9 shows a block diagram of an electronic device 900 according to an exemplary embodiment of the disclosure. The electronic device 900 may be: an electronic device or a terminal. For example, the electronic device may be implemented as device 310 in fig. 3.
In general, the electronic device 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array).
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 902 is used to store at least one instruction for execution by processor 901 to implement the device discovery methods provided by method embodiments in the present disclosure.
In some embodiments, the electronic device 900 may further optionally include: a peripheral interface 903 and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a touch display screen 905, a camera 906, an audio circuit 907, a positioning component 908, and a power supply 909.
The peripheral interface 903 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, memory 902, and peripheral interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902 and the peripheral interface 703 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 904 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals.
In some embodiments, the electronic device 900 also includes one or more sensors 910. The one or more sensors 910 include, but are not limited to: acceleration sensor 911, gyro sensor 912, pressure sensor 913, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of the electronic device 900, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, which may be a computer readable storage medium contained in a memory of the above embodiments; or it may be a separate computer-readable storage medium not incorporated in the terminal. The computer readable storage medium has stored therein at least one instruction, at least one program, a set of codes, or a set of instructions that is loaded and executed by the processor to implement the device discovery method as described in fig. 3 or fig. 4.
Optionally, the computer-readable storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a Solid State Drive (SSD), or an optical disc. The Random Access Memory may include a resistive Random Access Memory (ReRAM) and a Dynamic Random Access Memory (DRAM). The above-mentioned serial numbers of the embodiments of the present disclosure are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only and not to limit the present disclosure, and any modification, equivalent replacement, or improvement made without departing from the spirit and scope of the present disclosure is to be considered as the same as the present disclosure.

Claims (20)

1. A device discovery method, for use in a system comprising at least two devices, each of the at least two devices having access to a soft bus; the method is performed by a first device of the at least two devices, the method comprising:
acquiring service information of a second device of the at least two devices, which is issued to the soft bus by the second device;
analyzing the service information of the second equipment to obtain the equipment information of the second equipment;
and determining the second device as the discovered device in the soft bus according to the device information of the second device.
2. The method of claim 1, wherein the obtaining service information of a second device of the at least two electronic devices, the second device being published to the soft bus, comprises:
and receiving service information of the second device periodically broadcasted in the soft bus by the second device.
3. The method according to claim 1, wherein the service information of the second device further comprises at least one of a file address of the multimedia file contained in the second device and an encoding format of the multimedia file contained in the second device.
4. The method according to claim 3, wherein when the service information of the second device further includes a file address of a multimedia file contained in the second device, the method further comprises:
acquiring the multimedia file from the second equipment through the soft bus according to the file address;
and playing the multimedia file.
5. The method according to claim 4, wherein when the service information of the second device further includes an encoding format of a multimedia file contained in the second device, the playing the multimedia file comprises:
and playing the multimedia file according to the coding format.
6. The method according to claim 3, wherein when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the determining the second device as the found device in the soft bus according to the device information of the second device comprises:
and when the coding format is the coding format supported by the first device, determining the second device as the found device in the soft bus according to the device information of the second device.
7. The method of claim 1, further comprising:
and displaying an icon of the second device in a display interface of the first device.
8. The method of claim 7, wherein said presenting an icon of the second device in a display interface of the first device comprises:
and displaying the icon of the second device in an application interface of the fast application running in the first device.
9. The method of claim 1, further comprising:
and periodically issuing service information of the first device to the soft bus.
10. A device discovery apparatus, for use in a system comprising at least two devices, each of the at least two devices having access to a soft bus; the apparatus is for use in a first device of the at least two devices, the apparatus comprising:
a service information obtaining module, configured to obtain service information of a second device of the at least two electronic devices, where the service information is issued to the soft bus by the second device;
the equipment information acquisition module is used for analyzing the service information of the second equipment and acquiring the equipment information of the second equipment;
and the device determining module is used for determining the second device as the found device in the soft bus according to the device information of the second device.
11. The apparatus of claim 10, wherein the service information obtaining module comprises:
and the second information receiving submodule is used for receiving the service information of the second equipment, which is periodically broadcast in the soft bus by the second equipment.
12. The apparatus according to claim 10, wherein the service information of the second device further includes at least one of a file address of the multimedia file included in the second device and an encoding format of the multimedia file included in the second device.
13. The apparatus of claim 12, wherein when the service information of the second device further includes a file address of a multimedia file included in the second device, the apparatus further comprises:
the file acquisition module is used for acquiring the multimedia file from the second equipment through the soft bus according to the file address;
and the file playing module is used for playing the multimedia file.
14. The apparatus of claim 13, wherein the file playing module is configured to,
and when the service information of the second equipment further comprises the encoding format of the multimedia file contained in the second equipment, playing the multimedia file according to the encoding format.
15. The apparatus of claim 12, wherein when the service information of the second device further includes an encoding format of a multimedia file included in the second device, the device determination module comprises:
and the device determining submodule is used for determining the second device as the found device in the soft bus according to the device information of the second device when the coding format is the coding format supported by the first device.
16. The apparatus of claim 10, further comprising:
and the icon display module is used for displaying the icon of the second equipment in the display interface of the first equipment.
17. The apparatus of claim 16, wherein the icon presenting module is configured to,
and displaying the icon of the second device in an application interface of the fast application running in the first device.
18. The apparatus of claim 10, further comprising:
and the service information issuing module is used for periodically issuing the service information of the first equipment to the soft bus.
19. A device discovery apparatus, for use in a system comprising at least two devices, each of the at least two devices having access to a soft bus; the apparatus is for use in a first device of the at least two devices, the apparatus comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
acquiring service information of a second device of the at least two devices, which is issued to the soft bus by the second device;
analyzing the service information of the second equipment to obtain the equipment information of the second equipment;
and determining the second device as the discovered device in the soft bus according to the device information of the second device.
20. A computer device readable storage medium containing executable instructions that are invoked for execution by a processor to implement the device discovery method of any of claims 1 to 9.
CN201911129164.3A 2019-11-18 2019-11-18 Device discovery method, device and storage medium Active CN110855539B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911129164.3A CN110855539B (en) 2019-11-18 2019-11-18 Device discovery method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911129164.3A CN110855539B (en) 2019-11-18 2019-11-18 Device discovery method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110855539A true CN110855539A (en) 2020-02-28
CN110855539B CN110855539B (en) 2021-11-23

Family

ID=69602066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911129164.3A Active CN110855539B (en) 2019-11-18 2019-11-18 Device discovery method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110855539B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100299597A1 (en) * 2009-05-19 2010-11-25 Samsung Electronics Co., Ltd. Display management method and system of mobile terminal
US20130091502A1 (en) * 2011-10-11 2013-04-11 Electronics And Telecommunications Research Institute System and method of providing virtual machine using device cloud
CN105378771A (en) * 2013-07-12 2016-03-02 高通股份有限公司 Mobile payments using proximity-based peer-to-peer communication and an intent-to-pay gesture
CN105531971A (en) * 2013-09-16 2016-04-27 高通股份有限公司 A user interactive application enabled gateway
CN106533860A (en) * 2016-11-18 2017-03-22 深圳Tcl智能家庭科技有限公司 Intelligent household interaction software bus system and realization method
CN107071711A (en) * 2017-04-12 2017-08-18 安徽华米信息科技有限公司 Multimedia sharing method, device and Bluetooth equipment
CN108563476A (en) * 2018-04-18 2018-09-21 Oppo广东移动通信有限公司 application program operation method, device, storage medium and electronic equipment
CN108965981A (en) * 2018-07-30 2018-12-07 Oppo广东移动通信有限公司 Video broadcasting method, device, storage medium and electronic equipment
CN109561340A (en) * 2017-09-25 2019-04-02 北京小鸟听听科技有限公司 Multimedia service processing method, equipment, multimedia service group and storage medium
CN110046015A (en) * 2019-04-08 2019-07-23 维沃移动通信有限公司 Using sharing method and terminal
CN110149539A (en) * 2019-05-21 2019-08-20 北京字节跳动网络技术有限公司 Method for broadcasting multimedia file, device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100299597A1 (en) * 2009-05-19 2010-11-25 Samsung Electronics Co., Ltd. Display management method and system of mobile terminal
US20130091502A1 (en) * 2011-10-11 2013-04-11 Electronics And Telecommunications Research Institute System and method of providing virtual machine using device cloud
CN105378771A (en) * 2013-07-12 2016-03-02 高通股份有限公司 Mobile payments using proximity-based peer-to-peer communication and an intent-to-pay gesture
CN105531971A (en) * 2013-09-16 2016-04-27 高通股份有限公司 A user interactive application enabled gateway
CN106533860A (en) * 2016-11-18 2017-03-22 深圳Tcl智能家庭科技有限公司 Intelligent household interaction software bus system and realization method
CN107071711A (en) * 2017-04-12 2017-08-18 安徽华米信息科技有限公司 Multimedia sharing method, device and Bluetooth equipment
CN109561340A (en) * 2017-09-25 2019-04-02 北京小鸟听听科技有限公司 Multimedia service processing method, equipment, multimedia service group and storage medium
CN108563476A (en) * 2018-04-18 2018-09-21 Oppo广东移动通信有限公司 application program operation method, device, storage medium and electronic equipment
CN108965981A (en) * 2018-07-30 2018-12-07 Oppo广东移动通信有限公司 Video broadcasting method, device, storage medium and electronic equipment
CN110046015A (en) * 2019-04-08 2019-07-23 维沃移动通信有限公司 Using sharing method and terminal
CN110149539A (en) * 2019-05-21 2019-08-20 北京字节跳动网络技术有限公司 Method for broadcasting multimedia file, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赖宇亮: "开放式控制系统软总线及调度的实现", 《中国优秀硕士学位论文全文数据库》 *

Also Published As

Publication number Publication date
CN110855539B (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN108536524B (en) Resource updating method, device, terminal and storage medium
CN109358936B (en) Information processing method, device, storage medium, electronic device and system
US20210203767A1 (en) Information Processing Method and Apparatus, Storage Medium, and Electronic Device
CN110990075B (en) Method, device, equipment and storage medium for starting fast application
CN109542614B (en) Resource allocation method, device, terminal and storage medium
WO2019227450A1 (en) Application function implementation method and electronic device
CN113748685A (en) Network-based media processing control
CN111580879A (en) Applet running method and device, electronic equipment and computer storage medium
Espada et al. Extensible architecture for context-aware mobile web applications
EP2854348B1 (en) Interface display method and system of home gateway applicable to multiple display types
US11722555B2 (en) Application control method and apparatus, electronic device, and storage medium
EP3779690A1 (en) Processor core scheduling method and apparatus, terminal, and storage medium
US11818491B2 (en) Image special effect configuration method, image recognition method, apparatus and electronic device
US20240089561A1 (en) Multimedia data publishing method and apparatus, and device and medium
CN110851240B (en) Function calling method, device and storage medium
CN110865863B (en) Interface display method and device for fast application and storage medium
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN112243016B (en) Middleware platform, terminal equipment, 5G artificial intelligence cloud processing system and processing method
CN109814915B (en) Parameter configuration method, device, medium and electronic equipment based on lua
CN110868471B (en) Equipment construction method, device and storage medium
CN110855539B (en) Device discovery method, device and storage medium
CN111104183B (en) Application program running method and device, electronic equipment and storage medium
CN113296771A (en) Page display method, device, equipment and computer readable medium
CN115250259B (en) Information interaction method and device and electronic equipment
CN114125048B (en) Message push setting method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant