Method and apparatus for transmitting device information, storage medium, and electronic device
Patent Information
- Application Number
- CN202211214709.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-09-30
AI Technical Summary
[0006]本申请实施例提供了一种设备信息的发送方法和装置、存储介质及电子装置,以至少解决相关技术中,用户通过第三方应用完成账号授权后,获取用户的设备信息,拥有和全量用户设备管理设备能力,对未合作的设备无法管控等问题
[0017] In this embodiment, when the first application is authorized and authenticated by the second server corresponding to the second application, it receives an acquisition request sent by the first server corresponding to the first application. The acquisition request is used to acquire device information corresponding to user information, and the user information is the user information corresponding to the second application. In response to the acquisition request, it determines the first device information corresponding to the user information, wherein the first device information is the device information of the first device that the first application is allowed to view. According to the application device permission information of the first application, it determines the second device information in the first device information, wherein the second device information is the device information of the second device that the first application is allowed to view. It sends the second device information to the first application so that the first application displays the second device information. By adopting the above technical solution, the problems of users obtaining user device information and having the ability to manage all user devices after completing account authorization through a third-party application, but being unable to control devices that are not cooperated with, are solved. This embodiment of the invention adds device permission management for the first application (i.e., application device permission information of the first application), effectively managing the scope of open devices corresponding to the first application. Users can only manage and control devices within the cooperation scope on the third-party application side (i.e., the first application), thereby improving the control capability of open devices.
Smart Images

