CN118338388A - A communication method, control device, electronic device and storage medium - Google Patents
A communication method, control device, electronic device and storage medium Download PDFInfo
- Publication number
- CN118338388A CN118338388A CN202410331377.9A CN202410331377A CN118338388A CN 118338388 A CN118338388 A CN 118338388A CN 202410331377 A CN202410331377 A CN 202410331377A CN 118338388 A CN118338388 A CN 118338388A
- Authority
- CN
- China
- Prior art keywords
- target
- electronic device
- target data
- storage area
- request message
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. Transmission Power Control [TPC] or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0225—Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
- H04W52/0229—Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a wanted signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. Transmission Power Control [TPC] or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0261—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
- H04W52/0274—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
- H04W52/028—Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof switching on or off only a part of the equipment circuit blocks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及图像形成技术领域,具体地涉及一种通信方法、控制装置、电子设备及存储介质。The present application relates to the field of image forming technology, and in particular to a communication method, a control device, an electronic device and a storage medium.
背景技术Background technique
为了适应越来越高的能耗要求,提高产品竞争力,现有的图像形成设备均设置有低功耗模式。在低功耗模式下,图像形成设备内部分功能模块休眠,导致图像形成设备无法实现某些功能。例如,在图像形成设备处于低功耗模式下,因无法回复Bonjour数据导致无法与其他设备通过Bonjour服务建立通信,进而导致在图像形成设备处于低功耗模式下时,一些其他设备无法使用该图像形成设备,降低了用户体验。In order to adapt to the increasingly high energy consumption requirements and improve product competitiveness, existing image forming devices are all equipped with low power consumption modes. In low power consumption mode, some functional modules in the image forming device are dormant, resulting in the inability of the image forming device to implement certain functions. For example, when the image forming device is in low power consumption mode, it cannot communicate with other devices through the Bonjour service because it cannot reply to Bonjour data, which in turn causes some other devices to be unable to use the image forming device when the image forming device is in low power consumption mode, reducing the user experience.
发明内容Summary of the invention
有鉴于此,本申请提供一种通信方法、控制装置、电子设备及存储介质,以利于解决现有技术中在低功耗模式下无法与图像形成设备通信导致无法使用该图像形成设备的问题。In view of this, the present application provides a communication method, a control device, an electronic device and a storage medium, so as to solve the problem in the prior art that the image forming device cannot be used due to the inability to communicate with the image forming device in the low power consumption mode.
第一方面,本申请实施例提供了一种通信方法,应用于电子设备,包括:In a first aspect, an embodiment of the present application provides a communication method, which is applied to an electronic device, including:
在所述电子设备处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备,以便所述目标设备能够根据所述目标数据与所述电子设备建立通信连接;所述目标设备是发送所述目标服务请求消息的设备。When the electronic device is in low power consumption mode, in response to a target service request message, target data is sent to a target device so that the target device can establish a communication connection with the electronic device according to the target data; the target device is the device that sends the target service request message.
在第一方面的一种可能的实现方式中,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储于第一存储区域中,所述将目标数据发送至目标设备之前,所述方法还包括:In a possible implementation manner of the first aspect, the electronic device is used to store the target data in a first storage area when in a non-low power consumption mode, and before sending the target data to the target device, the method further includes:
从第一存储区域中获取所述目标数据,所述第一存储区域为所述电子设备处于低功耗模式时可读取的存储区域。The target data is acquired from a first storage area, where the first storage area is a storage area that can be read when the electronic device is in a low power consumption mode.
在第一方面的一种可能的实现方式中,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储于第一存储区域中,所述将目标数据发送至目标设备之前,所述方法还包括:In a possible implementation manner of the first aspect, the electronic device is used to store the target data in a first storage area when in a non-low power consumption mode, and before sending the target data to the target device, the method further includes:
将存储于所述第一存储区域中的所述目标数据存储于第二存储区域中,从所述第二存储区域中获取所述目标数据,其中,所述第二存储区域为所述电子设备处于低功耗模式时可读取的存储区域。The target data stored in the first storage area is stored in a second storage area, and the target data is acquired from the second storage area, wherein the second storage area is a storage area that can be read when the electronic device is in a low power consumption mode.
在第一方面的一种可能的实现方式中,所述响应于目标服务请求消息,将目标数据发送至目标设备,包括:In a possible implementation manner of the first aspect, sending the target data to the target device in response to the target service request message includes:
获取服务请求消息;Get service request message;
确定所述服务请求消息是否为所述目标服务请求消息;Determining whether the service request message is the target service request message;
若所述服务请求消息为所述目标服务请求消息,则响应于所述目标服务请求信息,将所述目标数据发送至所述目标设备。If the service request message is the target service request message, the target data is sent to the target device in response to the target service request message.
在第一方面的一种可能的实现方式中,所述电子设备用于通过目标服务与所述目标设备建立通信连接,所述将目标数据发送至目标设备,包括:In a possible implementation manner of the first aspect, the electronic device is used to establish a communication connection with the target device through a target service, and sending the target data to the target device includes:
按照所述目标服务的数据格式进行封装,得到目标格式的目标数据;Encapsulate according to the data format of the target service to obtain target data in the target format;
将所述目标格式的目标数据进行网络封装,并将网络封装后的目标数据发送至所述目标设备。The target data in the target format is network encapsulated, and the network-encapsulated target data is sent to the target device.
在第一方面的一种可能的实现方式中,所述方法还包括:In a possible implementation manner of the first aspect, the method further includes:
在进入低功耗模式之前,将所述目标数据存储至所述第一存储区域。Before entering the low power consumption mode, the target data is stored in the first storage area.
在第一方面的一种可能的实现方式中,所述在进入低功耗模式之前,将所述目标数据存储至所述第一存储区域包括:In a possible implementation manner of the first aspect, before entering the low power consumption mode, storing the target data in the first storage area includes:
在进入低功耗模式之前,若所述电子设备的网络标识信息发生变化,将所述目标数据存储至所述第一存储区域;或者Before entering the low power consumption mode, if the network identification information of the electronic device changes, storing the target data in the first storage area; or
若所述电子设备重新开启完成后,将所述目标数据存储至所述第一存储区域;或者If the electronic device is restarted, the target data is stored in the first storage area; or
若所述电子设备确定需要进入低功耗模式的同时或者之后,将所述目标数据存储至所述第一存储区域;If the electronic device determines that it needs to enter the low power consumption mode, or thereafter, the target data is stored in the first storage area;
若所述电子设备确定需要执行进入低功耗模式所需的系统初始化时,将所述目标数据存储至所述第一存储区域;或者If the electronic device determines that it is necessary to perform system initialization required for entering the low power consumption mode, storing the target data in the first storage area; or
若所述电子设备在执行进入低功耗模式所需的系统初始化的过程中,将所述目标数据存储至所述第一存储区域。If the electronic device is in the process of executing the system initialization required for entering the low power consumption mode, the target data is stored in the first storage area.
第二方面,本申请实施例提供了一种控制装置,包括:In a second aspect, an embodiment of the present application provides a control device, including:
发送单元,用于在所述电子设备处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备,以便所述目标设备能够根据所述目标数据与所述电子设备建立通信连接;所述目标设备是发送所述目标服务请求消息的设备。A sending unit is used to send target data to a target device in response to a target service request message when the electronic device is in a low power consumption mode, so that the target device can establish a communication connection with the electronic device based on the target data; the target device is the device that sends the target service request message.
在第二方面的一种可能的实现方式中,所述控制装置包括控制单元,当所述电子设备处于低功耗模式时,所述控制单元至少部分处于工作状态。In a possible implementation manner of the second aspect, the control device includes a control unit, and when the electronic device is in a low power consumption mode, the control unit is at least partially in an operating state.
在第二方面的一种可能的实现方式中,所述控制单元包括第一控制单元,当所述电子设备处于低功耗模式时,所述第一控制单元处于工作状态,所述第一控制单元,具体用于在所述电子设备处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备,以便所述目标设备能够根据所述目标数据与所述电子设备建立通信连接;所述目标设备是发送所述目标服务请求消息的设备。In a possible implementation of the second aspect, the control unit includes a first control unit. When the electronic device is in a low power consumption mode, the first control unit is in a working state. The first control unit is specifically used to send target data to a target device in response to a target service request message when the electronic device is in a low power consumption mode, so that the target device can establish a communication connection with the electronic device based on the target data; the target device is a device that sends the target service request message.
在第二方面的一种可能的实现方式中,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储至第一存储区域中,所述第一控制单元具体用于在将所述目标数据发送至目标设备之前,从第一存储区域中获取目标数据,所述第一存储区域为所述电子设备处于低功耗模式时所述第一控制单元可读取的存储区域。In a possible implementation of the second aspect, the electronic device is used to store the target data in a first storage area when it is in a non-low power consumption mode, and the first control unit is specifically used to obtain the target data from the first storage area before sending the target data to the target device, and the first storage area is a storage area that can be read by the first control unit when the electronic device is in a low power consumption mode.
在第二方面的一种可能的实现方式中,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储至第一存储区域中,所述电子设备具体用于在将所述目标数据发送至目标设备之前,将存储与所述第一存储区域中的所述目标数据存储于第二存储区域中,所述第一控制单元具体用于从所述第二存储区域中获取所述目标数据,其中,所述第二存储区域中所述电子设备处于低功耗模式时所述第一控制单元可读取的存储区域。In a possible implementation of the second aspect, the electronic device is used to store the target data in a first storage area when it is in a non-low power consumption mode, and the electronic device is specifically used to store the target data in the first storage area in a second storage area before sending the target data to a target device, and the first control unit is specifically used to obtain the target data from the second storage area, wherein the second storage area is a storage area readable by the first control unit when the electronic device is in a low power consumption mode.
在第二方面的一种可能的实现方式中,所述电子设备用于在处于非低功耗时,将所述目标数据存储至第一存储区域中,所述第一控制单元具体用于在将所述目标数据发送至目标设备之前,将存储于所述第一存储区域中的所述目标数据存储于第二存储区域中,从所述第二存储区域中获取所述目标数据,其中,所述第二存储区域为所述电子设备处于低功耗模式时所述第一控制单元可读取的存储区域。In a possible implementation of the second aspect, the electronic device is used to store the target data in a first storage area when it is not in low power consumption mode, and the first control unit is specifically used to store the target data stored in the first storage area in a second storage area before sending the target data to the target device, and obtain the target data from the second storage area, wherein the second storage area is a storage area readable by the first control unit when the electronic device is in low power consumption mode.
第三方面,本申请实施例提供一种电子设备,包括前述第二方面所述的控制装置。In a third aspect, an embodiment of the present application provides an electronic device, comprising the control device described in the second aspect.
第四方面,本申请实施例提供了一种电子设备,包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被所述处理器执行时,触发所述电子设备执行上述第一方面任一项所述的方法。In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute any one of the methods described in the first aspect above.
第五方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行第一方面任一项所述的方法。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.
采用本申请实施例所提供的方案,在电子设备在处于低功耗模式时,也可以对目标服务请求消息进行响应,以便目标设备可以通过目标服务与电子设备建立通信连接,从而实现在满足电子设备低功耗需求的同时也可以通过目标服务与目标设备建立通信连接的目的。By adopting the solution provided in the embodiment of the present application, when the electronic device is in a low power consumption mode, it can also respond to the target service request message so that the target device can establish a communication connection with the electronic device through the target service, thereby achieving the purpose of establishing a communication connection with the target device through the target service while meeting the low power consumption requirements of the electronic device.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
图1为本申请实施例提供的一种通信系统的结构示意图;FIG1 is a schematic diagram of the structure of a communication system provided in an embodiment of the present application;
图2为本申请实施例提供的一种通信方法的流程示意图;FIG2 is a flow chart of a communication method provided in an embodiment of the present application;
图3为本申请实施例提供的另一种通信方法的流程示意图;FIG3 is a flow chart of another communication method provided in an embodiment of the present application;
图4为本申请实施例提供的另一种通信方法的流程示意图;FIG4 is a flow chart of another communication method provided in an embodiment of the present application;
图5为本申请实施例提供的另一种通信方法的流程示意图;FIG5 is a flow chart of another communication method provided in an embodiment of the present application;
图6为本申请实施例提供的另一种通信方法的流程示意图;FIG6 is a flow chart of another communication method provided in an embodiment of the present application;
图7为本申请实施例提供的一种电子设备的结构示意图;FIG7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
图8为本申请实施例提供的另一种电子设备的结构示意图;FIG8 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
图9为本申请实施例提供的另一种电子设备的结构示意图;FIG9 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application;
图10为本申请实施例提供的另一种电子设备的结构示意图。FIG. 10 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,甲和/或乙,可以表示:单独存在甲,同时存在甲和乙,单独存在乙这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship.
参见图1,为本申请实施例提供的一种通信系统的结构示意图。如图1所示,该通信系统包括电子设备10及目标设备20。电子设备10与目标设备20建立通信连接时,可以通过一些服务来实现。例如,目标设备20在需要与电子设备10建立通信连接时,可以通过Bonjour服务来实现。这里的Bonjour服务是基于组播域名服务的开放性零设置网络标准所起的名字,能自动发现IP网络上的电脑、设备和服务。Bonjour使用工业标准的IP协议来允许设备自动发现彼此,而不需输入IP地址或配置DNS服务器。即为,目标设备20可以通过Bonjour服务发送Bonjour服务请求消息,该请求消息中携带有其所需建立通信连接的设备的标识信息。此时,电子设备10在接收到该Bonjour服务请求消息时,可以获取Bonjour服务的响应数据,并将该响应数据发送至目标设备20,目标设备20可以根据响应数据与电子设备10建立通信连接。在一些技术中,为了满足电子设备10低功耗的需求,电子设备10中通常设置有低功耗模式。在电子设备低10功耗模式中,电子设备10内的一些功能模块需要进入休眠状态,这样导致电子设备10在低功耗模式下部分功能可能无法实现。在一些技术中,电子设备10处于低功耗模式时,由于Bonjour服务的处理模块需要切换至休眠状态,导致电子设备10处于低功耗模式时无法对Bonjour服务进行响应,进而使得目标设备20无法与电子设备10建立通信连接,降低用户体验。当然,本申请实施例中,Bonjour服务也可以替换为其他与Bonjour服务功能相同的服务,本申请实施例对此不进行限定。Referring to FIG. 1 , a schematic diagram of the structure of a communication system provided by an embodiment of the present application is shown. As shown in FIG. 1 , the communication system includes an electronic device 10 and a target device 20. When the electronic device 10 establishes a communication connection with the target device 20, it can be achieved through some services. For example, when the target device 20 needs to establish a communication connection with the electronic device 10, it can be achieved through the Bonjour service. The Bonjour service here is a name given based on the open zero-setting network standard of the multicast domain name service, which can automatically discover computers, devices and services on the IP network. Bonjour uses the industrial standard IP protocol to allow devices to automatically discover each other without entering an IP address or configuring a DNS server. That is, the target device 20 can send a Bonjour service request message through the Bonjour service, and the request message carries the identification information of the device that needs to establish a communication connection. At this time, when the electronic device 10 receives the Bonjour service request message, it can obtain the response data of the Bonjour service and send the response data to the target device 20, and the target device 20 can establish a communication connection with the electronic device 10 according to the response data. In some technologies, in order to meet the low power consumption requirements of the electronic device 10, a low power consumption mode is usually provided in the electronic device 10. In the low power consumption mode of the electronic device 10, some functional modules in the electronic device 10 need to enter a dormant state, which may result in that some functions of the electronic device 10 may not be implemented in the low power consumption mode. In some technologies, when the electronic device 10 is in the low power consumption mode, since the processing module of the Bonjour service needs to switch to a dormant state, the electronic device 10 cannot respond to the Bonjour service when it is in the low power consumption mode, thereby making it impossible for the target device 20 to establish a communication connection with the electronic device 10, reducing the user experience. Of course, in the embodiment of the present application, the Bonjour service can also be replaced by other services with the same functions as the Bonjour service, and the embodiment of the present application does not limit this.
其中,电子设备10可以是图像形成设备,包括但不限于打印机、复印机、传真机、扫描仪以及在单个设备中执行以上功能的多功能外设。目标设备20包括但不限于手机、笔记本电脑(Laptop)、个人数字助理(persona l d igita l ass istant,PDA)、智能手表、上网本等。The electronic device 10 may be an image forming device, including but not limited to a printer, a copier, a fax machine, a scanner, and a multifunctional peripheral that performs the above functions in a single device. The target device 20 includes but is not limited to a mobile phone, a laptop, a personal digital assistant (PDA), a smart watch, a netbook, etc.
针对上述问题,本申请的其中一种实施例为提供一种通信方法,电子设备10在低功耗模式时,接收到目标服务请求消息后,可以获取目标服务请求消息对应的响应数据,即为目标数据,将该目标数据发送至目标设备20,以便目标设备20可以通过目标数据与电子设备10建立通信连接。即为,电子设备10可以在非低功耗模式时,预先获取目标数据,这样一来,在电子设备10在处于低功耗模式时,也可以对目标服务请求消息进行响应,以便目标设备20可以通过目标服务与电子设备10建立通信连接,从而实现在满足电子设备10低功耗需求的同时也可以通过目标服务与目标设备20建立通信连接的目的。以下进行详细说明。In response to the above problems, one embodiment of the present application provides a communication method, when the electronic device 10 is in low power mode, after receiving the target service request message, it can obtain the response data corresponding to the target service request message, that is, the target data, and send the target data to the target device 20, so that the target device 20 can establish a communication connection with the electronic device 10 through the target data. That is, the electronic device 10 can obtain the target data in advance when it is not in low power mode. In this way, when the electronic device 10 is in low power mode, it can also respond to the target service request message, so that the target device 20 can establish a communication connection with the electronic device 10 through the target service, thereby achieving the purpose of meeting the low power consumption requirements of the electronic device 10 while also establishing a communication connection with the target device 20 through the target service. The following is a detailed description.
参见图2,为本申请实施例提供的一种通信方法的流程示意图。该方法应用于电子设备10,如图1所示,该方法包括:Referring to FIG2 , a flow chart of a communication method provided in an embodiment of the present application is shown. The method is applied to an electronic device 10, as shown in FIG1 , and the method includes:
步骤S201、在电子设备10处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备20,以便目标设备20能够根据目标数据与电子设备10建立通信连接。Step S201 : When the electronic device 10 is in a low power consumption mode, in response to a target service request message, target data is sent to the target device 20 , so that the target device 20 can establish a communication connection with the electronic device 10 according to the target data.
其中,目标设备20是发送目标服务请求消息的设备。The target device 20 is a device that sends a target service request message.
在本申请实施例中,目标设备20在需要与电子设备10建立通信连接时,可以通过目标服务来实现。此时,目标设备20可以向电子设备10发送目标服务请求消息。电子设备10为了在低功耗模式下也能通过目标服务与其他设备建立通信连接,可以在非低功耗模式下,预先获取目标数据。这样,在低功耗模式下,电子设备10接收到目标服务请求消息时,说明目标设备20想要通过目标服务与电子设备10建立通信连接。此时,电子设备10可以响应于目标服务请求消息,将目标数据发送至目标设备20,以使得目标设备20在接收到目标数据后,可以根据目标数据与电子设备10建立通信连接。In an embodiment of the present application, when the target device 20 needs to establish a communication connection with the electronic device 10, it can be achieved through the target service. At this time, the target device 20 can send a target service request message to the electronic device 10. In order to establish a communication connection with other devices through the target service even in low power consumption mode, the electronic device 10 can pre-acquire target data in non-low power consumption mode. In this way, in low power consumption mode, when the electronic device 10 receives the target service request message, it means that the target device 20 wants to establish a communication connection with the electronic device 10 through the target service. At this time, the electronic device 10 can send the target data to the target device 20 in response to the target service request message, so that the target device 20 can establish a communication connection with the electronic device 10 according to the target data after receiving the target data.
作为一种可能的实现方式,如图3所示,上述方法还包括:As a possible implementation, as shown in FIG3 , the method further includes:
步骤S202、在进入低功耗模式之前,将目标数据存储至第一存储区域。Step S202: before entering the low power consumption mode, storing the target data in the first storage area.
在本申请实施例中,电子设备10在进入低功耗模式前需要先获取目标数据,才能在低功耗模式下,接收到目标服务请求消息时将目标数据发送至目标设备20。在一些可行的实施方式中,上述目标数据可以在电子设备10的网络标识信息发生变化时,从电子设备10的网络模块获取实时网络参数,并根据上述目标数据的目标格式以及实时网络参数生成目标数据。其中,这里的网络模块指的是电子设备10中独立于硬件模块以及固件模块之外的软件模块中的组成部分,为电子设备10提供网络服务。由于电子设备10在获取了目标数据后可能并不是立即使用,因此电子设备10需要将目标数据先存储起来。基于此,在本申请实施例中电子设备10用于在处于非低功耗模式时,将目标数据存储于第一存储区域中,以便于电子设备10能够在低功耗模式时,通过直接或者间接访问第一存储区域来获取目标数据,以便于电子设备10能够基于获取的目标数据与目标设备建立连接。In an embodiment of the present application, the electronic device 10 needs to obtain the target data before entering the low power mode, so that the target data can be sent to the target device 20 when the target service request message is received in the low power mode. In some feasible implementations, the above-mentioned target data can obtain real-time network parameters from the network module of the electronic device 10 when the network identification information of the electronic device 10 changes, and generate the target data according to the target format of the above-mentioned target data and the real-time network parameters. Among them, the network module here refers to the component in the software module independent of the hardware module and the firmware module in the electronic device 10, which provides network services for the electronic device 10. Since the electronic device 10 may not use the target data immediately after obtaining it, the electronic device 10 needs to store the target data first. Based on this, in an embodiment of the present application, the electronic device 10 is used to store the target data in the first storage area when it is in a non-low power mode, so that the electronic device 10 can obtain the target data by directly or indirectly accessing the first storage area in the low power mode, so that the electronic device 10 can establish a connection with the target device based on the obtained target data.
即为,为了能够在低功耗模式下对目标服务请求消息进行响应,因此电子设备10可以在非低功耗摸下时,获取目标数据。此时在电子设备10的非低功耗模式时,电子设备10可以先获取目标服务对应的数据作为目标数据。电子设备10在获取了目标数据后,由于该目标数据并不是立即使用,可以先将其存储至存储区域。为了能够在电子设备10处于低功耗模式时,可以在存储区域中获取目标数据,此时可以将电子设备10处于低功耗模式下可读取的存储区域作为第一存储区域,将目标数据直接存储至第一存储区域。That is, in order to be able to respond to the target service request message in low power mode, the electronic device 10 can obtain the target data when it is not in low power mode. At this time, when the electronic device 10 is in non-low power mode, the electronic device 10 can first obtain the data corresponding to the target service as the target data. After the electronic device 10 obtains the target data, since the target data is not used immediately, it can be stored in a storage area first. In order to be able to obtain the target data in the storage area when the electronic device 10 is in low power mode, the storage area that can be read by the electronic device 10 in low power mode can be used as the first storage area, and the target data can be directly stored in the first storage area.
在一些实施例中,电子设备10可以将目标服务对应的数据直接作为目标数据存储至第一存储区域。也可以,为了降低占用的存储空间,在目标服务的数据中提取出部分数据作为目标数据。在一些实施例中,可以将目标服务的数据中仅与目标服务相关的数据作为目标数据。例如,目标服务的数据中包含有电子设备10的IP地址信息、名称信息、电子设备10的功能属性信息及电子设备10在目标服务中的服务名称等。此时,由于电子设备10的IP地址信息及名称信息在电子设备10实现其他功能时,也会被使用到,而电子设备10的功能属性信息及电子设备10在目标服务中的服务名称仅与该目标服务有关。此时,可以将电子设备10的功能属性信息及电子设备10在目标服务中的服务名称作为目标数据,存储至第一存储区域。In some embodiments, the electronic device 10 can store the data corresponding to the target service directly as the target data in the first storage area. Alternatively, in order to reduce the occupied storage space, some data can be extracted from the data of the target service as the target data. In some embodiments, only the data related to the target service in the data of the target service can be used as the target data. For example, the data of the target service includes the IP address information, name information, functional attribute information of the electronic device 10, and the service name of the electronic device 10 in the target service. At this time, since the IP address information and name information of the electronic device 10 will also be used when the electronic device 10 implements other functions, the functional attribute information of the electronic device 10 and the service name of the electronic device 10 in the target service are only related to the target service. At this time, the functional attribute information of the electronic device 10 and the service name of the electronic device 10 in the target service can be used as target data and stored in the first storage area.
作为一种可能的实现方式,上述在进入低功耗模式之前,将目标数据存储至第一存储区域包括:As a possible implementation, before entering the low power consumption mode, storing the target data in the first storage area includes:
在进入低功耗模式之前,若电子设备10的网络标识信息发生变化,则将目标服务对应的目标数据存储至第一存储区域。或者,若电子设备10重新开启完成后,将目标数据存储至第一存储区域;或者,若电子设备10确定需要进入低功耗模式的同时或者之后,将目标数据存储至第一存储区域;若电子设备10确定需要执行进入低功耗模式所需的系统初始化时,将目标数据存储至第一存储区域;或者,所电子设备10在执行进入低功耗模式所需的系统初始化的过程中,将目标数据存储至第一存储区域。Before entering the low power mode, if the network identification information of the electronic device 10 changes, the target data corresponding to the target service is stored in the first storage area. Alternatively, if the electronic device 10 is restarted, the target data is stored in the first storage area; or, if the electronic device 10 determines that it needs to enter the low power mode at the same time or after, the target data is stored in the first storage area; if the electronic device 10 determines that it needs to perform the system initialization required to enter the low power mode, the target data is stored in the first storage area; or, the electronic device 10 stores the target data in the first storage area during the process of performing the system initialization required to enter the low power mode.
即为,为了降低电子设备10的功耗,可以仅在目标数据发生变化时,重新获取目标数据,并将重新获取的目标数据存储至第一存储区域。由于目标数据是基于电子设备10的标识信息产生的。一般情况下,电子设备10中的网络标识信息可能由于某些功能的实现或者用户的设置而发生变化,例如,用户设置了电子设备的IP地址等信息,导致网络标识信息变化。因此,电子设备10可以通过直接识别电子设备10中的网络标识信息是否发生变化,来确定目标数据是否变化,若发生变化则需要获取目标数据并将目标数据存储至第一存储区域。或者在电子设备10重新启动时,则电子设备10可以重新获取目标数据并将目标数据存储至第一存储区域。That is, in order to reduce the power consumption of the electronic device 10, the target data can be reacquired only when the target data changes, and the reacquired target data is stored in the first storage area. Because the target data is generated based on the identification information of the electronic device 10. Generally, the network identification information in the electronic device 10 may change due to the implementation of certain functions or the user's settings. For example, the user sets the IP address and other information of the electronic device, resulting in a change in the network identification information. Therefore, the electronic device 10 can determine whether the target data has changed by directly identifying whether the network identification information in the electronic device 10 has changed. If it has changed, it is necessary to acquire the target data and store the target data in the first storage area. Or when the electronic device 10 is restarted, the electronic device 10 can reacquire the target data and store the target data in the first storage area.
在一些实施例中,电子设备10可以实时或者周期性检测电子设备10的网络标识信息是否发生变化。例如,电子设备10可以周期性获取电子设备10的网络标识信息,将当前次获取的电子设备10的网络标识信息与上一次获取的电子设备10的网络标识信息进行比较,确定是否相同。若相同,则说明电子设备10的网络标识信息未发生变化,若不同,则说明电子设备10的网络标识信息发生变化。此时,电子设备10需要从网络模块1021重新获取目标数据,并将目标数据重新存储至第一存储区域,以更新第一存储区域中的目标数据。In some embodiments, the electronic device 10 can detect in real time or periodically whether the network identification information of the electronic device 10 has changed. For example, the electronic device 10 can periodically obtain the network identification information of the electronic device 10, compare the network identification information of the electronic device 10 currently obtained with the network identification information of the electronic device 10 obtained last time, and determine whether they are the same. If they are the same, it means that the network identification information of the electronic device 10 has not changed. If they are different, it means that the network identification information of the electronic device 10 has changed. At this time, the electronic device 10 needs to re-acquire the target data from the network module 1021, and re-store the target data to the first storage area to update the target data in the first storage area.
或者,在一些实施例中,在电子设备10重新开启时,则第一存储区域内存储的数据可能被释放了或者,因电子设备10重新启动也会导致电子设备10的网络标识信息发生变化,此时电子设备10在电子设备10启动后需要重新获取目标数据,并将目标数据存储至第一存储区域。Alternatively, in some embodiments, when the electronic device 10 is restarted, the data stored in the first storage area may be released, or the network identification information of the electronic device 10 may change due to the restart of the electronic device 10. In this case, the electronic device 10 needs to reacquire the target data after the electronic device 10 is started and store the target data in the first storage area.
或者,由于电子设备10将目标数据存储至第一存储区域是为了电子设备10处于低功耗模式时,能够获取目标数据,以便对目标服务请求消息进行响应。因此,电子设备10可以在进入低功耗模式之前,若电子设备10的网络标识信息发生变化,将目标数据存储至第一存储区域;或者,若电子设备10重新开启完成后,将目标数据存储至第一存储区域;或者,若电子设备10确定需要进入低功耗模式的同时或者之后,将目标数据存储至第一存储区域;若电子设备10确定需要进入低功耗模式所需的系统初始化时,将目标数据存储至第一存储区域;或者,若电子设备10在执行进入低功耗模式所需的系统初始化的过程中,将目标数据存储至第一存储区域。这样,可以提高第一存储区域在电子设备10处于非低功耗模式下的利用率。Alternatively, since the electronic device 10 stores the target data in the first storage area in order to obtain the target data when the electronic device 10 is in a low power mode, so as to respond to the target service request message. Therefore, the electronic device 10 can store the target data in the first storage area before entering the low power mode if the network identification information of the electronic device 10 changes; or, if the electronic device 10 is restarted, the target data is stored in the first storage area; or, if the electronic device 10 determines that it needs to enter the low power mode at the same time or after, the target data is stored in the first storage area; if the electronic device 10 determines that it needs to enter the system initialization required for the low power mode, the target data is stored in the first storage area; or, if the electronic device 10 is in the process of executing the system initialization required for entering the low power mode, the target data is stored in the first storage area. In this way, the utilization rate of the first storage area when the electronic device 10 is in a non-low power mode can be improved.
作为一种可能的实现方式,由于电子设备10在低功耗模式下并不是其内所有的存储区域均处于可读写状态。即为,在电子设备10处于低功耗模式下时,仅有部分存储区域是可读写的。电子设备10可以用于将获取的目标数据先存储至第一存储区域。该第一存储区域可以是电子设备10在低功耗模式下能够进行读取的存储区域。此时,在上述步骤S201之前,如图4所示,所述方法还包括:As a possible implementation, since not all storage areas in the electronic device 10 are in a readable and writable state in the low power consumption mode. That is, when the electronic device 10 is in the low power consumption mode, only some storage areas are readable and writable. The electronic device 10 can be used to store the acquired target data in the first storage area first. The first storage area can be a storage area that the electronic device 10 can read in the low power consumption mode. At this time, before the above step S201, as shown in FIG4, the method further includes:
步骤S203、从第一存储区域中获取目标数据。Step S203: Acquire target data from the first storage area.
在本申请实施例中,电子设备10在非低功耗模式下将目标数据存储至第一存储区域后,电子设备10在需要获取目标数据时,可以在第一存储区域中读取出目标数据。在一些实施例中,电子设备10可以在低功耗模式下,接收到目标服务请求消息时,由于需要对目标服务请求消息进行相应,此时电子设备10可以从第一存储区域中读取出目标数据。In an embodiment of the present application, after the electronic device 10 stores the target data in the first storage area in a non-low power consumption mode, the electronic device 10 can read the target data in the first storage area when it needs to obtain the target data. In some embodiments, the electronic device 10 can be in a low power consumption mode, and when receiving a target service request message, the electronic device 10 can read the target data from the first storage area because it needs to respond to the target service request message.
或者,在一些实施例中,为了方便使用,电子设备10也可以在未切换至低功耗模式时,从第一存储中读取出目标数据,这样在其进入低功耗模式时,若接收到目标服务请求消息,可以直接将已经获取的目标数据作为响应数据发送至目标设备20。Alternatively, in some embodiments, for ease of use, the electronic device 10 may also read the target data from the first storage when it is not switched to the low power mode. In this way, when it enters the low power mode, if it receives a target service request message, it can directly send the acquired target data as response data to the target device 20.
也就是说,在本申请实施例中,电子设备10既可以在低功耗模式下获取目标数据,也可以在未切换至低功耗模式时获取目标数据,只要在将目标数据发送至目标设备之前获取目标数据即可,本申请实施例对电子设备10获取目标数据的时机并不限定。That is to say, in the embodiment of the present application, the electronic device 10 can obtain the target data in the low power consumption mode, and can also obtain the target data when not switching to the low power consumption mode, as long as the target data is obtained before sending the target data to the target device. The embodiment of the present application does not limit the timing of the electronic device 10 obtaining the target data.
作为另一种可能的实现方式,电子设备10可以用于将获取的目标数据先存储至第一存储区域。该第一存储区域可以是电子设备10在低功耗模式下可以进行读取的存储区域。此时,在上述步骤S201之前,如图5所示,所述方法还包括:As another possible implementation, the electronic device 10 may be used to store the acquired target data in a first storage area. The first storage area may be a storage area that the electronic device 10 can read in a low power consumption mode. At this time, before the above step S201, as shown in FIG5 , the method further includes:
步骤S204、将存储于第一存储区域中的目标数据存储于第二存储区域中,从第二存储区域中获取目标数据。Step S204: Store the target data stored in the first storage area in the second storage area, and obtain the target data from the second storage area.
其中,第二存储区域为电子设备10处于低功耗模式时可读取的存储区域。即为,在电子设备10将目标数据存储的第一存储区域并不是电子设备10在低功耗模式下能够读取的数据时,则说明该电子设备10在低功耗模式下无法直接在第一存储区域中获取目标数据。此时,电子设备10需要先将第一存储区域中存储的目标数据存储至能够在低功耗模式读取的第二存储区域。即为,电子设备10可以将存储在第一存储区域的目标数据读取出并存储至第二存储区域。Among them, the second storage area is a storage area that can be read when the electronic device 10 is in low power mode. That is, when the first storage area where the electronic device 10 stores the target data is not the data that the electronic device 10 can read in low power mode, it means that the electronic device 10 cannot directly obtain the target data in the first storage area in low power mode. At this time, the electronic device 10 needs to first store the target data stored in the first storage area to the second storage area that can be read in low power mode. That is, the electronic device 10 can read the target data stored in the first storage area and store it in the second storage area.
电子设备10在将目标数据存储至第二存储区域后,在需要获取目标数据时,可以在第二存储区域中读取出目标数据。在一些实施例中,电子设备10可以在低功耗模式下,接收到目标服务请求消息时,由于需要对目标服务请求消息进行相应,此时电子设备10可以从第二存储区域中先读取出目标数据。After storing the target data in the second storage area, the electronic device 10 can read the target data from the second storage area when it needs to obtain the target data. In some embodiments, the electronic device 10 can be in low power mode, and when receiving a target service request message, the electronic device 10 can first read the target data from the second storage area because it needs to respond to the target service request message.
前述实现方式中陈述了第一存储区域并不是电子设备10在低功耗模式下能够读取的区域,需在将目标数据发送至目标设备之前,将存储于第一存储区域中的目标数据存储至第二存储区域中。补充说明地是,其他实现方式中,第一存储区域也可以为电子设备10在低功耗模式下能够读取的区域,在目标数据发送至目标设备之前,电子设备10将存储于第一存储区域的目标数据存储至第二存储区域中,以便于后续电子设备10处于低功耗模式时,能够从第二存储区域中获取目标数据。The aforementioned implementation states that the first storage area is not an area that the electronic device 10 can read in low power mode, and the target data stored in the first storage area must be stored in the second storage area before the target data is sent to the target device. It should be supplemented that in other implementations, the first storage area can also be an area that the electronic device 10 can read in low power mode, and before the target data is sent to the target device, the electronic device 10 stores the target data stored in the first storage area in the second storage area, so that the target data can be obtained from the second storage area when the electronic device 10 is in low power mode.
作为一种可能的实现方式,如图6所示,上述步骤S201响应于目标服务请求消息,将目标数据发送至目标设备,包括:As a possible implementation, as shown in FIG6 , the above step S201 sends the target data to the target device in response to the target service request message, including:
步骤S2011、获取服务请求消息。Step S2011: Obtain a service request message.
步骤S2012、确定服务请求消息是否为目标服务请求消息。Step S2012: Determine whether the service request message is a target service request message.
步骤S2013、若服务请求消息为目标服务请求消息,则响应于目标服务请求信息,将目标数据发送至目标设备20。Step S2013: If the service request message is a target service request message, the target data is sent to the target device 20 in response to the target service request message.
即为,由于其他设备通常可以通过广播的方式发送服务请求消息,因此电子设备10接收的服务请求消息可能并不是为了用于与电子设备10建立通信连接的请求消息,而是为了用于实现其他功能。基于此,电子设备10在接收到服务请求消息时,需要先确定该服务请求消息是否为用于与电子设备10建立通信连接的目标服务请求消息。在确定出接收的服务请求消息是目标服务请求消息时,电子设备10确定需要对该目标服务请求消息进行响应,此时电子设备10可以将目标数据作为响应消息发送至目标设备20。That is, since other devices can usually send service request messages by broadcasting, the service request message received by the electronic device 10 may not be a request message for establishing a communication connection with the electronic device 10, but for realizing other functions. Based on this, when the electronic device 10 receives a service request message, it is necessary to first determine whether the service request message is a target service request message for establishing a communication connection with the electronic device 10. When it is determined that the received service request message is a target service request message, the electronic device 10 determines that it needs to respond to the target service request message, and at this time the electronic device 10 can send the target data as a response message to the target device 20.
在一些实施例中,服务请求消息中通常会包含有服务信息,该服务信息用于指示出该服务请求所请求的服务。在服务信息指示服务请求消息是用于与电子设备10建立通信连接时,电子设备10可以确定接收的服务请求消息即为目标服务请求消息。In some embodiments, the service request message generally includes service information, which is used to indicate the service requested by the service request. When the service information indicates that the service request message is used to establish a communication connection with the electronic device 10, the electronic device 10 can determine that the received service request message is the target service request message.
在一种可能的实现方式中,服务信息包括:服务的名称信息、服务的设备标识信息中的至少一个。In a possible implementation manner, the service information includes: at least one of: service name information and service device identification information.
即为,在服务信息包括服务的名称信息时,说明服务请求消息中包含有目标设备所请求的服务名称,此时第一芯片101可以根据服务请求消息中服务的名称信息确定目标设备20所请求的服务是否为电子设备10能够提供的服务。在服务请求消息中服务的名称信息与电子设备10能够提供的服务相匹配时,则可以确定该服务请求消息为目标服务请求消息。此时,电子设备10需要对目标服务请求消息进行响应,电子设备10可以将目标数据作为响应消息发送至目标设备20。或者,若服务请求消息中服务的名称信息与电子设备10能够提供的服务不匹配时,则说明该服务请求消息不是目标服务请求消息,电子设备10无需对其进行响应。That is, when the service information includes the name information of the service, it means that the service request message contains the name of the service requested by the target device. At this time, the first chip 101 can determine whether the service requested by the target device 20 is a service that the electronic device 10 can provide based on the name information of the service in the service request message. When the name information of the service in the service request message matches the service that the electronic device 10 can provide, it can be determined that the service request message is a target service request message. At this time, the electronic device 10 needs to respond to the target service request message, and the electronic device 10 can send the target data as a response message to the target device 20. Alternatively, if the name information of the service in the service request message does not match the service that the electronic device 10 can provide, it means that the service request message is not a target service request message, and the electronic device 10 does not need to respond to it.
或者,在服务信息中包含服务的设备标识信息时,电子设备10可以根据服务请求消息中服务的设备标识信息来确定该服务请求消息是否为目标服务请求消息。在一些实施例中,电子设备10可以通过检测服务请求消息中服务的设备标识信息是否为电子设备10的标识信息,来确定该服务消息是否为目标服务请求消息。若服务请求消息中服务的设备标识信息为电子设备10的标识信息,则电子设备10确定接收的服务请求消息为目标服务请求消息,电子设备10需要对该服务请求消息进行响应,此时电子设备10可以将目标数据作为响应消息发送至目标设备20。否则,电子设备10确定接收的服务请求消息不是目标服务请求消息,电子设备10无需对其进行响应。Alternatively, when the service information includes the device identification information of the service, the electronic device 10 can determine whether the service request message is a target service request message based on the device identification information of the service in the service request message. In some embodiments, the electronic device 10 can determine whether the service message is a target service request message by detecting whether the device identification information of the service in the service request message is the identification information of the electronic device 10. If the device identification information of the service in the service request message is the identification information of the electronic device 10, the electronic device 10 determines that the received service request message is a target service request message, and the electronic device 10 needs to respond to the service request message. At this time, the electronic device 10 can send the target data as a response message to the target device 20. Otherwise, the electronic device 10 determines that the received service request message is not a target service request message, and the electronic device 10 does not need to respond to it.
作为一种可能的实现方式,服务的设备标识信息可以包括设备的名称信息、设备的服务名称信息中的至少一个。即为,服务的设备标识信息可以是设备的名称信息,也可以是设备在目标服务中注册的服务名称信息,当然,还可以是设备的其他能够唯一标识该设备的信息,本申请对此不作限制。As a possible implementation, the device identification information of the service may include at least one of the name information of the device and the service name information of the device. That is, the device identification information of the service may be the name information of the device, or the service name information registered by the device in the target service, or other information of the device that can uniquely identify the device, which is not limited in this application.
在服务的设备标识信息包括设备的名称信息时,电子设备10可以在接收到服务请求消息时,检测服务请求消息中包含的设备的名称信息是否为电子设备10的名称信息。若服务请求消息中包含的设备的名称信息是电子设备10的名称信息是,则确定接收的服务请求消息为目标服务请求消息。此时电子设备10需对该目标服务请求消息进行响应,电子设备10可以将目标数据发送给目标设备20。When the device identification information of the service includes the name information of the device, the electronic device 10 can detect whether the name information of the device contained in the service request message is the name information of the electronic device 10 when receiving the service request message. If the name information of the device contained in the service request message is the name information of the electronic device 10, it is determined that the received service request message is a target service request message. At this time, the electronic device 10 needs to respond to the target service request message, and the electronic device 10 can send the target data to the target device 20.
或者,若服务请求消息中包含的设备的名称信息不是电子设备10的名称信息,则电子设备10可以确定接收的服务请求消息并不是目标服务请求消息,此时电子设备10不对服务请求消息进行响应。Alternatively, if the device name information included in the service request message is not the name information of the electronic device 10, the electronic device 10 may determine that the received service request message is not the target service request message, and the electronic device 10 does not respond to the service request message.
在服务的设备标识信息包括设备的服务名称信息时,电子设备10可以在接收到服务请求消息时,检测服务请求消息内包含的设备的服务名称信息是否为电子设备10在目标服务中注册的服务名称信息。若服务请求消息内包含的设备的服务名称信息是电子设备10的服务名称信息,则确定接收的服务请求消息为目标服务请求消息。此时电子设备10需对该目标服务请求消息进行响应,电子设备10可以将目标数据发送给目标设备20。When the device identification information of the service includes the service name information of the device, the electronic device 10 can detect whether the service name information of the device contained in the service request message is the service name information registered by the electronic device 10 in the target service when receiving the service request message. If the service name information of the device contained in the service request message is the service name information of the electronic device 10, it is determined that the received service request message is the target service request message. At this time, the electronic device 10 needs to respond to the target service request message, and the electronic device 10 can send the target data to the target device 20.
或者,若服务请求消息内包含的设备的服务名称信息不是电子设备10的服务名称信息,则确定接收的服务请求消息并不是目标服务请求消息,此时电子设备10不对服务请求消息进行响应。作为一种可能的实现方式,在电子设备10为图像形成设备时,则服务的名称信息包括打印机服务、扫描服务、传真服务中的至少一个。此时,电子设备10可以在接收到服务请求消息时,检测其内包含的服务的名称信息,若服务的名称信息包括打印机服务、扫描服务、传真服务中的至少一个,则说明接收的服务请求消息是用于与图像形成设备建立通信连接的目标服务请求消息,此时电子设备10可以将目标数据发送给目标设备20。Alternatively, if the service name information of the device contained in the service request message is not the service name information of the electronic device 10, it is determined that the received service request message is not the target service request message, and the electronic device 10 does not respond to the service request message. As a possible implementation, when the electronic device 10 is an image forming device, the service name information includes at least one of a printer service, a scanning service, and a fax service. At this time, when the electronic device 10 receives the service request message, it can detect the service name information contained in the service request message. If the service name information includes at least one of a printer service, a scanning service, and a fax service, it means that the received service request message is a target service request message for establishing a communication connection with the image forming device, and the electronic device 10 can send the target data to the target device 20.
当然,电子设备也可以基于前述服务的设备标识、服务的名称信息综合确定前述服务请求消息是否为目标服务请求信息,本申请实施例对此不进行限定。Of course, the electronic device may also comprehensively determine whether the aforementioned service request message is the target service request information based on the device identification of the aforementioned service and the name information of the service, and the embodiment of the present application does not limit this.
作为一种可能的实现方式,电子设备10用于通过目标服务与目标设备20建立通信连接,此时,上述将目标数据发送至目标设备20,包括:As a possible implementation, the electronic device 10 is used to establish a communication connection with the target device 20 through the target service. At this time, the above-mentioned sending of the target data to the target device 20 includes:
按照目标服务的数据格式进行封装,得到目标格式的目标数据;将目标格式的目标数据进行网络封装,并将网络封装后的目标数据发送至目标设备20。The target data in the target format are encapsulated according to the data format of the target service to obtain the target data in the target format; the target data in the target format are network encapsulated, and the network-encapsulated target data are sent to the target device 20 .
即为,目标服务具有自身的数据格式。电子设备10在向其他设备发送目标数据时,需要将目标数据按照目标服务的数据格式进行封装,这样,其他设备在接收到该目标数据时,才能按照目标服务的数据格式对目标数据进行解析,得出其所需的电子设备10的相关数据。基于此,电子设备10在将目标数据发送给目标设备20时,需要先将其封装为目标服务的数据格式的数据。此时,电子设备10在获取了目标数据后,可以先将目标数据按照目标服务的数据格式进行封装,得到目标格式的目标数据。在一些实施例中,若目标数据仅是目标服务的数据中的部分,此时在按照目标服务的数据格式对目标数据进行封装时,电子设备10还需要按照目标服务的数据格式将目标数据中没有的内容补充完全。例如,目标服务的数据格式中包含有IP地址信息、名称信息、电子设备10的功能属性信息及电子设备10的服务名称信息。此时,若目标数据中仅包含有电子设备10的功能属性信息及电子设备10的服务名称信息,在目标数据按照目标服务的数据格式进行封装时,电子设备10需要先获取电子设备10的IP地址信息及名称信息。在按照目标服务的数据格式将IP地址信息、名称信息、电子设备10的功能属性信息及电子设备10的服务名称信息等进行封装。在完成目标数据的封装后,即可得到目标格式的目标数据。为了降低目标数据所使用的存储空间,电子设备10在低功耗模式时,可以在接收到目标服务请求消息后,需要向目标设备20发送目标数据时,在进行上述将目标数据按照目标服务的数据格式的封装过程。That is, the target service has its own data format. When the electronic device 10 sends the target data to other devices, it is necessary to encapsulate the target data according to the data format of the target service, so that when other devices receive the target data, they can parse the target data according to the data format of the target service and obtain the relevant data of the electronic device 10 they need. Based on this, when the electronic device 10 sends the target data to the target device 20, it is necessary to first encapsulate it into data in the data format of the target service. At this time, after the electronic device 10 obtains the target data, it can first encapsulate the target data according to the data format of the target service to obtain the target data in the target format. In some embodiments, if the target data is only part of the data of the target service, when the target data is encapsulated according to the data format of the target service, the electronic device 10 also needs to supplement the content that is not in the target data according to the data format of the target service. For example, the data format of the target service contains IP address information, name information, functional attribute information of the electronic device 10 and service name information of the electronic device 10. At this time, if the target data only includes the functional attribute information of the electronic device 10 and the service name information of the electronic device 10, when the target data is encapsulated according to the data format of the target service, the electronic device 10 needs to first obtain the IP address information and name information of the electronic device 10. The IP address information, name information, functional attribute information of the electronic device 10, and service name information of the electronic device 10 are encapsulated according to the data format of the target service. After the encapsulation of the target data is completed, the target data in the target format can be obtained. In order to reduce the storage space used by the target data, when the electronic device 10 is in low power consumption mode, after receiving the target service request message, when it needs to send the target data to the target device 20, it can perform the above-mentioned encapsulation process of the target data according to the data format of the target service.
在得到目标格式的目标数据后,在电子设备10需要向目标设备20发送目标数据时,电子设备10可以通过网络传输将目标数据传输至目标设备20。因此,为了能够将目标数据传输至目标设备20,电子设备10需要先对目标格式的目标数据进行相应的网络封装,再将网络封装后的目标数据通过网络传输至目标设备20。此时电子设备10在对目标格式的目标数据进行网络封装时,可以根据其采用的传输协议确定数据封装格式,进而对目标数据相应格式的封装。After obtaining the target data in the target format, when the electronic device 10 needs to send the target data to the target device 20, the electronic device 10 can transmit the target data to the target device 20 through network transmission. Therefore, in order to be able to transmit the target data to the target device 20, the electronic device 10 needs to first perform corresponding network encapsulation on the target data in the target format, and then transmit the network-encapsulated target data to the target device 20 through the network. At this time, when the electronic device 10 performs network encapsulation on the target data in the target format, it can determine the data encapsulation format according to the transmission protocol it adopts, and then encapsulate the target data in the corresponding format.
在一些实施例中,电子设备10可以通过TCP(Transmiss ion Control Protocol,传输控制协议)进行目标数据的网络传输。此时,电子设备10可以将目标格式的目标数据根据TCP的数据格式进行封装,形成TCP数据包,并将TCP数据包通过网络向目标设备20传输。In some embodiments, the electronic device 10 can perform network transmission of the target data through TCP (Transmission Control Protocol). At this time, the electronic device 10 can encapsulate the target data in the target format according to the data format of TCP to form a TCP data packet, and transmit the TCP data packet to the target device 20 through the network.
在一些实施例中,电子设备10也可以通过UDP(User Datagram Protocol,用户数据报协议)进行目标数据的网络传输。此时,电子设备10可以将目标格式的目标数据根据UDP的数据格式进行封装,形成UDP数据包,并将UDP数据包通过网络向目标设备20传输。In some embodiments, the electronic device 10 may also perform network transmission of the target data via UDP (User Datagram Protocol). At this time, the electronic device 10 may encapsulate the target data in the target format according to the data format of UDP to form a UDP data packet, and transmit the UDP data packet to the target device 20 via the network.
当然,电子设备10还可以通过其他传输协议进行目标数据的网络传输,此时,电子设备10可以根据传输协议进行对目标数据进行相应的网络封装,本申请实施例对此不作限制。Of course, the electronic device 10 can also perform network transmission of the target data through other transmission protocols. At this time, the electronic device 10 can perform corresponding network encapsulation of the target data according to the transmission protocol, and the embodiment of the present application does not limit this.
作为一种可能的实现方式,电子设备10在需要将网络封装后的目标数据向目标设备20发送时,可以通过DMA(Di rect Memory Access,直接内存访问)将目标数据传输至电子设备10的输出接口,并通过输出接口将封装后的目标数据发送出去。As a possible implementation method, when the electronic device 10 needs to send the target data after network encapsulation to the target device 20, the target data can be transferred to the output interface of the electronic device 10 through DMA (Direct Memory Access), and the encapsulated target data can be sent out through the output interface.
参见图7,为本申请实施例提供的另一种电子设备的结构示意图。电子设备10的不同功能可以由其内不同的芯片实现。如图7所示,电子设备10中包括第一控制单元101及第二控制单元102。其中,第一控制单元101与第二控制单元102可以为电子设备10中不同的两个芯片。在一些可行的实施例中,上述第一控制单元101以及第二控制单元102可以为MCU(micro processor unit,微控制单元),为不同的应用场合提供不同组合控制。可选的,上述第一控制单元101与第二控制单元102可以集成在同一块SOC(System on Chip,片上系统)上,为电子设备10提供硬件支持。可选的,在一些可行的实施例中,上述第一控制单元101与第二控制单元102也可以集成在同一个MCU中,为不同的应用场合提供不同的组合控制。当然其他实施例中,第一控制单元、第二控制单元也可以包含前述MCU及对应的外围单路,本申请实施例对此不进行限定。其中,第一控制单元101的功耗较小,在电子设备处于低功耗模式下也能够正常工作,无需切换至休眠状态。而第二控制单元102的功耗较大,可以通过目标服务与目标设备20建立通信连接。即为,在电子设备10接收到目标设备20发送的目标服务请求消息时,第二控制单元102可以在确定该目标服务请求消息是请求与电子设备10建立通信连接时,可以确定出响应数据,并基于响应数据向目标设备20发送响应消息,以便目标设备20在接收到响应消息时,可以基于该响应消息与电子设备10间连接通信连接。Referring to FIG. 7, a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. Different functions of the electronic device 10 can be implemented by different chips therein. As shown in FIG. 7, the electronic device 10 includes a first control unit 101 and a second control unit 102. Among them, the first control unit 101 and the second control unit 102 can be two different chips in the electronic device 10. In some feasible embodiments, the first control unit 101 and the second control unit 102 can be MCUs (microprocessor units) to provide different combination controls for different application scenarios. Optionally, the first control unit 101 and the second control unit 102 can be integrated on the same SOC (System on Chip) to provide hardware support for the electronic device 10. Optionally, in some feasible embodiments, the first control unit 101 and the second control unit 102 can also be integrated in the same MCU to provide different combination controls for different application scenarios. Of course, in other embodiments, the first control unit and the second control unit can also include the aforementioned MCU and the corresponding peripheral single channel, which is not limited in the embodiment of the present application. Among them, the power consumption of the first control unit 101 is relatively small, and the electronic device can also work normally when it is in a low power consumption mode without switching to a sleep state. The second control unit 102 has a relatively large power consumption and can establish a communication connection with the target device 20 through the target service. That is, when the electronic device 10 receives the target service request message sent by the target device 20, the second control unit 102 can determine the response data when determining that the target service request message is a request to establish a communication connection with the electronic device 10, and send a response message to the target device 20 based on the response data, so that the target device 20 can establish a communication connection with the electronic device 10 based on the response message when receiving the response message.
在一些实施例中,目标服务可以是Bonjour服务。这里的Bonjour服务是基于组播域名服务的开放性零设置网络标准所起的名字,能自动发现IP网络上的电脑、设备和服务。Bonjour使用工业标准的IP协议来允许设备自动发现彼此,而不需输入IP地址或配置DNS服务器。因此,目标设备20可以通过Bonjour服务与电子设备10建立通信连接。目标设备20向电子设备10发送Bonjour服务请求消息,该请求消息中可以携带有其请求的服务信息,该服务信息用于指示出目标设备20所请求的服务的相关信息。电子设备10中的第二控制单元102接收到Bonjour服务请求消息时,在确定该Bonjour服务请求消息为请求与电子设备10建立通信连接的请求时,第二控制单元102可以先确定出Bonjour服务的响应数据,并将该响应数据作为响应消息发送给目标设备20。此时,目标设备20可以基于接收的响应消息,与电子设备10间建立通信连接。当然,本申请实施例中,Bonjour服务也可以替换为其他与Bonjour服务功能相同的服务,本申请实施例对此不进行限定。In some embodiments, the target service may be a Bonjour service. The Bonjour service here is a name given by an open zero-setting network standard based on a multicast domain name service, which can automatically discover computers, devices and services on an IP network. Bonjour uses an industrial standard IP protocol to allow devices to automatically discover each other without entering an IP address or configuring a DNS server. Therefore, the target device 20 can establish a communication connection with the electronic device 10 through the Bonjour service. The target device 20 sends a Bonjour service request message to the electronic device 10, and the request message may carry the service information requested by the target device 20, and the service information is used to indicate the relevant information of the service requested by the target device 20. When the second control unit 102 in the electronic device 10 receives the Bonjour service request message, when determining that the Bonjour service request message is a request to establish a communication connection with the electronic device 10, the second control unit 102 may first determine the response data of the Bonjour service, and send the response data as a response message to the target device 20. At this time, the target device 20 can establish a communication connection with the electronic device 10 based on the received response message. Of course, in the embodiment of the present application, the Bonjour service can also be replaced by other services with the same functions as the Bonjour service, and the embodiment of the present application is not limited to this.
为了满足能耗要求,电子设备10在非低功耗状态下需要切换至低功耗模式。而第二控制单元102的功耗较大,在电子设备10处于低功耗模式下时,第二控制单元102需要切换至休眠状态,无法工作。此时,若电子设备10接收到Bonjour服务请求消息,在第二控制单元102不唤醒的情况下,电子设备无法对该Bonjour服务请求消息进行响应。而在第二控制单元102唤醒时,则电子设备无法满足低功耗要求。In order to meet the energy consumption requirements, the electronic device 10 needs to switch to a low power consumption mode in a non-low power consumption state. However, the power consumption of the second control unit 102 is relatively large. When the electronic device 10 is in a low power consumption mode, the second control unit 102 needs to switch to a dormant state and cannot work. At this time, if the electronic device 10 receives a Bonjour service request message, the electronic device cannot respond to the Bonjour service request message if the second control unit 102 is not awakened. When the second control unit 102 is awakened, the electronic device cannot meet the low power consumption requirements.
在本申请实施例中,第二控制单元102可以预先获取目标数据并将目标数据存储至第一存储区域。其中,上述第一存储区域是第二控制单元102在低功耗模式时不可读取的存储区域,也是第一控制单元在101在低功耗模式时可以读取的存储区域。第一控制单元101在电子设备10将目标数据发送至目标设备之前,可以从第一存储区域获取目标数据。在电子设备10处于低功耗模式时,第二控制单元102切换至休眠状态。在电子设备10接收到目标服务请求消息时,由第一控制单元101将目标数据作为目标服务请求消息的响应信息发送至目标设备20,以便目标设备20能够根据目标数据与电子设备20建立通信连接。即当电子设备处于低功耗模式时,第一控制单元101可以通过直接访问第一存储单元来获取目标数据,其他实施例中,第一控制单元101也可以间接通过第一存储单元来获取目标数据,参照前述描述可知,示例地,电子设备将存储于第一存储区域中的目标数据存储至第二存储区域,第一控制单元101通过访问前述第二存储区域来获取目标数据。当然,本申请其他实施例中,第一存储区域也可以为第二控制单元102在低功耗模式时不可读取的区域,本申请实施例对此不进行限定。In an embodiment of the present application, the second control unit 102 may pre-acquire the target data and store the target data in the first storage area. The first storage area is a storage area that the second control unit 102 cannot read when in low power consumption mode, and is also a storage area that the first control unit 101 can read when in low power consumption mode. The first control unit 101 may acquire the target data from the first storage area before the electronic device 10 sends the target data to the target device. When the electronic device 10 is in low power consumption mode, the second control unit 102 switches to a dormant state. When the electronic device 10 receives a target service request message, the first control unit 101 sends the target data as a response information of the target service request message to the target device 20, so that the target device 20 can establish a communication connection with the electronic device 20 according to the target data. That is, when the electronic device is in low power consumption mode, the first control unit 101 can acquire the target data by directly accessing the first storage unit. In other embodiments, the first control unit 101 can also acquire the target data indirectly through the first storage unit. Referring to the above description, it can be seen that, for example, the electronic device stores the target data stored in the first storage area in the second storage area, and the first control unit 101 acquires the target data by accessing the above second storage area. Of course, in other embodiments of the present application, the first storage area may also be an area that is not readable by the second control unit 102 in the low power consumption mode, and the embodiments of the present application are not limited to this.
这样一来,在本申请实施例中,在电子设备10在处于低功耗模式时,也可以对目标服务请求消息进行响应,以便目标设备20可以通过目标服务与电子设备10建立通信连接,从而实现在满足电子设备10低功耗需求的同时也可以通过目标服务与目标设备20建立通信连接的目的。以下进行详细说明。Thus, in the embodiment of the present application, when the electronic device 10 is in the low power consumption mode, it can also respond to the target service request message, so that the target device 20 can establish a communication connection with the electronic device 10 through the target service, thereby achieving the purpose of meeting the low power consumption requirement of the electronic device 10 and establishing a communication connection with the target device 20 through the target service. The following is a detailed description.
参见图7,为本申请实施例提供的一种电子设备的结构示意图。该电子设备10包括:Referring to FIG. 7 , it is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 10 includes:
第二控制单元102,用于获取目标数据,并将目标数据存储至第一存储区域。The second control unit 102 is used to obtain target data and store the target data in the first storage area.
其中,目标数据是电子设备10与其他设备通过目标服务建立通信连接时所需的数据。The target data is the data required when the electronic device 10 establishes a communication connection with other devices through the target service.
第一控制单元101,用于在电子设备10将目标数据发送至目标设备之前,从第一存储区域获取目标数据。The first control unit 101 is configured to obtain target data from a first storage area before the electronic device 10 sends the target data to a target device.
第二控制单元102,还用于在电子设备处于低功耗模式时,切换至休眠状态。The second control unit 102 is further configured to switch the electronic device to a sleep state when the electronic device is in a low power consumption mode.
第一控制单元101,还用于在电子设备10处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备20,以便目标设备20能够根据目标数据与电子设备10建立通信连接。其中,目标设备20是发送目标服务请求消息的设备,在一些可选的实施方式中上述目标设备20可以是PC终端也可以是手机终端,特别的,可以是装载有IOS系统的PC终端以及装载有IOS系统的手机终端。The first control unit 101 is further configured to send target data to the target device 20 in response to the target service request message when the electronic device 10 is in the low power consumption mode, so that the target device 20 can establish a communication connection with the electronic device 10 according to the target data. The target device 20 is a device that sends the target service request message. In some optional implementations, the target device 20 may be a PC terminal or a mobile phone terminal, in particular, a PC terminal loaded with an IOS system and a mobile phone terminal loaded with an IOS system.
在本申请实施例中,由于在电子设备处于低功耗模式下,第二控制单元102需要切换至休眠状态无法正常工作。为了保证在电子设备10处于低功耗模式下,也能对目标服务请求消息进行响应。第二控制单元102或者第一控制单元101可以将目标数据发送至目标设备之前预先获取目标数据,并将目标服务的目标数据,存储至第一存储区域中。该第一存储区域是既能够被第二控制单元102进行读写操作,又能够被第一控制单元101进行读写操作的存储区域。由于第一控制单元101是在电子设备10处于低功耗模式下,无需切换至休眠模式,可以正常工作的芯片。因此,在电子设备10处于低功耗模式下,目标服务请求消息需要由第一控制单元101进行响应。这样一来,第一控制单元101需要先获取目标数据。由于第一存储区域在电子设备10处于低功耗模式时,第二控制单元102无法进行对其进行读取操作,因此为了保证第一控制单元101可以获取到目标数据,在电子设备10进入低功耗模式之前第二控制单元102或者第一控制单元101需要将目标数据存储至第一存储区域,以便于第一控制单元101可以从第一存储区域中获取目标数据。这样,在电子设备切换至低功耗模式时,第二控制单元102由工作状态切换至休眠状态。此时,若目标设备20向电子设备10发送目标服务请求消息,电子设备10接收到目标服务请求消息后,由第一控制单元101对目标服务请求消息进行响应。此时,第一控制单元101可以获取目标数据,将目标数据作为该目标服务请求消息的响应数据,向目标设备20发送目标数据,以便目标设备20能够根据目标数据与电子设备10建立通信连接。In an embodiment of the present application, since the electronic device is in a low power consumption mode, the second control unit 102 needs to switch to a sleep state and cannot work normally. In order to ensure that the target service request message can be responded to when the electronic device 10 is in a low power consumption mode. The second control unit 102 or the first control unit 101 can obtain the target data in advance before sending the target data to the target device, and store the target data of the target service in the first storage area. The first storage area is a storage area that can be read and written by the second control unit 102 and the first control unit 101. Since the first control unit 101 is a chip that can work normally without switching to a sleep mode when the electronic device 10 is in a low power consumption mode. Therefore, when the electronic device 10 is in a low power consumption mode, the target service request message needs to be responded to by the first control unit 101. In this way, the first control unit 101 needs to obtain the target data first. Since the second control unit 102 cannot read the first storage area when the electronic device 10 is in low power mode, in order to ensure that the first control unit 101 can obtain the target data, the second control unit 102 or the first control unit 101 needs to store the target data in the first storage area before the electronic device 10 enters the low power mode, so that the first control unit 101 can obtain the target data from the first storage area. In this way, when the electronic device switches to the low power mode, the second control unit 102 switches from the working state to the dormant state. At this time, if the target device 20 sends a target service request message to the electronic device 10, after the electronic device 10 receives the target service request message, the first control unit 101 responds to the target service request message. At this time, the first control unit 101 can obtain the target data, use the target data as the response data of the target service request message, and send the target data to the target device 20, so that the target device 20 can establish a communication connection with the electronic device 10 according to the target data.
即为,在电子设备10切换至低功耗模式时,第二控制单元102需要切换至休眠状态。即为,在电子设备10的低功耗模式下,为了降低功耗,功耗较大的第二控制单元102需切换至休眠状态,不再进行数据处理工作。而第一控制单元101由于功耗较小,可以在电子设备10处于低功耗模式下时,无需切换至休眠状态,可以进行正常的数据处理工作。此时,若目标设备20需要通过目标服务与电子设备10建立通信连接,则向电子设备10发送目标服务请求消息。由于电子设备10处于低功耗模式,第二控制单元102切换至休眠状态,因此需要由第一控制单元101对目标服务请求消息进行相应的响应。由于第一控制单元101在电子设备10将目标数据发送至目标设备之前,在第一存储区域中获取了目标数据,因此第一控制单元101在接收到目标服务请求消息后,可以将其获取的目标数据作为该目标服务请求消息的响应消息发送至目标设备20。目标设备20可以在接收到目标数据时,根据其接收的目标数据与电子设备10进行通信连接的连接。That is, when the electronic device 10 switches to the low power mode, the second control unit 102 needs to switch to the dormant state. That is, in the low power mode of the electronic device 10, in order to reduce power consumption, the second control unit 102 with large power consumption needs to switch to the dormant state and no longer perform data processing. However, due to the low power consumption, the first control unit 101 can perform normal data processing without switching to the dormant state when the electronic device 10 is in the low power mode. At this time, if the target device 20 needs to establish a communication connection with the electronic device 10 through the target service, a target service request message is sent to the electronic device 10. Since the electronic device 10 is in the low power mode, the second control unit 102 switches to the dormant state, so the first control unit 101 needs to respond to the target service request message accordingly. Since the first control unit 101 obtains the target data in the first storage area before the electronic device 10 sends the target data to the target device, the first control unit 101 can send the acquired target data as a response message of the target service request message to the target device 20 after receiving the target service request message. When receiving the target data, the target device 20 may establish a communication connection with the electronic device 10 according to the received target data.
也就是说,在本申请实施例中,在电子设备10处于低功耗模式时,若接收到目标服务请求消息,无需将第二控制单元102由休眠状态唤醒为工作状态,而是由处于工作状态的第一控制单元101进行响应。由于第一控制单元101已经从第一存储区域中获取目标数据,并响应于目标服务请求消息,第一控制单元101可以将目标数据作为响应数据发送至目标设备20,以使得目标设备20可以根据接收的目标数据与电子设备10之间建立通信连接。That is, in the embodiment of the present application, when the electronic device 10 is in the low power consumption mode, if a target service request message is received, it is not necessary to wake up the second control unit 102 from the sleep state to the working state, but the first control unit 101 in the working state responds. Since the first control unit 101 has obtained the target data from the first storage area and responded to the target service request message, the first control unit 101 can send the target data as response data to the target device 20, so that the target device 20 can establish a communication connection with the electronic device 10 according to the received target data.
由于第二控制单元102在电子设备处于低功耗模式时,需要切换至休眠状态。因此,第二控制单元102无法将目标服务的数据作为响应数据向其他电子设备发送。因此,第二控制单元102或者第一控制单元101在电子设备10运行在低功耗模式之前,将目标服务的数据存储至第一存储区域中。此时,第二控制单元102或者第一控制单元101可以将目标服务的数据作为目标数据存储至第一存储区域。也可以,为了降低占用的存储空间,在目标服务的数据中提取出部分数据作为目标数据,在一些实施例中,可以将目标服务的数据中与目标服务相关的数据作为目标数据。例如,目标服务的数据中包含有电子设备10的IP地址信息、名称信息、电子设备10的功能属性信息及电子设备10在目标服务中的服务名称等。此时,由于电子设备10的IP地址信息及名称信息在电子设备实现其他功能时,也会被使用到,而电子设备10的功能属性信息及电子设备10在目标服务中的服务名称仅与该目标服务有关。此时,可以将电子设备10的功能属性信息及电子设备10在目标服务中的服务名称作为目标数据,存储至第一存储区域。Since the second control unit 102 needs to switch to a dormant state when the electronic device is in a low power consumption mode. Therefore, the second control unit 102 cannot send the data of the target service as response data to other electronic devices. Therefore, the second control unit 102 or the first control unit 101 stores the data of the target service in the first storage area before the electronic device 10 runs in a low power consumption mode. At this time, the second control unit 102 or the first control unit 101 can store the data of the target service as target data in the first storage area. It is also possible to extract part of the data of the target service as target data in order to reduce the occupied storage space. In some embodiments, the data related to the target service in the data of the target service can be used as target data. For example, the data of the target service includes the IP address information, name information, functional attribute information of the electronic device 10, and the service name of the electronic device 10 in the target service. At this time, since the IP address information and name information of the electronic device 10 are also used when the electronic device implements other functions, the functional attribute information of the electronic device 10 and the service name of the electronic device 10 in the target service are only related to the target service. At this time, the functional attribute information of the electronic device 10 and the service name of the electronic device 10 in the target service may be stored in the first storage area as target data.
在一些实施例中,可以在电子设备10运行在低功耗模式之前时,第二控制单元102或者第一控制单元101可以周期性的获取目标数据,并将其存储至第一存储区域,以便在目标数据发生变化时可以及时的更新第一存储区域中存储的目标数据。In some embodiments, before the electronic device 10 operates in low power consumption mode, the second control unit 102 or the first control unit 101 can periodically obtain target data and store it in the first storage area, so that the target data stored in the first storage area can be updated in time when the target data changes.
在一些实施例中,为了降低电子设备10的功耗,可以仅在电子设备10启动后,或者在电子设备10的网络标识信息发生变化时,获取目标数据,并将获取的目标数据存储至第一存储区域。由于目标数据是基于电子设备10的标识信息产生的,一般情况下,电子设备10中的网络标识信息可能由于某些功能的实现或者用户的设置而发生变化。例如,电子设备的IP地址等。因此,可以通过识别电子设备10中的网络标识信息是否发生变化,来确定目标数据是否变化。基于此,上述第二控制单元102或者第一控制单元101具体用于:若识别到电子设备10的网络标识信息发生变化或电子设备10重新开启完成后,从电子设备10的网络模块获取实时网络参数,并根据上述目标数据的目标格式以及实时网络参数生成目标数据,并将目标数据存储至第一存储区域。或者,电子设备10确定需要进入低功耗模式所需的系统初始化时或电子设备10在执行进入低功耗模式所需的系统初始化的过程中,从电子设备10的网络模块获取实时网络参数,并根据上述目标数据的目标格式以及实时网络参数生成目标数据,并将目标数据存储至第一存储区域。其中,这里的网络模块指的是电子设备10中独立于硬件模块以及固件模块之外的软件模块中的组成部分,为电子设备10提供网络服务In some embodiments, in order to reduce the power consumption of the electronic device 10, the target data can be obtained only after the electronic device 10 is started, or when the network identification information of the electronic device 10 changes, and the obtained target data is stored in the first storage area. Since the target data is generated based on the identification information of the electronic device 10, in general, the network identification information in the electronic device 10 may change due to the implementation of certain functions or user settings. For example, the IP address of the electronic device, etc. Therefore, it is possible to determine whether the target data has changed by identifying whether the network identification information in the electronic device 10 has changed. Based on this, the second control unit 102 or the first control unit 101 is specifically used to: if it is identified that the network identification information of the electronic device 10 has changed or the electronic device 10 has been restarted, the real-time network parameters are obtained from the network module of the electronic device 10, and the target data is generated according to the target format and real-time network parameters of the target data, and the target data is stored in the first storage area. Alternatively, when the electronic device 10 determines that the system initialization required to enter the low power consumption mode is required or the electronic device 10 is in the process of executing the system initialization required to enter the low power consumption mode, the real-time network parameters are obtained from the network module of the electronic device 10, and the target data is generated according to the target format and real-time network parameters of the target data, and the target data is stored in the first storage area. The network module here refers to a component of a software module in the electronic device 10 that is independent of the hardware module and the firmware module, and provides network services for the electronic device 10.
即为,第二控制单元102或者第一控制单元101可以实时或者周期性检测电子设备10的网络标识信息是否发生变化。在一些实施例中,第二控制单元102或者第一控制单元101周期性获取电子设备10的网络标识信息,将当前次获取的电子设备10的网络标识信息与上一次获取的电子设备10的网络标识信息进行比较,确定是否相同。若相同,则说明电子设备10的网络标识信息未发生变化,若不同,则说明电子设备10的网络标识信息发生变化。此时,第二控制单元102或者第一控制单元101重新获取目标数据,并将目标数据重新存储至第一存储区域,以更新第一存储区域中的目标数据。That is, the second control unit 102 or the first control unit 101 can detect in real time or periodically whether the network identification information of the electronic device 10 has changed. In some embodiments, the second control unit 102 or the first control unit 101 periodically obtains the network identification information of the electronic device 10, compares the network identification information of the electronic device 10 currently obtained with the network identification information of the electronic device 10 obtained last time, and determines whether they are the same. If they are the same, it means that the network identification information of the electronic device 10 has not changed; if they are different, it means that the network identification information of the electronic device 10 has changed. At this time, the second control unit 102 or the first control unit 101 re-acquires the target data, and re-stores the target data to the first storage area to update the target data in the first storage area.
在电子设备10重新开启时,则第一存储区域内存储的数据可能被释放了,此时第二控制单元102或者第一控制单元101在电子设备10启动完成后从电子设备10的网络模块获取实时网络参数,并根据上述目标数据的目标格式以及实时网络参数生成目标数据,并将目标数据存储至第一存储区域。When the electronic device 10 is restarted, the data stored in the first storage area may be released. At this time, the second control unit 102 or the first control unit 101 obtains real-time network parameters from the network module of the electronic device 10 after the electronic device 10 is started up, generates target data according to the target format of the above target data and the real-time network parameters, and stores the target data in the first storage area.
在一种可能的实现方式,第二控制单元102具体用于:在电子设备10将目标数据发送至目标设备之前,获取目标数据,并将目标数据存储至第一存储区域。In a possible implementation, the second control unit 102 is specifically configured to: before the electronic device 10 sends the target data to the target device, obtain the target data and store the target data in the first storage area.
即为,由于第二控制单元102或者第一控制单元101将目标数据存储至第一存储区域是为了电子设备10处于低功耗模式时,能够使第一控制单元101从第一存储区域中获取目标数据,以便对目标服务请求消息进行响应。由于在电子设备10处于非低功耗模式时,目标服务请求消息直接由第二控制单元102响应,即使将目标数据存储至第一存储区域,第一控制单元101也不会使用。因此,第二控制单元102可以在电子设备10将目标数据发送至目标设备之前,获取目标数据,并将目标数据存储至第一存储区域。这样,可以提高第一存储区域在电子设备10处于非低功耗模式下的利用率。That is, since the second control unit 102 or the first control unit 101 stores the target data in the first storage area, it is to enable the first control unit 101 to obtain the target data from the first storage area when the electronic device 10 is in a low power mode, so as to respond to the target service request message. Since when the electronic device 10 is in a non-low power mode, the target service request message is directly responded to by the second control unit 102, even if the target data is stored in the first storage area, the first control unit 101 will not use it. Therefore, the second control unit 102 can obtain the target data and store the target data in the first storage area before the electronic device 10 sends the target data to the target device. In this way, the utilization rate of the first storage area when the electronic device 10 is in a non-low power mode can be improved.
当然其他实现方式中,也可以为第一控制单元101具体用于在电子设备将目标数据发送至目标设备之前,获取目标数据,并将目标数据存储至第一存储区域。Of course, in other implementations, the first control unit 101 may be specifically configured to obtain the target data and store the target data in the first storage area before the electronic device sends the target data to the target device.
作为一种可能的实现方式,第二控制单元102具体用于:在电子设备10将目标数据发送至目标设备之前,从电子设备10的网络模块获取实时网络参数,并根据上述目标数据的目标格式以及实时网络参数生成目标数据,并将目标数据存储至第一存储区域。As a possible implementation method, the second control unit 102 is specifically used to: before the electronic device 10 sends the target data to the target device, obtain real-time network parameters from the network module of the electronic device 10, generate target data according to the target format of the above target data and the real-time network parameters, and store the target data in the first storage area.
作为一种可能的实现方式,第一控制单元101在从第一存储区域获取了目标数据后,由于第一控制单元101通常不会立即接收到目标服务请求消息,因此第一控制单元101可以先将目标数据存储至第二存储区域中。基于此,第一控制单元101还用于:将从第一存储区域获取的目标数据存储至第二存储区域。As a possible implementation, after the first control unit 101 obtains the target data from the first storage area, since the first control unit 101 usually does not immediately receive the target service request message, the first control unit 101 may first store the target data in the second storage area. Based on this, the first control unit 101 is further configured to: store the target data obtained from the first storage area in the second storage area.
第二存储区域是第一控制单元101在电子设备处于低功耗模式时可读取的存储区域。The second storage area is a storage area that can be read by the first control unit 101 when the electronic device is in the low power consumption mode.
作为一种可能的实现方式,也可以为第二控制单元102在从第一存储区域中获取了目标数据后,将第一存储区域获取的目标数据存储至第二存储区域,其中,第二存储区域是第一控制单元101在电子设备处于低功耗模式时可读取的区域。As a possible implementation method, after the second control unit 102 obtains the target data from the first storage area, it can store the target data obtained from the first storage area in the second storage area, wherein the second storage area is an area that can be read by the first control unit 101 when the electronic device is in low power consumption mode.
此时,上述在电子设备10处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备20包括:At this time, when the electronic device 10 is in the low power consumption mode, in response to the target service request message, sending the target data to the target device 20 includes:
在电子设备10处于低功耗模式时,响应于目标服务请求消息,从第二存储区域中获取目标数据;将目标数据发送至目标设备20。When the electronic device 10 is in the low power consumption mode, in response to the target service request message, the target data is acquired from the second storage area; and the target data is sent to the target device 20 .
即为,由于电子设备10在低功耗模式下并不是其内所有的存储区域均处于可读写状态。即为,在电子设备10处于低功耗模式下时,仅有部分存储区域是可读写的。而第一存储区域是既能被第一控制单元101进行读取操作,又能被第二控制单元102进行写操作的存储区域,在电子设备10处于低功耗模式时,存在第一存储区域是不可进行读写操作的存储区域的可能。因此,第一控制单元101可以在电子设备10将目标数据发送至目标设备之前,从第一存储区域中读取目标数据。而第一控制单元101在读取了目标数据后,可以先存储起来。此时,第一控制单元101可以将目标数据存储至在电子设备101处于低功耗模式时,第一控制单元101可以进行读写操作的存储区域,即为第二存储区域。也就是说,为了在电子设备10处于低功耗模式下能够获取目标数据,第一控制单元101可以将从第一存储区域获取的目标数据存储至第二存储区域中。That is, since not all storage areas in the electronic device 10 are in a readable and writable state in the low power consumption mode. That is, when the electronic device 10 is in the low power consumption mode, only part of the storage area is readable and writable. The first storage area is a storage area that can be read by the first control unit 101 and written by the second control unit 102. When the electronic device 10 is in the low power consumption mode, there is a possibility that the first storage area is a storage area that cannot be read and written. Therefore, the first control unit 101 can read the target data from the first storage area before the electronic device 10 sends the target data to the target device. After reading the target data, the first control unit 101 can store it first. At this time, the first control unit 101 can store the target data in the storage area where the first control unit 101 can perform read and write operations when the electronic device 101 is in the low power consumption mode, that is, the second storage area. That is, in order to obtain the target data when the electronic device 10 is in the low power consumption mode, the first control unit 101 can store the target data obtained from the first storage area in the second storage area.
此时,若电子设备10在接收到目标服务请求消息,第一控制单元101可以在第二存储区域中将其内存储的目标数据读取出,并将该目标数据作为响应消息发送至目标设备20。At this time, if the electronic device 10 receives the target service request message, the first control unit 101 can read the target data stored therein in the second storage area, and send the target data to the target device 20 as a response message.
在一种可能的实现方式,第一控制单元101具体用于:在电子设备10处于低功耗模式时,若接收到服务请求消息,确定服务请求消息是否为目标服务请求消息;若确定为目标服务请求消息,则从第二存储区域中获取所述目标数据,并将目标数据发送至目标设备20。In one possible implementation, the first control unit 101 is specifically used to: when the electronic device 10 is in a low power consumption mode, if a service request message is received, determine whether the service request message is a target service request message; if it is determined to be a target service request message, obtain the target data from the second storage area and send the target data to the target device 20.
即为,由于其他设备通常可以通过广播的方式发送服务请求消息,因此电子设备10接收的服务请求消息可能并不是为了用于与电子设备10建立通信连接的请求消息,而是为了用于实现其他功能。基于此,第一控制单元101在接收到服务请求消息时,需要先确定该服务请求消息是否为用于与电子设备10建立通信连接的目标服务请求消息。在确定出接收的服务请求消息是目标服务请求消息时,第一控制单元101确定需要对该目标服务请求消息进行响应,此时第一控制单元101可以从第二存储区域中获取目标数据,并进行目标数据作为响应消息发送至目标设备20。That is, since other devices can usually send service request messages by broadcasting, the service request message received by the electronic device 10 may not be a request message for establishing a communication connection with the electronic device 10, but for realizing other functions. Based on this, when the first control unit 101 receives a service request message, it is necessary to first determine whether the service request message is a target service request message for establishing a communication connection with the electronic device 10. When it is determined that the received service request message is a target service request message, the first control unit 101 determines that it needs to respond to the target service request message. At this time, the first control unit 101 can obtain the target data from the second storage area and send the target data as a response message to the target device 20.
在一些实施例中,服务请求消息中通常会包含有服务信息,该服务信息用于指示出该服务请求所请求的服务。在服务信息指示服务请求消息是用于与电子设备10建立通信连接时,第一控制单元101可以确定接收的服务请求消息即为目标服务请求消息。In some embodiments, the service request message generally includes service information, which is used to indicate the service requested by the service request. When the service information indicates that the service request message is used to establish a communication connection with the electronic device 10, the first control unit 101 can determine that the received service request message is the target service request message.
在一种可能的实现方式中,服务信息包括:服务的名称信息、服务的设备标识信息中的至少一个。In a possible implementation manner, the service information includes: at least one of: service name information and service device identification information.
即为,在服务信息包括服务的名称信息时,说明服务请求消息中包含有目标设备所请求的服务名称,此时第一控制单元101可以根据服务请求消息中服务的名称信息确定目标设备20所请求的服务是否为电子设备10能够提供的服务。在服务请求消息中服务的名称信息与电子设备10能够提供的服务相匹配时,则可以确定该服务请求消息为目标服务请求消息。此时,第一控制单元101需要对目标服务请求消息进行响应,第一控制单元101从第二存储区域中获取目标数据,并可将目标数据作为响应消息发送至目标设备20。或者,若服务请求消息中服务的名称信息与电子设备10能够提供的服务不匹配时,则说明该服务请求消息不是目标服务请求消息,第一控制单元101无需对其进行响应。其他可能的实现方式中,当第一存储单元为电子设备处于低功耗模式时,第一控制单元101可以访问的存储区域时,第一控制单元101也可以直接从第一存储区域中获取目标数据,本申请实施例对此不进行限定。That is, when the service information includes the name information of the service, it means that the service request message contains the name of the service requested by the target device. At this time, the first control unit 101 can determine whether the service requested by the target device 20 is a service that the electronic device 10 can provide according to the name information of the service in the service request message. When the name information of the service in the service request message matches the service that the electronic device 10 can provide, it can be determined that the service request message is a target service request message. At this time, the first control unit 101 needs to respond to the target service request message, the first control unit 101 obtains the target data from the second storage area, and can send the target data as a response message to the target device 20. Alternatively, if the name information of the service in the service request message does not match the service that the electronic device 10 can provide, it means that the service request message is not a target service request message, and the first control unit 101 does not need to respond to it. In other possible implementations, when the first storage unit is a storage area that the first control unit 101 can access when the electronic device is in low power consumption mode, the first control unit 101 can also directly obtain the target data from the first storage area, and the embodiment of the present application is not limited to this.
或者,在服务信息中包含服务的设备标识信息时,第一控制单元101可以根据服务请求消息中服务的设备标识信息来确定该服务请求消息是否为目标服务请求消息。在一些实施例中,第一控制单元101可以通过检测服务请求消息中服务的设备标识信息是否为电子设备10的标识信息,来确定该服务消息是否为目标服务请求消息。若服务请求消息中服务的设备标识信息为电子设备10的标识信息,则第一控制单元101确定接收的服务请求消息为目标服务请求消息,第一控制单元101需要对该服务请求消息进行响应,此时第一控制单元101可以从第二存储区域中获取目标数据。否则,第一控制单元101确定接收的服务请求消息不是目标服务请求消息,第一控制单元101无需对其进行响应。Alternatively, when the service information includes the device identification information of the service, the first control unit 101 may determine whether the service request message is a target service request message based on the device identification information of the service in the service request message. In some embodiments, the first control unit 101 may determine whether the service message is a target service request message by detecting whether the device identification information of the service in the service request message is the identification information of the electronic device 10. If the device identification information of the service in the service request message is the identification information of the electronic device 10, the first control unit 101 determines that the received service request message is a target service request message, and the first control unit 101 needs to respond to the service request message. At this time, the first control unit 101 can obtain the target data from the second storage area. Otherwise, the first control unit 101 determines that the received service request message is not a target service request message, and the first control unit 101 does not need to respond to it.
作为一种可能的实现方式,服务的设备标识信息可以包括设备的名称信息、设备的服务名称信息中的至少一个。即为,服务的设备标识信息可以是设备的名称信息,也可以是设备在目标服务中注册的服务名称信息,当然,还可以是设备的其他能够唯一标识该设备的信息,本申请对此不作限制。As a possible implementation, the device identification information of the service may include at least one of the name information of the device and the service name information of the device. That is, the device identification information of the service may be the name information of the device, or the service name information registered by the device in the target service, or other information of the device that can uniquely identify the device, which is not limited in this application.
在服务的设备标识信息包括设备的名称信息时,第一控制单元101可以在接收到服务请求消息时,检测服务请求消息中包含的设备的名称信息是否为电子设备10的名称信息。若服务请求消息中包含的设备的名称信息是电子设备10的名称信息是,则确定接收的服务请求消息为目标服务请求消息。此时第一控制单元101需对该目标服务请求消息进行响应,第一控制单元101可以从第二存储区域中获取目标数据,并将目标数据发送给目标设备20。When the device identification information of the service includes the name information of the device, the first control unit 101 can detect whether the name information of the device contained in the service request message is the name information of the electronic device 10 when receiving the service request message. If the name information of the device contained in the service request message is the name information of the electronic device 10, it is determined that the received service request message is a target service request message. At this time, the first control unit 101 needs to respond to the target service request message, and the first control unit 101 can obtain the target data from the second storage area and send the target data to the target device 20.
或者,若服务请求消息中包含的设备的名称信息不是电子设备10的名称信息,则第一控制单元101可以确定接收的服务请求消息并不是目标服务请求消息,此时第一控制单元101不对服务请求消息进行响应。Alternatively, if the device name information included in the service request message is not the name information of the electronic device 10, the first control unit 101 may determine that the received service request message is not the target service request message, and the first control unit 101 does not respond to the service request message.
在服务的设备标识信息包括设备的服务名称信息时,第一控制单元101可以在接收到服务请求消息时,检测服务请求消息内包含的设备的服务名称信息是否为电子设备10在目标服务中注册的服务名称信息。若服务请求消息内包含的设备的服务名称信息是电子设备10的服务名称信息,则确定接收的服务请求消息为目标服务请求消息。此时第一控制单元101需对该目标服务请求消息进行响应,第一控制单元101可以从第二存储区域中获取目标数据,并将目标数据发送给目标设备20。When the device identification information of the service includes the service name information of the device, the first control unit 101 can detect whether the service name information of the device contained in the service request message is the service name information registered by the electronic device 10 in the target service when receiving the service request message. If the service name information of the device contained in the service request message is the service name information of the electronic device 10, it is determined that the received service request message is a target service request message. At this time, the first control unit 101 needs to respond to the target service request message, and the first control unit 101 can obtain the target data from the second storage area and send the target data to the target device 20.
或者,若服务请求消息内包含的设备的服务名称信息不是电子设备10的服务名称信息,则确定接收的服务请求消息并不是目标服务请求消息,此时第一控制单元101不对服务请求消息进行响应。Alternatively, if the device service name information included in the service request message is not the service name information of the electronic device 10, it is determined that the received service request message is not the target service request message, and the first control unit 101 does not respond to the service request message.
作为一种可能的实现方式,在电子设备10为图像形成设备时,则服务的名称信息包括打印机服务、扫描服务、传真服务中的至少一个。此时,第一控制单元101可以在接收到服务请求消息时,检测其内包含的服务的名称信息,若服务的名称信息包括打印机服务、扫描服务、传真服务中的至少一个,则说明接收的服务请求消息是用于与图像形成设备建立通信连接的目标服务请求消息,此时第一控制单元101可以从第二存储区域中获取目标数据,并将目标数据发送给目标设备20。As a possible implementation, when the electronic device 10 is an image forming device, the service name information includes at least one of a printer service, a scanning service, and a fax service. At this time, the first control unit 101 can detect the service name information contained in the service request message when receiving the service request message. If the service name information includes at least one of a printer service, a scanning service, and a fax service, it means that the received service request message is a target service request message for establishing a communication connection with the image forming device. At this time, the first control unit 101 can obtain the target data from the second storage area and send the target data to the target device 20.
当然,电子设备也可以基于前述服务的设备标识、服务的名称信息综合确定前述服务请求消息是否为目标服务请求信息,本申请实施例对此不进行限定。Of course, the electronic device may also comprehensively determine whether the aforementioned service request message is the target service request information based on the device identification of the aforementioned service and the name information of the service, and the embodiment of the present application does not limit this.
作为一种可能的实现方式,第二控制单元102具体用于:获取目标数据,将目标数据按照目标服务的数据格式进行封装,并将封装后的目标数据存储至第一存储区域。As a possible implementation manner, the second control unit 102 is specifically used to: obtain target data, encapsulate the target data according to the data format of the target service, and store the encapsulated target data in the first storage area.
其中,目标格式是目标服务对应的数据格式。The target format is the data format corresponding to the target service.
第一控制单元101具体用于:在电子设备10处于低功耗模式时,若接收到目标设备20发送的目标服务请求消息,则对第二存储区域中获取的目标数据进行网络封装,并将网络封装后的目标数据发送至目标设备20。The first control unit 101 is specifically used for: when the electronic device 10 is in low power consumption mode, if a target service request message sent by the target device 20 is received, network encapsulation is performed on the target data obtained in the second storage area, and the network encapsulated target data is sent to the target device 20.
即为,目标服务具有自身的数据格式。电子设备10在向其他设备发送目标数据时,需要将目标数据按照目标服务的数据格式进行封装,这样,其他设备在接收到该目标数据时,才能按照目标服务的数据格式对目标数据进行解析,得出其所需的电子设备10的相关数据。基于此,为了降低第一控制单元101的运算复杂度,第二控制单元102在获取了目标数据后,可以先将目标数据按照目标服务的数据格式进行封装后,在将目标数据存储至第一存储区域。在一些实施例中,若目标数据仅是目标服务的数据中的部分,此时在按照目标服务的数据格式对目标数据进行封装时,第二控制单元102还可以按照目标服务的数据格式将目标数据中没有的内容补充完全。例如,目标服务的数据格式中包含有IP地址信息、名称信息、电子设备10的功能属性信息及电子设备10的服务名称信息。此时,若目标数据中仅包含有电子设备10的功能属性信息及电子设备10的服务名称信息,在目标数据按照目标服务的数据格式进行封装时,第二控制单元102需要先获取电子设备10的IP地址信息及名称信息。在按照目标服务的数据格式将IP地址信息、名称信息、电子设备10的功能属性信息及电子设备10的服务名称信息等进行封装。在完成目标数据的封装后,将封装后的目标数据存储至第一存储区域。此时,第一控制单元101在电子设备10将目标数据发送至目标设备之前,可以从第一存储区域获取到封装后的目标数据,将获取的目标数据存储至第二存储区域。That is, the target service has its own data format. When the electronic device 10 sends the target data to other devices, it needs to encapsulate the target data according to the data format of the target service, so that when other devices receive the target data, they can parse the target data according to the data format of the target service and obtain the relevant data of the electronic device 10 they need. Based on this, in order to reduce the computational complexity of the first control unit 101, after obtaining the target data, the second control unit 102 can first encapsulate the target data according to the data format of the target service, and then store the target data in the first storage area. In some embodiments, if the target data is only part of the data of the target service, when encapsulating the target data according to the data format of the target service, the second control unit 102 can also supplement the content that is not in the target data according to the data format of the target service. For example, the data format of the target service contains IP address information, name information, functional attribute information of the electronic device 10, and service name information of the electronic device 10. At this time, if the target data only includes the functional attribute information of the electronic device 10 and the service name information of the electronic device 10, when the target data is encapsulated according to the data format of the target service, the second control unit 102 needs to first obtain the IP address information and name information of the electronic device 10. The IP address information, name information, functional attribute information of the electronic device 10, and service name information of the electronic device 10 are encapsulated according to the data format of the target service. After the encapsulation of the target data is completed, the encapsulated target data is stored in the first storage area. At this time, before the electronic device 10 sends the target data to the target device, the first control unit 101 can obtain the encapsulated target data from the first storage area, and store the obtained target data in the second storage area.
在电子设备10处于低功耗模式时,若接收到目标设备20发送的目标服务请求消息,第一控制单元101需要向目标设备20发送目标格式的目标数据。此时,第一控制单元101可以通过网络传输将目标数据传输至目标设备20。因此,为了能够将目标格式的目标数据传输至目标设备20,第一控制单元101需要先对目标格式的目标数据进行相应的网络封装,再将网络封装后的目标数据通过网络传输至目标设备20。此时第一控制单元101在对目标格式的目标数据进行网络封装时,可以根据其采用的传输协议确定数据封装格式,进而对目标格式的目标数据相应格式的封装。When the electronic device 10 is in low power consumption mode, if a target service request message sent by the target device 20 is received, the first control unit 101 needs to send target data in a target format to the target device 20. At this time, the first control unit 101 can transmit the target data to the target device 20 through network transmission. Therefore, in order to be able to transmit the target data in the target format to the target device 20, the first control unit 101 needs to first perform corresponding network encapsulation on the target data in the target format, and then transmit the network-encapsulated target data to the target device 20 through the network. At this time, when the first control unit 101 performs network encapsulation on the target data in the target format, it can determine the data encapsulation format according to the transmission protocol it adopts, and then encapsulate the target data in the target format in a corresponding format.
在一些实施例中,第一控制单元101可以通过TCP(Transmiss ion ControlProtocol,传输控制协议)进行目标数据的网络传输。此时,第一控制单元101可以将目标格式的目标数据根据TCP的数据格式进行封装,形成TCP数据包,并将TCP数据包通过网络向目标设备20传输。In some embodiments, the first control unit 101 can perform network transmission of the target data through TCP (Transmission Control Protocol). At this time, the first control unit 101 can encapsulate the target data in the target format according to the data format of TCP to form a TCP data packet, and transmit the TCP data packet to the target device 20 through the network.
在一些实施例中,第一控制单元102也可以通过UDP(User Datagram Protocol,用户数据报协议)进行目标数据的网络传输。此时,第一控制单元101可以将目标格式的目标数据根据UDP的数据格式进行封装,形成UDP数据包,并将UDP数据包通过网络向目标设备20传输。In some embodiments, the first control unit 102 may also perform network transmission of the target data via UDP (User Datagram Protocol). At this time, the first control unit 101 may encapsulate the target data in the target format according to the data format of UDP to form a UDP data packet, and transmit the UDP data packet to the target device 20 via the network.
当然,第一控制单元101还可以通过其他传输协议进行目标数据的网络传输,此时,第一控制单元101可以根据传输协议进行对目标格式的目标数据进行相应的网络封装,本申请实施例对此不作限制。Of course, the first control unit 101 can also perform network transmission of target data through other transmission protocols. At this time, the first control unit 101 can perform corresponding network encapsulation of the target data in the target format according to the transmission protocol, and the embodiment of the present application does not limit this.
作为一种可能的实现方式,第一控制单元101在需要将网络封装后的目标数据向目标设备20发送时,可以通过DMA(Di rect Memory Access,直接内存访问)将目标数据传输至电子设备10的输出接口,并通过输出接口将封装后的目标数据发送出去。As a possible implementation method, when the first control unit 101 needs to send the network-encapsulated target data to the target device 20, it can transfer the target data to the output interface of the electronic device 10 through DMA (Direct Memory Access), and send the encapsulated target data out through the output interface.
作为一种可能的实现方式,由于按照目标服务的数据格式进行封装后的目标数据需要增加信息,因此封装后的目标数据占用的存储空间会变大。为了降低存储空间的占用,第二控制单元102也可以不对目标数据按照目标服务的数据格式进行封装,而是直接将获取的目标数据存储至第一存储区域。此时,第一控制单元101在电子设备进入低功耗模式需要进行系统初始时,从第一存储区域获取的目标数据是未按照目标服务的数据格式进行封装的目标数据。第一控制单元101将从第一存储区域获取的目标数据存储至第二存储区域。在电子设备10处于低功耗模式时,若接收到目标服务请求消息,需要通过目标数据进行响应时,第一控制单元101需要先将目标数据按照目标服务的数据格式进行封装,再发送。即为,第一控制单元101,具体用于在电子设备10处于低功耗模式时,若接收到目标设备20发送的目标服务请求消息,则对第二存储区域中获取的目标数据按照目标服务的数据格式进行封装,得到目标格式的目标数据;将目标格式的目标数据进行网络封装,并将网络封装后的目标数据发送至目标设备20。As a possible implementation method, since the target data encapsulated according to the data format of the target service needs to add information, the storage space occupied by the encapsulated target data will become larger. In order to reduce the occupancy of the storage space, the second control unit 102 may not encapsulate the target data according to the data format of the target service, but directly store the acquired target data in the first storage area. At this time, when the first control unit 101 needs to perform system initialization when the electronic device enters the low power consumption mode, the target data acquired from the first storage area is the target data that is not encapsulated according to the data format of the target service. The first control unit 101 stores the target data acquired from the first storage area in the second storage area. When the electronic device 10 is in the low power consumption mode, if a target service request message is received and a response is required through the target data, the first control unit 101 needs to first encapsulate the target data according to the data format of the target service and then send it. That is, the first control unit 101 is specifically used to encapsulate the target data obtained in the second storage area according to the data format of the target service to obtain the target data in the target format if a target service request message is received from the target device 20 when the electronic device 10 is in the low power consumption mode; perform network encapsulation on the target data in the target format, and send the network encapsulated target data to the target device 20.
在本申请实施例中,第一控制单元101在电子设备10处于低功耗模式时,若接收到目标设备20发送的目标服务请求消息,第一控制单元101需要从第二存储区域获取目标数据。由于该目标数据是未按照目标服务的数据格式进行封装的数据,因此为了目标设备20能够正确解析目标数据,第一控制单元101需要先对目标数据按照目标服务的数据格式对目标数据进行封装,得到目标格式的目标数据。由于目标格式的目标数据需要通过网络传输至目标设备20,因此第一控制单元101还需要按照网络传输协议,对目标格式的目标数据进行网络封装,将封装后的目标数据通过网络向目标设备20传输。In an embodiment of the present application, when the electronic device 10 is in low power consumption mode, if the first control unit 101 receives a target service request message sent by the target device 20, the first control unit 101 needs to obtain the target data from the second storage area. Since the target data is data that is not encapsulated according to the data format of the target service, in order for the target device 20 to correctly parse the target data, the first control unit 101 needs to first encapsulate the target data according to the data format of the target service to obtain the target data in the target format. Since the target data in the target format needs to be transmitted to the target device 20 via the network, the first control unit 101 also needs to perform network encapsulation on the target data in the target format according to the network transmission protocol, and transmit the encapsulated target data to the target device 20 via the network.
在一些实施例中,目标服务可以是Bonjour服务。此时,目标数据为Bonjour服务的数据。即为,目标数据是其他设备通过Bonjour服务与电子设备10建立通信连接时,电子设备10需发送至其他设备的数据。In some embodiments, the target service may be a Bonjour service. In this case, the target data is the data of the Bonjour service. That is, the target data is the data that the electronic device 10 needs to send to other devices when the other devices establish a communication connection with the electronic device 10 through the Bonjour service.
这样,在本申请实施例中,在电子设备10在处于低功耗模式时,也可以对目标服务请求消息进行响应,以便目标设备20可以通过目标服务与电子设备10建立通信连接,从而实现在满足电子设备10低功耗需求的同时也可以通过目标服务与目标设备20建立通信连接的目的。In this way, in an embodiment of the present application, when the electronic device 10 is in a low power consumption mode, it can also respond to the target service request message so that the target device 20 can establish a communication connection with the electronic device 10 through the target service, thereby achieving the purpose of meeting the low power consumption requirements of the electronic device 10 while also establishing a communication connection with the target device 20 through the target service.
参考图8,为本申请实施例提供的另一种电子设备的结构示意图。如图8所示,电子设备包括:Referring to FIG8 , a schematic diagram of the structure of another electronic device provided in an embodiment of the present application is shown. As shown in FIG8 , the electronic device includes:
发送单元1001,用于在电子设备处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备,以便目标设备能够根据目标数据与电子设备建立通信连接。The sending unit 1001 is used to send target data to the target device in response to the target service request message when the electronic device is in the low power consumption mode, so that the target device can establish a communication connection with the electronic device according to the target data.
其中,目标设备是发送目标服务请求消息的设备。The target device is a device that sends a target service request message.
作为一种可能的实现方式,上述电子设备,如图9所示,还包括:As a possible implementation, the electronic device, as shown in FIG9 , further includes:
处理单元1002,用于在处于非低功耗模式时,将目标数据存储于第一存储区域中。其中,所述第一存储区域为电子设备处于低功耗模式时可读取的存储区域。The processing unit 1002 is configured to store the target data in a first storage area when the electronic device is in a non-low power consumption mode, wherein the first storage area is a storage area that can be read when the electronic device is in a low power consumption mode.
处理单元1002,还用于在第一存储区域为电子设备处于低功耗模式时可读取的存储区域时,从第一存储区域中获取目标数据。The processing unit 1002 is further configured to obtain target data from the first storage area when the first storage area is a storage area that can be read when the electronic device is in a low power consumption mode.
其中,第二存储区域为所述电子设备处于低功耗模式时可读取的存储区域。The second storage area is a storage area that can be read when the electronic device is in a low power consumption mode.
作为一种可能的实现方式,处理单元1002,还用于获取服务请求消息;确定服务请求消息是否为目标服务请求消息。As a possible implementation manner, the processing unit 1002 is further configured to obtain a service request message; and determine whether the service request message is a target service request message.
发送单元1001,具体用于若服务请求消息为目标服务请求消息,则响应于目标服务请求信息,将目标数据发送至目标设备。The sending unit 1001 is specifically configured to send target data to a target device in response to the target service request message if the service request message is a target service request message.
作为一种可能的实现方式,处理单元1002,还用于按照目标服务的数据格式进行封装,得到目标格式的目标数据;将目标格式的目标数据进行网络封装。As a possible implementation manner, the processing unit 1002 is further configured to perform encapsulation according to the data format of the target service to obtain target data in the target format; and perform network encapsulation on the target data in the target format.
发送单元1001,具体用于将网络封装后的目标数据发送至目标设备。The sending unit 1001 is specifically configured to send the target data after network encapsulation to the target device.
作为一种可能的实现方式,处理单元1002,具体用于在进入低功耗模式之前,将目标数据存储至第一存储区域。As a possible implementation manner, the processing unit 1002 is specifically configured to store the target data in the first storage area before entering the low power consumption mode.
作为一种可能的实现方式,处理单元1002,具体用于在进入低功耗模式之前,若电子设备的网络标识信息发生变化,将目标数据存储至所述第一存储区域;或者,若电子设备重新开启完成后,将目标数据存储至第一存储区域;或者,若电子设备确定需要执行进入低功耗模式所需的系统初始化时,将目标数据存储至第一存储区域;或者,若电子设备在执行进入低功耗模式所需的系统初始化的过程中,将目标数据存储至第一存储区域。As a possible implementation method, the processing unit 1002 is specifically used to store the target data in the first storage area if the network identification information of the electronic device changes before entering the low power consumption mode; or, store the target data in the first storage area after the electronic device is restarted; or, store the target data in the first storage area if the electronic device determines that it is necessary to perform the system initialization required to enter the low power consumption mode; or, store the target data in the first storage area when the electronic device is in the process of performing the system initialization required to enter the low power consumption mode.
作为一种可能的实现方式,上述目标服务请求消息包括Bonjour服务请求消息。As a possible implementation manner, the target service request message includes a Bonjour service request message.
本申请实施例提供一种控制装置,包括:The present application provides a control device, including:
发送单元,用于在电子设备处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备,以便所述目标设备能够根据所述目标数据与所述电子设备建立通信连接;所述目标设备是发送所述目标服务请求消息的设备。A sending unit is used to send target data to a target device in response to a target service request message when the electronic device is in a low power consumption mode, so that the target device can establish a communication connection with the electronic device according to the target data; the target device is the device that sends the target service request message.
作为一种可能的实现方式,所述控制装置包括控制单元,当所述电子设备处于低功耗模式时,所述控制单元至少部分处于工作状态。As a possible implementation manner, the control device includes a control unit, and when the electronic device is in a low power consumption mode, the control unit is at least partially in an operating state.
作为一种可能的实现方式,所述控制单元包括第一控制单元,当所述电子设备处于低功耗模式时,所述第一控制单元处于工作状态,所述第一控制单元,具体用于在所述电子设备处于低功耗模式时,响应于目标服务请求消息,将目标数据发送至目标设备,以便所述目标设备能够根据所述目标数据与所述电子设备建立通信连接;所述目标设备是发送所述目标服务请求消息的设备。As a possible implementation, the control unit includes a first control unit. When the electronic device is in a low power consumption mode, the first control unit is in a working state. The first control unit is specifically used to send target data to a target device in response to a target service request message when the electronic device is in a low power consumption mode, so that the target device can establish a communication connection with the electronic device based on the target data; the target device is a device that sends the target service request message.
作为一种可能的实现方式,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储至第一存储区域中,所述第一控制单元具体用于在将所述目标数据发送至目标设备之前,从第一存储区域中获取目标数据,所述第一存储区域为所述电子设备处于低功耗模式时所述第一控制单元可读取的存储区域。As a possible implementation method, the electronic device is used to store the target data in a first storage area when it is in a non-low power consumption mode, and the first control unit is specifically used to obtain the target data from the first storage area before sending the target data to the target device. The first storage area is a storage area that can be read by the first control unit when the electronic device is in a low power consumption mode.
作为一种可能的实现方式,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储至第一存储区域中,所述电子设备具体用于在将所述目标数据发送至目标设备之前,将存储于所述第一存储区域中的所述目标数据存储于第二存储区域中,所述第一控制单元具体用于从所述第二存储区域中获取所述目标数据,其中,所述第二存储区域为所述电子设备处于低功耗模式时所述第一控制单元可读取的存储区域。As a possible implementation manner, the electronic device is used to store the target data in a first storage area when it is in a non-low power consumption mode, and the electronic device is specifically used to store the target data stored in the first storage area in a second storage area before sending the target data to a target device, and the first control unit is specifically used to obtain the target data from the second storage area, wherein the second storage area is a storage area readable by the first control unit when the electronic device is in a low power consumption mode.
作为一种可能的实现方式,所述电子设备用于在处于非低功耗模式时,将所述目标数据存储至第一存储区域中,所述第一控制单元具体用于在将所述目标数据发送至目标设备之前,将存储于所述第一存储区域中的所述目标数据存储于第二存储区域中,从所述第二存储区域中获取所述目标数据,其中,所述第二存储区域为所述电子设备处于低功耗模式时所述第一控制单元可读取的存储区域。As a possible implementation method, the electronic device is used to store the target data in a first storage area when it is in a non-low power consumption mode, and the first control unit is specifically used to store the target data stored in the first storage area in a second storage area before sending the target data to the target device, and obtain the target data from the second storage area, wherein the second storage area is a storage area readable by the first control unit when the electronic device is in a low power consumption mode.
本申请实施例还提供一种电子设备,包括前述实施例所述的控制装置。An embodiment of the present application also provides an electronic device, comprising the control device described in the above embodiment.
本申请实施例还提供一种电子设备,包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被所述处理器执行时,使所述电子设备执行权利要求1至7任意一项所述的方法。An embodiment of the present application also provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device executes the method described in any one of claims 1 to 7.
本申请实施例还提供一种电子设备,其特征在于,所述计算机可读存储介质包括存储的程序,其中,在所述程序运行时控制所述计算机可读存储介质所在设备执行前述实施例所述的通信方法。An embodiment of the present application also provides an electronic device, characterized in that the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the communication method described in the above embodiment.
与上述实施例相对应,本申请还提供了一种电子设备。图10为本发明实施例提供的另一种电子设备的结构示意图,所述电子设备1200可以包括:处理器1201、存储器1202及通信单元1203。这些组件通过一条或多条总线进行通信,本领域技术人员可以理解,图中示出的电子设备的结构并不构成对本发明实施例的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Corresponding to the above-mentioned embodiment, the present application also provides an electronic device. FIG10 is a schematic diagram of the structure of another electronic device provided in an embodiment of the present invention, and the electronic device 1200 may include: a processor 1201, a memory 1202, and a communication unit 1203. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiment of the present invention. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
其中,所述通信单元1203,用于建立通信信道,从而使所述电子设备可以与其它设备进行通信。接收其他设备发是的用户数据或者向其他设备发送用户数据。The communication unit 1203 is used to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
所述处理器1201,为电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器1202内的软件程序、指令、和/或模块,以及调用存储在存储器内的数据,以执行电子设备的各种功能和/或处理数据。所述处理器可以由集成电路(integrated ci rcuit,IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器1201可以仅包括中央处理器(centra l process ing unit,CPU)。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。The processor 1201 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs, instructions, and/or modules stored in the memory 1202, and calls data stored in the memory to perform various functions of the electronic device and/or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 1201 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
所述存储器1202,用于存储处理器1201的执行指令,存储器1202可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1202 is used to store the execution instructions of the processor 1201. The memory 1202 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
当存储器1202中的执行指令由处理器1201执行时,使得电子设备1200能够执行图2-图6所示实施例中的部分或全部步骤。When the execution instructions in the memory 1202 are executed by the processor 1201, the electronic device 1200 is enabled to execute part or all of the steps in the embodiments shown in Figures 2 to 6.
具体实现中,本发明还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本发明提供的通信方法的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(read-on l y memory,ROM)或随机存储记忆体(random access memory,RAM)等。In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the communication method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
具体实现中,本发明还提供一种计算机程序产品,其中,计算机程序产品包含可执行指令,当所述可执行指令在计算机上执行时,使得计算机执行本发明提供的仿真场景生成方法的各实施例中的部分或全部步骤。In a specific implementation, the present invention further provides a computer program product, wherein the computer program product includes executable instructions, and when the executable instructions are executed on a computer, the computer executes part or all of the steps in each embodiment of the simulation scene generation method provided by the present invention.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM/RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or some parts of the embodiments.
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于装置实施例和终端实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims (16)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP25151393.3A EP4598001A1 (en) | 2024-02-05 | 2025-01-13 | Communication method, control apparatus, electronic device and storage medium |
| US19/028,893 US20250254738A1 (en) | 2024-02-05 | 2025-01-17 | Communication method, control apparatus, electronic device and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410166995 | 2024-02-05 | ||
| CN2024101669952 | 2024-02-05 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118338388A true CN118338388A (en) | 2024-07-12 |
Family
ID=91764962
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410331377.9A Pending CN118338388A (en) | 2024-02-05 | 2024-03-21 | A communication method, control device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118338388A (en) |
-
2024
- 2024-03-21 CN CN202410331377.9A patent/CN118338388A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5278222B2 (en) | Wireless communication apparatus, wireless communication method, and wireless communication program | |
| CN107483725A (en) | Resource allocation method and related products | |
| US8700820B2 (en) | Method for accessing USB device attached to home gateway, home gateway and terminal | |
| CN111338673B (en) | Equipment debugging method and device, electronic equipment and storage medium | |
| US11647104B2 (en) | Data processing method and apparatus, and device | |
| US9319313B2 (en) | System and method of forwarding IPMI message packets based on logical unit number (LUN) | |
| CN107277907B (en) | Mobile terminal and control method thereof | |
| US20220382920A1 (en) | Terminal and communication method | |
| CN113726581B (en) | Method and device for restoring factory configuration of network equipment and network equipment | |
| US11218441B2 (en) | Use of a network address by a network accessory | |
| WO2025097897A1 (en) | Data transmission method, system and apparatus, and non-volatile readable storage medium and electronic device | |
| CN118921679A (en) | Network optimization method, device and system of mobile operation and detection terminal and storage medium | |
| CN118338388A (en) | A communication method, control device, electronic device and storage medium | |
| EP4598001A1 (en) | Communication method, control apparatus, electronic device and storage medium | |
| CN116244254A (en) | RSMC chip, chip channel self-adaptive loading method and Beidou communication navigation device | |
| CN110650546A (en) | File transmission method, device, storage medium and terminal | |
| CN110096366A (en) | A kind of configuration method, device and the server of isomery memory system | |
| CN105471959A (en) | Starting method and device of virtual machine in cluster network | |
| CN112367362B (en) | Data processing method, device, equipment and computer storage medium | |
| CN115269052A (en) | RSMC chip, loading method of chip program and Beidou communication and navigation electronic equipment | |
| US20050238021A1 (en) | Integral router device | |
| CN113961497A (en) | Communication circuit system, method, chip and storage medium | |
| CN115397033B (en) | Wireless communication method, wireless communication device, wireless communication module, medium, and program product | |
| CN117130868B (en) | Log processing method, device, electronic device and storage medium | |
| TWI791316B (en) | Method and system for implementing inter-process communications |
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 |