Figure CN115694913B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to a method and apparatus for transmitting device information, a storage medium, and an electronic device. Background Technology
[0002] Currently, in B2B collaborations, smart home companies utilize their devices as a core resource, providing connectivity capabilities to support device management and control for third-party applications.
[0003] In common third-party device outbound services based on user authorization, the third party obtains user login information, eliminating the user registration step and simplifying the user login process. At the same time, it can establish the corresponding relationship between users in the corresponding authorized applications. In the smart home industry, user authorization mainly involves obtaining user device management and control permissions, including: obtaining information on users' existing bound devices, discovering smart home devices, configuring and binding new devices, and controlling and managing devices.
[0004] When procuring smart home devices through group buying or collaborating with other companies, a company's device management and control capabilities are core resources that require the provision of cloud-based integration with third-party systems. In existing technical solutions, users can obtain a complete list of their devices and have full control over all user devices after authorizing via OAuth on a third-party application. However, collaborations or group buying often involve limited cooperation, based on certain device models or categories. Allowing all types of devices to be shared with third-party companies threatens the core interests of smart home companies, as they cannot manage devices not covered by the collaboration. Furthermore, smart home companies are responsible for the user experience across all aspects of their devices; the lack of a clearly defined scope of cooperation hinders the management and testing of user experience.
[0005] There is no effective solution yet for the problems in related technologies, such as the acquisition of user device information and the ability to manage all user devices after the user completes account authorization through a third-party application, and the inability to control devices that are not partnered with the application. Summary of the Invention
[0006] This application provides a method and apparatus for sending device information, a storage medium, and an electronic device to at least solve the problems in related technologies, such as the inability to control non-cooperative devices after a user completes account authorization through a third-party application, obtains the user's device information, has the ability to manage all user devices, and completes the management of all user devices.
[0007] According to one embodiment of this application, a method for sending device information is provided, comprising: receiving an acquisition request sent by a first server corresponding to the first application when a first application is authorized and authenticated by a second server corresponding to a second application, wherein the acquisition request is used to acquire device information corresponding to user information, the user information being user information corresponding to the second application; responding to the acquisition request, determining first device information corresponding to the user information, wherein the first device information is device information of a first device that is allowed to be viewed by the first application; determining second device information in the first device information according to the application device permission information of the first application, wherein the second device information is device information of a second device that is allowed to be viewed by the first application; and sending the second device information to the first application so that the first application displays the second device information.
[0008] In an exemplary embodiment, determining second device information from the first device information based on the application device permission information of the first application includes: establishing application device permission information for the first application, wherein the application device permission information includes: third device information of devices that are allowed to be viewed through the first application; the third device information includes at least one of the following: a first physical address, a first device model, and a first device category; filtering device information in the first device information that is inconsistent with the third device information to obtain the second device information, wherein the first device information includes at least one of the following: a second physical address of the first device, a second device model of the first device, and a second device category of the first device.
[0009] In one exemplary embodiment, after sending the second device information to the first application, the method further includes: if the first application discovers a third device, receiving a first device identifier of the third device sent by the first application; determining whether the first application is allowed to bind the third device based on the first device identifier and the application device permission information; and if it is determined that the first application is not allowed to bind the third device, stopping the sending of the fourth device information of the third device to the first application.
[0010] In an exemplary embodiment, after determining whether the first application is allowed to bind to the third device based on the first device identifier and the application device permission information, the method further includes: if it is determined that the first application is allowed to bind to the third device, obtaining fourth device information of the third device; and sending the fourth device information to the first application so that the target object determines whether to establish a binding relationship between the first application and the third device.
[0011] In one exemplary embodiment, after sending the second device information to the first application, the method further includes: receiving a binding request sent by the first application, wherein the binding request is used to request the establishment of a binding relationship between the target object and the fourth device, and the binding request includes: a second device identifier of the fourth device; determining whether it is allowed to bind the fourth device through the first application based on the second device identifier and the application device permission information; if it is determined that the binding of the fourth device by the first application is allowed, establishing a binding relationship between the target object and the fourth device; updating the second device information, and sending the updated second device information to the first application.
[0012] In one exemplary embodiment, updating the second device information and sending the updated second device information to the first application includes: adding the fifth device information of the fourth device to the second device information to obtain the sixth device information; and sending the sixth device information to the first application.
[0013] In an exemplary embodiment, before receiving an acquisition request sent by a first server corresponding to the first application, the method further includes: if it is determined that the target object has logged into the first application using the identity information of the second application, sending confirmation information to the second application; and if it receives response information sent by the target object through the second application to determine whether to log into the first application, sending user information of the target object to the first application.
[0014] According to another embodiment of this application, a device information sending apparatus is also provided, comprising: a receiving module, configured to receive an acquisition request sent by a first server corresponding to the first application when the first application is authorized and authenticated by a second server corresponding to the second application, wherein the acquisition request is used to acquire device information corresponding to user information, and the user information is user information corresponding to the second application; a first determining module, configured to respond to the acquisition request and determine the first device information corresponding to the user information, wherein the first device information is device information of a first device that is allowed to be viewed by the first application; a second determining module, configured to determine second device information in the first device information according to the application device permission information of the first application, wherein the second device information is device information of a second device that is allowed to be viewed by the first application; and a sending module, configured to send the second device information to the first application so that the first application displays the second device information.
[0015] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method for sending device information when it is run.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described method for transmitting device information through the computer program.
[0017] In this embodiment, when the first application is authorized and authenticated by the second server corresponding to the second application, it receives an acquisition request sent by the first server corresponding to the first application. The acquisition request is used to acquire device information corresponding to user information, and the user information is the user information corresponding to the second application. In response to the acquisition request, it determines the first device information corresponding to the user information, wherein the first device information is the device information of the first device that the first application is allowed to view. According to the application device permission information of the first application, it determines the second device information in the first device information, wherein the second device information is the device information of the second device that the first application is allowed to view. It sends the second device information to the first application so that the first application displays the second device information. By adopting the above technical solution, the problems of users obtaining user device information and having the ability to manage all user devices after completing account authorization through a third-party application, but being unable to control devices that are not cooperated with, are solved. This embodiment of the invention adds device permission management for the first application (i.e., application device permission information of the first application), effectively managing the scope of open devices corresponding to the first application. Users can only manage and control devices within the cooperation scope on the third-party application side (i.e., the first application), thereby improving the control capability of open devices. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the hardware environment for a method of sending device information according to an embodiment of this application;
[0021] Figure 2 This is a flowchart of a method for sending device information according to an embodiment of this application;
[0022] Figure 3 This is a timing diagram (a) of a method for transmitting device information according to an embodiment of this application;
[0023] Figure 4 This is a timing diagram (II) of a method for transmitting device information according to an embodiment of this application;
[0024] Figure 5 This is a timing diagram (III) of a method for transmitting device information according to an embodiment of this application;
[0025] Figure 6 This is a structural block diagram of a device for transmitting device information according to an embodiment of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] According to one aspect of the embodiments of this application, a method for transmitting device information is provided. This method for transmitting device information is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned method for transmitting device information can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0029] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0030] This embodiment provides a method for sending device information, applied to a computer terminal. Figure 2 This is a flowchart of a method for sending device information according to an embodiment of this application, which includes the following steps:
[0031] Step S202: If the first application is authorized and authenticated by the second server corresponding to the second application, a request for acquisition sent by the first server corresponding to the first application is received. The request for acquisition is used to acquire device information corresponding to user information, and the user information is user information corresponding to the second application.
[0032] Step S204: In response to the acquisition request, determine the first device information corresponding to the user information, wherein the first device information is the device information of the first device that the first application is allowed to view;
[0033] It should be noted that the first device information is used to indicate the device information of one or more first devices.
[0034] Step S206: Determine the second device information from the first device information based on the application device permission information of the first application, wherein the second device information is the device information of the second device that the first application is allowed to view;
[0035] It should be noted that the second device information is used to indicate the device information of one or more devices.
[0036] Step S208: Send the second device information to the first application so that the first application displays the second device information.
[0037] Through the above steps, when the first application is authorized and authenticated by the second server corresponding to the second application, it receives an acquisition request sent by the first server corresponding to the first application. The acquisition request is used to acquire device information corresponding to user information, where the user information is the user information corresponding to the second application. Responding to the acquisition request, it determines the first device information corresponding to the user information, where the first device information is the device information of the first device that the first application is allowed to view. Based on the application device permission information of the first application, it determines the second device information from the first device information, where the second device information is the device information of the second device that the first application is allowed to view. The second device information is sent to the first application so that the first application displays the second device information. This solves the problems in related technologies where, after a user completes account authorization through a third-party application, they obtain user device information, possess and manage all user devices, but cannot control devices not under their cooperation. This embodiment of the invention adds device permission management for the first application, effectively managing the scope of open devices corresponding to the first application. Users can only manage and control devices within the cooperation scope on the third-party application side, improving the control capability over open devices.
[0038] In an exemplary embodiment, determining second device information from the first device information based on the application device permission information of the first application includes: establishing application device permission information for the first application, wherein the application device permission information includes: third device information of devices that are allowed to be viewed through the first application; the third device information includes at least one of the following: a first physical address, a first device model, and a first device category; filtering device information in the first device information that is inconsistent with the third device information to obtain the second device information, wherein the first device information includes at least one of the following: a second physical address of the first device, a second device model of the first device, and a second device category of the first device.
[0039] It should be noted that before receiving the acquisition request sent by the first server corresponding to the first application, the application device permission information of the first application is established based on dimensions such as device MAC, device model, and device category. Based on the application device permission information, the third device information of the devices allowed to be controlled through the first application is determined, and the first device information bound to the target object is filtered based on the third device information to obtain the second device information. This enhances the application device permission management of the first application, effectively manages the scope of open devices corresponding to the first application, and achieves the technical effect that users can only control devices within a preset range on the third-party application side, thereby improving the control over open devices.
[0040] In one exemplary embodiment, after sending the second device information to the first application, the method further includes: if the first application discovers a third device, receiving a first device identifier of the third device sent by the first application; determining whether the first application is allowed to bind the third device based on the first device identifier and the application device permission information; and if it is determined that the first application is not allowed to bind the third device, stopping the sending of the fourth device information of the third device to the first application.
[0041] It should be noted that when a third-party device discovers a third device to be bound through the integrated SDK, it sends the first device identifier of the third device to the server corresponding to the second application. The server corresponding to the second application determines whether the first device identifier of the third device is stored in the application's device permission information based on the first device identifier and the application's device permission information. If the first device identifier of the third device is not stored in the application's device permission information, it determines that the first application is not allowed to bind the third device and prohibits sending the fourth device information of the third device to the first application, so that the device information of the third device is not displayed on the discovery page of the first application.
[0042] In one exemplary embodiment, after determining whether the first application is allowed to bind to the second device based on the first device identifier and the application device permission information, the method further includes: if it is determined that the first application is allowed to bind to the third device, obtaining fourth device information of the third device; and sending the fourth device information to the first application so that the target object determines whether to establish a binding relationship between the first application and the third device.
[0043] It should be noted that, if the first device identifier of the fourth device is stored in the application device permission information, and the first device identifier of the third device is stored in the application device permission information, then the first application is allowed to bind to the third device, and the device information of the third device is displayed on the discovery page of the first application; so that the target object can bind to the third device through the first application and control the third device through the first application.
[0044] In one exemplary embodiment, after sending the second device information to the first application, the method further includes: receiving a binding request sent by the first application, wherein the binding request is used to request the establishment of a binding relationship between the target object and the fourth device, and the binding request includes: a second device identifier of the fourth device; determining whether to allow binding of the fourth device through the first application based on the second device identifier and the application device permission information; if it is determined that binding of the fourth device through the first application is allowed, establishing a binding relationship between the target object and the fourth device; updating the second device information, and sending the updated second device information to the first application.
[0045] It should be noted that, in a third-party application, when a user initiates device binding, the device sends a request to the server to establish a binding relationship between the target object and the device; it is determined whether the application's device permission information stores the second device identifier of the fourth device. If the application's device permission information stores the second device identifier of the fourth device, it is determined that binding the third device through the first application is allowed, and the updated second device information is sent to the first application.
[0046] In one exemplary embodiment, updating the second device information and sending the updated second device information to the first application includes: adding the fifth device information of the fourth device to the second device information to obtain the sixth device information; and sending the sixth device information to the first application.
[0047] In one exemplary embodiment, before receiving the acquisition request sent by the first server corresponding to the first application, the method further includes: if it is determined that the target object has logged into the first application using the identity information of the second application, sending confirmation information to the second application; and if it receives response information sent by the target object through the second application to determine whether to log into the first application, sending the user information of the target object to the first application.
[0048] With user OAuth authorization, the user login information is obtained by logging into the first application through the identity information of the second application of the target object and sending the user information of the target object to the first application, thus eliminating the user registration step and simplifying the user login process.
[0049] To better understand the process of the above-mentioned device information transmission method, the implementation flow of the above-mentioned device information transmission method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solution of the embodiments of this application.
[0050] This embodiment provides a method for sending device information, the specific scheme mainly includes the following parts:
[0051] I. Preparation Stage:
[0052] 1. Third-party enterprises create third-party applications and issue third-party application identifiers to them;
[0053] 2. Establish third-party application device permission information based on dimensions such as device MAC address, device model, and device category.
[0054] II. User Usage Phase:
[0055] 1. Third-party application initialization: Obtain user device information; Figure 3 This is a timing diagram (a) of a device information transmission method according to an embodiment of this application, as follows: Figure 3 As shown, the specific steps are as follows:
[0056] Step S301: The user opens a third-party application (equivalent to the first application in the above embodiment) to obtain authorization for the smart home application (equivalent to the second application in the above embodiment);
[0057] Step S302: The third-party application calls the third-party cloud interface to initialize the user-authorized device information;
[0058] Step S303: The IoT device management module queries the corresponding user device information (equivalent to the first device information in the above embodiment) based on the user information;
[0059] Step S304: Filter the application user device information according to the application device permission information;
[0060] Step S305: Establish user-authorized device information for third-party applications;
[0061] Step S306: Return user-authorized device information;
[0062] Step S307: Third-party cloud storage of user-authorized device information.
[0063] 2. Third-party applications discover devices to be bound; Figure 4 This is a timing diagram (II) of a device information transmission method according to an embodiment of this application, as follows: Figure 4 As shown, the specific steps are as follows:
[0064] Step S401: The third-party APP integrates the SDK to discover the device to be configured;
[0065] Step S402: The IoT device management module determines whether the device to be configured is a device that is allowed to be bound through the third-party application based on the third-party enterprise identifier;
[0066] Step S403: Within the authorized scope, the device calls the interface to obtain relevant device configuration information;
[0067] Step S404: Return the device discovery information and report it to the APP to notify the user.
[0068] 3. Third-party applications are linked to new devices; Figure 5 This is a timing diagram (III) of a device information transmission method according to an embodiment of this application, as shown below. Figure 5 As shown, the specific steps are as follows:
[0069] Step S501: The user initiates a request to bind the device under the third-party application;
[0070] Step S502: The device directly connects to the cloud to establish a user-device binding relationship;
[0071] Step S503: Update the user device list;
[0072] Step S504: Determine the permissions of the newly added third-party device model;
[0073] Step S505: Update the list of authorized devices for third-party applications;
[0074] Step S506: Push the new device message to the third-party cloud;
[0075] Step S507: The third-party cloud updates the user device list;
[0076] Step S508: Push the new device message to the third-party APP.
[0077] In this embodiment of the invention, enterprise device permission management is added to the existing user authorization, and an enterprise application permission table is established to effectively manage the scope of open devices of the enterprise. Users can only manage and control devices within the scope of cooperation on the third-party application terminal, thereby improving the smart home enterprise's ability to control open devices.
[0078] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0079] Figure 6 This is a structural block diagram of a device information transmitting apparatus according to an embodiment of this application; as shown below. Figure 6 As shown, it includes:
[0080] The receiving module 62 is configured to receive an acquisition request sent by the first server corresponding to the first application when the first application is authorized and authenticated by the second server corresponding to the second application, wherein the acquisition request is used to acquire device information corresponding to user information, and the user information is user information corresponding to the second application.
[0081] The first determining module 64 is used to respond to the acquisition request and determine the first device information corresponding to the user information, wherein the first device information is the device information of the first device that the first application is allowed to view;
[0082] The second determining module 66 is used to determine the second device information in the first device information based on the application device permission information of the first application, wherein the second device information is the device information of the second device that the first application is allowed to view;
[0083] The sending module 68 is used to send the second device information to the first application so that the first application displays the second device information.
[0084] Through the above-described device, when the first application is authorized and authenticated by the second server corresponding to the second application, it receives an acquisition request sent by the first server corresponding to the first application, wherein the acquisition request is used to acquire device information corresponding to user information, and the user information is user information corresponding to the second application; responding to the acquisition request, it determines the first device information corresponding to the user information, wherein the first device information is device information of the first device that is allowed to be viewed by the first application; it determines the second device information in the first device information according to the application device permission information of the first application, wherein the second device information is device information of the second device that is allowed to be viewed by the first application; and it sends the second device information to the first application so that the first application displays the second device information. This solves the problems in related technologies, where users obtain user device information and have the ability to manage all user devices after completing account authorization through a third-party application, but cannot control devices that are not in cooperation. The embodiments of the present invention add device permission management for the first application, effectively managing the scope of open devices corresponding to the first application. Users can only manage and control devices within the scope of cooperation on the third-party application side, thereby improving the control capability of open devices.
[0085] In an exemplary embodiment, the second determining module 66 is configured to establish application device permission information for the first application, wherein the application device permission information includes: third device information of devices that are allowed to be viewed through the first application; the third device information includes at least one of the following: a first physical address, a first device model, and a first device category; filtering device information in the first device information that is inconsistent with the third device information to obtain second device information, wherein the first device information includes at least one of the following: a second physical address of the first device, a second device model of the first device, and a second device category of the first device.
[0086] In an exemplary embodiment, the sending module 68 is configured to receive a first device identifier of the third device sent by the first application when the first application discovers the third device; determine whether the first application is allowed to bind the third device based on the first device identifier and the application device permission information; and stop sending fourth device information of the third device to the first application if it is determined that the first application is not allowed to bind the third device.
[0087] In an exemplary embodiment, the sending module 68 is configured to, upon determining that the first application is allowed to bind to the third device, obtain fourth device information of the third device; and send the fourth device information to the first application so that the target object determines whether to establish a binding relationship between the first application and the third device.
[0088] In an exemplary embodiment, the sending module 68 is configured to receive a binding request sent by the first application, wherein the binding request is used to request the establishment of a binding relationship between the target object and the fourth device, and the binding request includes: a second device identifier of the fourth device; determining whether binding the fourth device through the first application is allowed based on the second device identifier and the application device permission information; if it is determined that binding the fourth device through the first application is allowed, establishing a binding relationship between the target object and the fourth device; updating the second device information, and sending the updated second device information to the first application.
[0089] In an exemplary embodiment, the sending module 68 is configured to add the fifth device information of the fourth device to the second device information to obtain the sixth device information; and send the sixth device information to the first application.
[0090] In one exemplary embodiment, the sending module 68 is configured to send confirmation information to the second application when it is determined that the target object has logged into the first application using the identity information of the second application; and to send user information of the target object to the first application when it receives response information sent by the target object through the second application to determine that it has logged into the first application.
[0091] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0092] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0093] S1, when the first application is authorized and authenticated by the second server corresponding to the second application, a request for acquisition sent by the first server corresponding to the first application is received, wherein the request for acquisition is used to acquire device information corresponding to user information, and the user information is user information corresponding to the second application;
[0094] S2, in response to the acquisition request, determine the first device information corresponding to the user information, wherein the first device information is the device information of the first device that the first application is allowed to view;
[0095] S3, determine the second device information from the first device information based on the application device permission information of the first application, wherein the second device information is the device information of the second device that the first application is allowed to view;
[0096] S4, the second device information is sent to the first application so that the first application displays the second device information.
[0097] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0098] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0099] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0100] S1, when the first application is authorized and authenticated by the second server corresponding to the second application, a request for acquisition sent by the first server corresponding to the first application is received, wherein the request for acquisition is used to acquire device information corresponding to user information, and the user information is user information corresponding to the second application;
[0101] S2, in response to the acquisition request, determine the first device information corresponding to the user information, wherein the first device information is the device information of the first device that the first application is allowed to view;
[0102] S3, determine the second device information from the first device information based on the application device permission information of the first application, wherein the second device information is the device information of the second device that the first application is allowed to view;
[0103] S4, the second device information is sent to the first application so that the first application displays the second device information.
[0104] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0105] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0106] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0107] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for transmitting device information, characterized in that, include: When the first application is authorized and authenticated by the second server corresponding to the second application, it receives an acquisition request sent by the first server corresponding to the first application, wherein the acquisition request is used to acquire device information corresponding to user information; In response to the acquisition request, the first device information corresponding to the user information is determined, wherein the first device information is the device information of the first device bound to the target object, and the user information is the information corresponding to the target object and the user information corresponding to the second application; The second device information is determined from the first device information based on the application device permission information of the first application, wherein the second device information is the device information of the second device that the first application is allowed to view; The second device information is sent to the first application so that the first application displays the second device information. After sending the second device information to the first application, the method further includes: if the first application discovers a third device, receiving a first device identifier of the third device sent by the first application; determining whether to allow the first application to bind the third device based on the first device identifier and the application device permission information; and stopping sending the fourth device information of the third device to the first application if it is determined that the first application is not allowed to bind the third device.
2. The method for sending device information according to claim 1, characterized in that, The second device information is determined from the first device information based on the application device permission information of the first application, including: Establish application device permission information for the first application, wherein the application device permission information includes: third device information of devices that are allowed to be viewed through the first application; the third device information includes at least one of the following: first physical address, first device model, and first device category; Filter out device information in the first device information that is inconsistent with the third device information to obtain second device information, wherein the first device information includes at least one of the following: the second physical address of the first device, the second device model of the first device, and the second device category of the first device.
3. The method for sending device information according to claim 1, characterized in that, After determining whether to allow the first application to bind to the third device based on the first device identifier and the application device permission information, the method further includes: If it is determined that the first application is allowed to bind to the third device, the fourth device information of the third device is obtained; The fourth device information is sent to the first application so that the target object can determine whether to establish a binding relationship between the first application and the third device.
4. The method for sending device information according to claim 1, characterized in that, After sending the second device information to the first application, the method further includes: Receive a binding request sent by the first application, wherein the binding request is used to request the establishment of a binding relationship between the target object and the fourth device, and the binding request includes: the second device identifier of the fourth device; Determine whether to allow binding of the fourth device through the first application based on the second device identifier and the application device permission information; If it is determined that the first application is allowed to bind to the fourth device, a binding relationship between the target object and the fourth device is established; The fifth device information of the fourth device is added to the second device information, and the updated second device information is sent to the first application.
5. The method for sending device information according to claim 1, characterized in that, Before receiving the acquisition request sent by the first server corresponding to the first application, the method further includes: If it is determined that the first application has been logged in using the identity information of the second application of the target object, a confirmation message is sent to the second application; Upon receiving response information from the target object via the second application, indicating its intention to log in to the first application, the user information of the target object is sent to the first application.
6. A device for transmitting device information, characterized in that, include: The receiving module is configured to receive an acquisition request sent by the first server corresponding to the first application when the first application is authorized and authenticated by the second server corresponding to the second application, wherein the acquisition request is used to acquire device information corresponding to user information; The first determining module is used to respond to the acquisition request and determine the first device information corresponding to the user information, wherein the first device information is the device information of the first device bound to the target object, and the user information is the information corresponding to the target object and the user information corresponding to the second application. The second determining module is used to determine the second device information from the first device information based on the application device permission information of the first application, wherein the second device information is the device information of the second device that the first application is allowed to view; A sending module is configured to send the second device information to the first application, so that the first application displays the second device information; The sending module is configured to, when the first application discovers a third device, receive a first device identifier of the third device sent by the first application; determine whether the first application is allowed to bind the third device based on the first device identifier and the application's device permission information; and, if it is determined that the first application is not allowed to bind the third device, stop sending fourth device information of the third device to the first application.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method according to any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 5 through the computer program.
Citation Information
Patent Citations
Equipment information display method and device, storage medium and electronic device
CN112738019A