[go: up one dir, main page]

CN111953761B - Data processing method, device, electronic equipment and storage medium - Google Patents

Data processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111953761B
CN111953761B CN202010773659.6A CN202010773659A CN111953761B CN 111953761 B CN111953761 B CN 111953761B CN 202010773659 A CN202010773659 A CN 202010773659A CN 111953761 B CN111953761 B CN 111953761B
Authority
CN
China
Prior art keywords
target
request message
field
electronic device
hotspot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010773659.6A
Other languages
Chinese (zh)
Other versions
CN111953761A (en
Inventor
彭昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010773659.6A priority Critical patent/CN111953761B/en
Publication of CN111953761A publication Critical patent/CN111953761A/en
Application granted granted Critical
Publication of CN111953761B publication Critical patent/CN111953761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种数据处理方法、装置、电子设备及存储介质,该数据处理方法应用于电子设备,该数据处理方法包括:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文;当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址;将所述请求报文请求的地址重定向到所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。该数据处理方法可以实现在终端连接热点时,根据终端发送的请求报文的字段特征,执行不同的重定向策略,以向该终端推送个性化的相关信息,提升电子设备在分享热点时的处理效果。

The present application discloses a data processing method, device, electronic device, and storage medium. The data processing method is applied to the electronic device. The data processing method includes: when the target device is connected to a hotspot of the electronic device, obtaining a request message sent by the target device; when a specified field in the request message meets a preset field condition, determining a target address corresponding to the preset field condition; redirecting the address requested by the request message to the target address, and the target address is used for the target device to obtain push information to be displayed. The data processing method can implement different redirection strategies according to the field characteristics of the request message sent by the terminal when the terminal is connected to the hotspot, so as to push personalized relevant information to the terminal, and improve the processing effect of the electronic device when sharing the hotspot.

Description

数据处理方法、装置、电子设备及存储介质Data processing method, device, electronic device and storage medium

技术领域technical field

本申请涉及电子设备技术领域,更具体地,涉及一种数据处理方法、装置、电子设备及存储介质。The present application relates to the technical field of electronic equipment, and more specifically, to a data processing method, device, electronic equipment, and storage medium.

背景技术Background technique

随着科技水平和生活水平的快速进步,电子设备(例如智能手机、平板电脑等)已经成为人们日常生活中最常用的消费型电子产品之一。目前的电子设备可以提供无线热点供其他终端进行上网,但电子设备在分享热点时的处理方式较为单一,效果不佳。With the rapid advancement of technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have become one of the most commonly used consumer electronic products in people's daily life. Current electronic devices can provide wireless hotspots for other terminals to access the Internet, but the processing method of electronic devices when sharing hotspots is relatively simple, and the effect is not good.

发明内容Contents of the invention

鉴于上述问题,本申请提出了一种数据处理方法、装置、电子设备及存储介质。In view of the above problems, the present application proposes a data processing method, device, electronic equipment and storage medium.

第一方面,本申请实施例提供了一种数据处理方法,应用于电子设备,所述方法包括:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文;当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址;将所述请求报文请求的地址重定向到所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。In a first aspect, an embodiment of the present application provides a data processing method, which is applied to an electronic device. The method includes: when a target device is connected to a hotspot of the electronic device, obtaining a request message sent by the target device; when a specified field in the request message meets a preset field condition, determining a target address corresponding to the preset field condition; redirecting an address requested by the request message to the target address, and the target address is used for the target device to obtain push information to be displayed.

第二方面,本申请实施例提供了一种数据处理装置,应用于电子设备,所述装置包括:请求获取模块、策略确定模块以及重定向模块,其中,请求获取模块用于当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文;策略确定模块用于当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址;重定向模块用于将所述请求报文请求的地址重定向到所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。In a second aspect, an embodiment of the present application provides a data processing device, which is applied to an electronic device. The device includes: a request acquisition module, a policy determination module, and a redirection module, wherein the request acquisition module is configured to obtain a request message sent by the target device when the target device is connected to a hotspot of the electronic device; the policy determination module is used to determine a target address corresponding to the preset field condition when a specified field in the request message meets a preset field condition; the redirection module is used to redirect the address requested by the request message to the target address, and the target address is used by the target device to obtain push information to be displayed.

第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述第一方面提供的数据处理方法。In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; and one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to execute the data processing method provided in the first aspect above.

第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的数据处理方法。In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium, where program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the data processing method provided in the above-mentioned first aspect.

本申请提供的方案,电子设备通过在目标终端连接电子设备的无线热点时,获取目标设备发送的请求报文,当该请求报文中的指定字段满足预设字段条件时,可确定与该预设字段条件对应的目标地址,并将请求报文请求的地址重定向到与目标地址,该目标地址用于目标设备获取待显示的推送信息,从而可以实现电子设备在分享热点时,根据终端发送的请求报文的字段特征,执行不同的重定向策略,以向该终端推送个性化的相关信息,提升电子设备在分享热点时的处理效果。In the solution provided by this application, the electronic device obtains the request message sent by the target device when the target terminal is connected to the wireless hotspot of the electronic device. When the specified field in the request message meets the preset field conditions, the target address corresponding to the preset field condition can be determined, and the address requested by the request message is redirected to the target address. The processing effect of the device when sharing a hotspot.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without creative work.

图1示出了根据本申请一个实施例的数据处理方法流程图。Fig. 1 shows a flowchart of a data processing method according to an embodiment of the present application.

图2示出了根据本申请另一个实施例的数据处理方法的一种流程图。Fig. 2 shows a flowchart of a data processing method according to another embodiment of the present application.

图3示出了根据本申请另一个实施例的数据处理方法的另一种流程图。Fig. 3 shows another flowchart of a data processing method according to another embodiment of the present application.

图4示出了根据本申请又一个实施例的数据处理方法流程图。Fig. 4 shows a flowchart of a data processing method according to yet another embodiment of the present application.

图5示出了根据本申请再一个实施例的数据处理方法流程图。Fig. 5 shows a flowchart of a data processing method according to yet another embodiment of the present application.

图6示出了根据本申请还一个实施例的数据处理方法流程图。Fig. 6 shows a flowchart of a data processing method according to yet another embodiment of the present application.

图7示出了根据本申请一个实施例的数据处理装置的一种框图。Fig. 7 shows a block diagram of a data processing device according to an embodiment of the present application.

图8是本申请实施例的用于执行根据本申请实施例的数据处理方法的电子设备的框图。Fig. 8 is a block diagram of an electronic device for executing the data processing method according to the embodiment of the present application according to the embodiment of the present application.

图9是本申请实施例的用于保存或者携带实现根据本申请实施例的数据处理方法的程序代码的存储单元。FIG. 9 is a storage unit used to store or carry program codes implementing the data processing method according to the embodiment of the present application according to the embodiment of the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

人们在使用电子设备时,通常会存在向周围的用户分享无线热点的情况。例如,当用户与亲朋好友外出时,如果朋友的电子设备信号不佳、或者免费的数据流量不足时,可能会打开自己的电子设备的个人热点,以分享给朋友,让朋友的电子设备可以使用分享的个人热点进行上网。When people use electronic devices, they usually share wireless hotspots with surrounding users. For example, when a user goes out with relatives and friends, if the signal of the electronic device of the friend is not good, or the free data flow is insufficient, the personal hotspot of the electronic device may be turned on to share with the friend, so that the electronic device of the friend can use the shared personal hotspot to go online.

其中,电子设备在进行热点分享时,一般会向接入热点的设备提供免费流量以供设备上网,或者向接入热点的设备推送广告信息,以使接入热点的设备通过播放广告信息的方式换取流量以供设备上网。但是,目前电子设备在进行热点分享时,针对接入热点的所有设备的处理方式均是相同的,即,均是提供免费流量,或者均是推送广告信息,没有针对设备的不同进行不同的处理,处理效果不佳。Among them, when an electronic device performs hotspot sharing, it generally provides free traffic to the device connected to the hotspot for the device to surf the Internet, or pushes advertisement information to the device connected to the hotspot, so that the device connected to the hotspot plays advertisement information in exchange for traffic for the device to surf the Internet. However, at present, when an electronic device performs hotspot sharing, the processing methods for all devices connected to the hotspot are the same, that is, all provide free traffic, or push advertisement information, and do not perform different processing for different devices, and the processing effect is not good.

针对上述问题,发明人提出了本申请实施例提供的数据处理方法、装置、电子设备以及存储介质,可以实现电子设备在分享热点时,通过获取接入热点的设备发起的请求报文,并判断该请求报文中的指定字段是否满足预设字段条件,以在满足预设字段条件时,通过与该预设字段条件对应的重定向处理方式,对接入热点的设备发起的请求报文进行处理,提升电子设备在分享热点时的处理效果,进而提升用户体验。其中,具体的数据处理方法在后续的实施例中进行详细的说明。In view of the above problems, the inventor proposes the data processing method, device, electronic device and storage medium provided by the embodiments of the present application, which can realize the electronic device when sharing a hotspot, by obtaining the request message initiated by the device connected to the hotspot, and judging whether the specified field in the request message meets the preset field conditions, so that when the preset field condition is satisfied, the request message initiated by the device connected to the hotspot is processed through the redirection processing method corresponding to the preset field condition, and the processing effect of the electronic device when sharing the hotspot is improved, thereby improving user experience. Wherein, the specific data processing method is described in detail in the subsequent embodiments.

请参阅图1,图1示出了本申请一个实施例提供的数据处理方法的流程示意图。在具体的实施例中,所述数据处理方法应用于如图7所示的数据处理装置400以及配置有所述数据处理装置400的电子设备100(图8)。下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以为智能手机、平板电脑、智能手表等,在此不做限定。下面将针对图1所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Please refer to FIG. 1 , which shows a schematic flowchart of a data processing method provided by an embodiment of the present application. In a specific embodiment, the data processing method is applied to a data processing device 400 as shown in FIG. 7 and an electronic device 100 ( FIG. 8 ) configured with the data processing device 400 . The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device applied in this embodiment may be a smart phone, a tablet computer, a smart watch, etc., which is not limited here. The process shown in Figure 1 will be described in detail below, and the data processing method may specifically include the following steps:

步骤S110:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文。Step S110: Obtain a request message sent by the target device when the target device connects to the hotspot of the electronic device.

在本申请实施例中,电子设备可以开启无线热点,以分享无线热点至其他终端,供其他终端在搜索并接入到该无线热点后,进行上网。其中,电子设备在检测到目标设备连接电子设备开启的无线热点时,可以获取目标设备发送的请求报文。该请求报文中可包括目标设备请求访问的网页地址。In the embodiment of the present application, the electronic device can turn on the wireless hotspot to share the wireless hotspot with other terminals, so that other terminals can surf the Internet after searching for and accessing the wireless hotspot. Wherein, when the electronic device detects that the target device is connected to the wireless hotspot enabled by the electronic device, it may obtain the request message sent by the target device. The request message may include the address of the webpage that the target device requests to visit.

在一些实施例中,请求报文可以是HTTP(Hyper Text Transfer Protocol,超文本传输协议)请求报文或HTTPS(Hyper Text Transfer Protocol over SecureSocketLayer,超文本传输安全协议)请求报文,也可以是DNS(Domain Name System,域名系统)访问请求,在此并不作限定,仅需电子设备能在目标终端连接电子设备的热点时获取到目标终端发起的网络访问请求即可。In some embodiments, the request message may be an HTTP (Hyper Text Transfer Protocol, Hypertext Transfer Protocol) request message or an HTTPS (Hyper Text Transfer Protocol over Secure Socket Layer, Hypertext Transfer Security Protocol) request message, or a DNS (Domain Name System, Domain Name System) access request, which is not limited here, as long as the electronic device can obtain the network access request initiated by the target terminal when the target terminal is connected to the hotspot of the electronic device.

作为一种实施方式,请求报文可以为目标终端对电子设备的热点探测报文。具体地,其他终端在搜索并接入到电子设备分享的热点时,通常会发起一个探测请求以做一个网络探测,来得知当前网络是否可用或者需要登陆认证。电子设备可通过获取目标设备发送的探测报文,作为上述获取到的目标设备发送的请求报文。在一些实施例中,不同的目标设备发起的探测请求可以不同,也可以相同,在此不作限定。例如,目标设备为IOS终端时,其发起的探测地址可以为:captive.apple.com、www.airport.us、www.ibook.info、www.thinkdifferent.us、www.appleiphonecell.com、www.itools.info等;目标设备为Android终端时,其发起的探测地址可以为:Hwcloud_geneate_204、client3.google.com等,不同的终端设备厂商可以通过修改Android的内核修改探测地址的,探测地址并不作限定。As an implementation manner, the request message may be a hotspot detection message sent by the target terminal to the electronic device. Specifically, when other terminals search for and access the hotspot shared by the electronic device, they usually initiate a detection request to perform a network detection to know whether the current network is available or requires login authentication. The electronic device may obtain the detection message sent by the target device as the obtained request message sent by the target device. In some embodiments, the probe requests initiated by different target devices may be different or the same, which is not limited here. For example, when the target device is an IOS terminal, the detection addresses initiated by it can be: captive.apple.com, www.airport.us, www.ibook.info, www.thinkdifferent.us, www.appleiphonecell.com, www.itools.info, etc.; when the target device is an Android terminal, the detection addresses initiated by it can be: Hwcloud_geneate_204, client3.google.com, etc., different terminal devices Manufacturers can modify the detection address by modifying the Android kernel, and the detection address is not limited.

作为另一种实施方式,请求报文也可以为目标终端发起的DNS请求。具体地,其他终端在成功接入到电子设备分享的热点时,可基于自身业务发起DNS请求以获取DNS解析后的IP(Internet Protocol,网际互连协议)地址。电子设备可通过拦截目标设备首次发起的DNS访问请求,作为上述获取到的目标设备发送的请求报文。在一些实施例中,在拦截目标设备发送的DNS请求时,可以采用netfilter/iptables(简称为iptables)组成Linux平台下的包过滤防火墙,也可以采用DNSMasq、BPF(Berkeley Packet Filter,柏克莱封包过滤器)等技术拦截目标设备发送的DNS访问请求。As another implementation manner, the request message may also be a DNS request initiated by the target terminal. Specifically, when the other terminal successfully accesses the hotspot shared by the electronic device, it can initiate a DNS request based on its own business to obtain an IP (Internet Protocol, Internet Protocol) address after DNS resolution. The electronic device may intercept the DNS access request initiated by the target device for the first time as the obtained request message sent by the target device. In some embodiments, when intercepting the DNS request sent by the target device, netfilter/iptables (iptables for short) can be used to form a packet filtering firewall under the Linux platform, and DNSMasq, BPF (Berkeley Packet Filter, Berkeley Packet Filter) and other technologies can be used to intercept the DNS access request sent by the target device.

例如,当采用DNSMasq可执行文件来控制客户端的DNS请求和响应时,由于DNSMasq有两个重要的功能DHCP和DNS解析,因此,电子设备可以在通过DNSMasq返回目标设备DHCPOFFER报文时候,可以将目标设备的DNS请求中的域名将强制解析为信息推送服务器的目标地址。For example, when the DNSMasq executable file is used to control the client's DNS request and response, since DNSMasq has two important functions, DHCP and DNS resolution, the electronic device can forcefully resolve the domain name in the DNS request of the target device to the target address of the information push server when the electronic device returns the DHCPOFFER message of the target device through DNSMasq.

在一些实施例中,目标设备通常会自动生成一个备份Dns Server,为了防止误判,可以对备份Dns Server的访问用防火墙拦截。使得目标设备发起的DNS请求只能通过电子设备获取DNS解析后的IP。In some embodiments, the target device usually automatically generates a backup Dns Server, and in order to prevent misjudgment, access to the backup Dns Server can be intercepted by a firewall. The DNS request initiated by the target device can only obtain the IP after DNS resolution through the electronic device.

在一些实施方式中,电子设备可以对用于指示开启热点的指令进行检测,并在检测到用于指示开启热点的指令时,开启无线热点,以供其他终端使用无线热点。该用于指示开启热点的指令可以是用户对电子设备的显示界面上的无线热点的图标进行触控操作生成,也可以是用户输入指示开启热点的语音生成,在此不做限定。作为一种方式,该指令可以为热点启动指令,电子设备在接收到热点启动指令后,可以响应于热点启动指令,启动电子设备的无线热点。具体地,电子设备可以检测是否接收到热点启动指令并获得检测结果,如果检测结果表征接收到热点启动指令时,可以响应于该热点启动指令,启动电子设备的热点,以供目标设备搜索发现该电子设备的热点。In some implementations, the electronic device may detect the instruction for instructing to turn on the hotspot, and when detecting the instruction for instructing to turn on the hotspot, turn on the wireless hotspot for other terminals to use the wireless hotspot. The instruction for instructing to turn on the hotspot may be generated by the user performing a touch operation on the icon of the wireless hotspot on the display interface of the electronic device, or may be generated by the user inputting a voice indicating to turn on the hotspot, which is not limited herein. As one manner, the instruction may be a hotspot activation instruction, and after receiving the hotspot activation instruction, the electronic device may respond to the hotspot activation instruction to activate the wireless hotspot of the electronic device. Specifically, the electronic device may detect whether a hotspot activation instruction is received and obtain a detection result. If the detection result indicates that a hotspot activation instruction is received, the electronic device may be activated in response to the hotspot activation instruction, so that the target device may search and find the electronic device's hotspot.

在一些实施方式中,电子设备可以显示有热点开关控件,该热点开关控件用于基于目标操作启动电子设备的热点或关闭电子设备的无线热点。其中,目标操作可以包括大面积按压、持续长按、持续超长按、双指长按、单指点击、多指连续点击等,在此不作限定。作为一种可选的实施方式,当电子设备检测到对该热点开关的按压操作,并且按压时长超过预设时长时,控制无线热点开启;在无线热点开启时,如果检测到对该热点开关的按压操作,并且按压时长超过预设时长时,控制无线热点关闭。In some implementations, the electronic device may display a hotspot switch control, and the hotspot switch control is used to activate the electronic device's hotspot or turn off the electronic device's wireless hotspot based on the target operation. Wherein, the target operation may include a large-area press, a sustained long press, a sustained ultra-long press, a two-finger long press, a single-finger click, and multiple-finger continuous clicks, etc., which are not limited herein. As an optional implementation manner, when the electronic device detects a pressing operation of the hotspot switch and the pressing time exceeds a preset duration, the wireless hotspot is controlled to be turned on; when the wireless hotspot is turned on, if the pressing operation of the hotspot switch is detected and the pressing time exceeds the preset duration, the wireless hotspot is controlled to be turned off.

步骤S120:当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址。Step S120: When the specified field in the request message satisfies a preset field condition, determine a target address corresponding to the preset field condition.

在本申请实施例中,电子设备在获取到目标设备发送的请求报文时,可以对请求报文中携带的字段信息进行判断,以确定是否对该目标设备进行信息推送。具体地,可以通过判断请求报文中的指定字段是否满足预设字段条件,当满足预设字段条件时,电子设备可确定与该预设字段条件对应的重定向的目标地址。其中,目标地址可用于电子设备将请求报文请求的地址重定向到推送服务器的地址,目标设备加载该重定向后的地址后,推送服务器可将推送的信息发送至目标设备,从而目标设备可以获取并显示该推送服务器推送的信息。In the embodiment of the present application, when the electronic device obtains the request message sent by the target device, it may judge the field information carried in the request message to determine whether to push information to the target device. Specifically, by judging whether a specified field in the request message satisfies a preset field condition, when the preset field condition is met, the electronic device may determine a redirected target address corresponding to the preset field condition. Wherein, the target address can be used for the electronic device to redirect the address requested by the request message to the address of the push server. After the target device loads the redirected address, the push server can send the pushed information to the target device, so that the target device can acquire and display the information pushed by the push server.

在一些实施例中,指定字段可以是请求报文中能够标识目标设备的设备信息的字段信息,具体是哪个字段在此并不作限定。作为一种实施方式,指定字段可以是MAC(MediaAccess Control Address),媒体访问控制地址)对应的字段信息,电子设备可根据请求报文中的MAC地址,确定接入热点的目标设备的设备厂商信息。作为另一种实施方式,指定字段也可以是UA(User Agent,用户代理)对应的字段信息,电子设备可根据请求报文中的UA字段,确定接入热点的目标设备的设备类型信息。当然,上述字段信息仅为举例,并不对本申请的指定字段做出限定。例如,指定字段还可以是URL(Uniform Resource Locator,统一资源定位符)地址对应的字段信息、域名对应的字段信息等。In some embodiments, the specified field may be field information capable of identifying the device information of the target device in the request message, and the specific field is not limited here. As an implementation, the specified field may be field information corresponding to MAC (Media Access Control Address), and the electronic device may determine the device manufacturer information of the target device for accessing the hotspot according to the MAC address in the request message. As another implementation manner, the specified field may also be field information corresponding to a UA (User Agent, User Agent), and the electronic device may determine the device type information of the target device to access the hotspot according to the UA field in the request message. Of course, the above field information is only an example, and does not limit the specified fields in this application. For example, the specified field may also be field information corresponding to a URL (Uniform Resource Locator, uniform resource locator) address, field information corresponding to a domain name, and the like.

在一些实施例中,预设字段条件可以是电子设备要对获取到的请求报文进行重定向处理时,请求报文中的字段需要满足的字段条件。其中,预设字段条件可以是一种,也可以是多种,在此并不作限定。当预设字段条件为多种时,对应的重定向目标地址也可以是多种,预设字段条件与重定向的目标地址可以一一对应。从而电子设备在获取到目标设备发送的请求报文时,可通过判断该请求报文是否满足预设字段条件,来确定电子设备是否对请求报文进行重定向处理。以及可通过具体确定该请求报文满足的是哪一个预设字段条件,来确定电子设备对请求报文重定向的是哪一个目标地址。In some embodiments, the preset field condition may be a field condition that the fields in the request message need to meet when the electronic device is to perform redirection processing on the obtained request message. Wherein, the preset field condition may be one type, or may be multiple types, which are not limited here. When there are multiple types of preset field conditions, there may also be multiple types of corresponding redirection target addresses, and the preset field conditions may be in one-to-one correspondence with redirection target addresses. Therefore, when the electronic device obtains the request message sent by the target device, it can determine whether the electronic device redirects the request message by judging whether the request message satisfies a preset field condition. And by specifically determining which preset field condition the request message satisfies, it can be determined which target address the electronic device redirects the request message to.

在一些实施例中,预设字段条件可以与请求报文的指定字段对应,从而电子设备在获取到目标设备的请求报文中的指定字段时,可将请求报文中的指定字段与该指定字段对应的预设字段条件进行合理匹配,以确定该指定字段是否满足其对应的预设字段条件,从而准确得到电子设备对请求报文的处理操作。例如,当指定字段为MAC对应的字段信息时,预设字段条件可以是预设MAC字段条件,也即请求报文中MAC需要满足的条件,从而可以通过判断请求报文中的MAC字段是否满足预设MAC字段条件,来确定电子设备是否对请求报文进行重定向处理,以及确定进行哪一种重定向处理。In some embodiments, the preset field condition may correspond to the specified field of the request message, so that when the electronic device acquires the specified field in the request message of the target device, it can reasonably match the specified field in the request message with the preset field condition corresponding to the specified field to determine whether the specified field meets its corresponding preset field condition, so as to accurately obtain the processing operation of the request message by the electronic device. For example, when the specified field is the field information corresponding to the MAC, the preset field condition may be a preset MAC field condition, that is, a condition that the MAC in the request message needs to meet, so that it can be determined whether the electronic device performs redirection processing on the request message by judging whether the MAC field in the request message satisfies the preset MAC field condition, and which kind of redirection processing to perform.

在一些实施例中,当请求报文中的指定字段不满足上述预设字段条件时,电子设备可放行该请求报文,也即不对该请求报文做重定向处理。从而目标设备可以准确访问到该请求报文请求的网页地址,而非被电子设备重定向后的网页地址。In some embodiments, when the specified field in the request message does not meet the aforementioned preset field conditions, the electronic device may release the request message, that is, not perform redirection processing on the request message. Therefore, the target device can accurately access the webpage address requested by the request message, rather than the webpage address redirected by the electronic device.

步骤S130:将所述请求报文请求的地址重定向到所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。Step S130: Redirect the address requested by the request message to the target address, and the target address is used for the target device to obtain the push information to be displayed.

在本申请实施例中,在电子设备确定出与预设字段条件对应的目标地址之后,电子设备可将目标设备发送的请求报文请求的地址重定向到与该目标地址,该目标地址用于目标设备获取待显示的推送信息。其中,目标地址可以是与该预设字段条件对应的推送服务器的地址。当推送服务器存在多个推送网页地址时,目标地址也可以是与该预设字段条件具体对应的推送网页地址。In the embodiment of the present application, after the electronic device determines the target address corresponding to the preset field conditions, the electronic device may redirect the address requested by the request message sent by the target device to the target address, and the target address is used for the target device to obtain the push information to be displayed. Wherein, the target address may be the address of the push server corresponding to the preset field condition. When the push server has multiple push webpage addresses, the target address may also be the push webpage address specifically corresponding to the preset field condition.

其中,推送信息可以包括多种类型的推送信息。例如,商业推荐、出行推荐、新闻推荐等。又例如,目标设备对应的商家的优惠券、积分等,又例如,推送热点新闻信息,可以获得相关新闻应用的积分等,还例如,推送出行推荐信息,假如出行推荐信息中包括有出行方式(打车方式),还可以获得打车平台的优惠券等。具体的推送信息不作限定。Wherein, the push information may include various types of push information. For example, business recommendation, travel recommendation, news recommendation, etc. Another example is the coupons and credits of the merchant corresponding to the target device. Another example is to push hot news information to obtain credits for relevant news applications. Another example is to push travel recommendation information. If the travel recommendation information includes travel methods (taxi-hailing methods), coupons for taxi-hailing platforms can also be obtained. The specific push information is not limited.

作为一种实施方式,由于指定字段能够标识目标设备的设备信息,因此,可以根据接入自身热点不同的目标设备的设备信息,对应推送不同类型的推送信息。例如,可根据目标设备的设备类型,对应重定向至该设备类型对应的推送服务器,从而可推送对应设备类型的相关信息,例如该设备类型的优惠活动、该设备类型的新品上市等。当然,上述仅为举例,并不代表对实际的推送信息的限定。As an implementation manner, since the specified field can identify the device information of the target device, different types of push information can be correspondingly pushed according to the device information of the target device that accesses its own hotspot differently. For example, according to the device type of the target device, it can be redirected to the push server corresponding to the device type, so that relevant information of the corresponding device type can be pushed, such as preferential activities of the device type, new product launches of the device type, etc. Of course, the above is only an example, and does not represent a limitation on actual pushed information.

具体地,可以先预先设置待推送的一个或多个热点接入设备的设备信息,以及与其对应的一个或多个推送服务器的地址的对应关系,从而可以根据预先设置的设备信息,确定与该设备信息对应的一个或多个指定字段,并作为预设字段条件。从而电子设备可以通过判断当前接入热点的目标设备发起的请求报文是否满足该预设字段条件,来确定该目标设备是否是预先设置待推送的热点接入设备,从而确定是否重定向至对应的推送服务器的地址。Specifically, the corresponding relationship between the device information of one or more hotspot access devices to be pushed and the addresses of one or more corresponding push servers can be preset, so that one or more designated fields corresponding to the device information can be determined according to the preset device information, and used as preset field conditions. Therefore, the electronic device can determine whether the target device is a hotspot access device preset to be pushed by judging whether the request message initiated by the target device currently accessing the hotspot satisfies the preset field condition, thereby determining whether to redirect to the address of the corresponding push server.

可以理解的是,在确定需要对请求报文进行重定向处理后,电子设备可以根据不同目标设备发起的不同指定字段所标识的不同设备信息,对应重定向至不同的目标地址,从而不同的目标设备可加载不同的目标地址,也即可显示不同的推送信息。It can be understood that after it is determined that the request message needs to be redirected, the electronic device can be redirected to different target addresses according to different device information identified by different specified fields initiated by different target devices, so that different target devices can load different target addresses, that is, different push information can be displayed.

在一些实施方式中,当目标设备的请求报文已经被重定向处理过,也即目标设备之前有接入过电子设备的热点,且进行了是否进行重定向处理的判断,电子设备再次获取到该目标设备的请求报文时,可不再进行前述的重定向目标地址的判断确定过程。In some embodiments, when the request message of the target device has been processed by redirection, that is, the target device has previously connected to a hotspot of the electronic device, and a judgment is made on whether to perform redirection processing, and the electronic device obtains the request message of the target device again, the aforementioned process of determining the redirection target address may not be performed.

作为一种实施方式,电子设备可以记录并存储有所有已接入过其分享的无线热点的终端的标识信息,因此,电子设备可以获取目标设备的标识信息,该标识信息可以为用于标识该目标设备的身份的信息,例如MAC地址等,在获取目标设备的标识信息后,可以将目标设备的标识信息和电子设备存储的所有已接入过其分享的无线热点的终端的标识信息进行比较,以判断目标设备是否已接入过电子设备的无线热点。其中,当比较结果表征目标设备的标识信息和所有已接入过其分享的无线热点的终端的标识信息中的任意一个设备的标识信息匹配时,可以确定目标设备已接入过电子设备的无线热点,从而可以不对该目标设备的请求报文进行前述判断,可不进行重定向处理。当比较结果表征目标设备的标识信息和所有已接入过其分享的无线热点的设备的标识信息均不相同时,可以确定目标设备没有接入过电子设备的无线热点。从而可以对该目标设备的请求报文进行前述判断,确定是否进行重定向处理。As an embodiment, the electronic device may record and store the identification information of all terminals that have accessed the wireless hotspot shared by it. Therefore, the electronic device may obtain the identification information of the target device. The identification information may be information used to identify the identity of the target device, such as a MAC address. Wherein, when the comparison result indicates that the identification information of the target device matches the identification information of any device among the identification information of all terminals that have accessed the wireless hotspot shared by it, it can be determined that the target device has accessed the wireless hotspot of the electronic device, so that the aforementioned judgment may not be performed on the request message of the target device, and the redirection process may not be performed. When the comparison result indicates that the identification information of the target device is different from the identification information of all devices that have accessed the wireless hotspot shared by it, it can be determined that the target device has not accessed the wireless hotspot of the electronic device. Therefore, the foregoing judgment can be performed on the request packet of the target device to determine whether to perform redirection processing.

本申请实施例提供的数据处理方法,电子设备通过在目标终端连接电子设备的无线热点时,获取目标设备发送的请求报文,当该请求报文中的指定字段满足预设字段条件时,可确定与该预设字段条件对应的目标地址,并将请求报文请求的地址重定向到与该目标地址,该目标地址用于目标设备获取待显示的推送信息,从而可以实现电子设备在分享热点时,根据终端发送的请求报文的字段特征,执行不同的重定向策略,以向该终端推送个性化的相关信息,提升电子设备在分享热点时的处理效果。另外,由于电子设备是根据目标终端发送的请求报文中的字段特征,来重定向至不同的目标地址,也使得不同的目标设备获取的推送信息不同,提升了热点连接时的推送信息的推送效果,避免了推送信息的单一固定的问题。In the data processing method provided by the embodiment of the present application, the electronic device obtains the request message sent by the target device when the target terminal is connected to the wireless hotspot of the electronic device. When the specified field in the request message meets the preset field condition, the target address corresponding to the preset field condition can be determined, and the address requested by the request message is redirected to the target address. Relevant information to improve the processing effect of electronic devices when sharing hotspots. In addition, because the electronic device is redirected to different target addresses according to the field characteristics in the request message sent by the target terminal, different target devices obtain different push information, which improves the push effect of push information when connected to a hotspot, and avoids the problem of single and fixed push information.

请参阅图2,图2示出了本申请另一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述电子设备,下面将针对图2所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Please refer to FIG. 2 , which shows a schematic flowchart of a data processing method provided by another embodiment of the present application. The data processing method is applied to the above-mentioned electronic equipment, and the flow shown in FIG. 2 will be described in detail below. The data processing method may specifically include the following steps:

步骤S210:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文。Step S210: Obtain a request message sent by the target device when the target device connects to the hotspot of the electronic device.

在本申请实施例中,步骤S210可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, for step S210, reference may be made to the content of the foregoing embodiments, which will not be repeated here.

步骤S220:当所述请求报文中的指定字段满足设备属性对应的字段条件时,确定与所述设备属性对应的目标地址。Step S220: When the specified field in the request message satisfies the field condition corresponding to the device attribute, determine the target address corresponding to the device attribute.

在一些实施例中,前述预设字段条件可以是设备属性对应的字段条件,从而可以根据接入热点的设备不同的设备属性,执行不同的重定向策略。具体地,在电子设备获取到目标设备发起的请求报文后,可以判断该请求报文中的指定字段是否满足设备属性对应的字段条件,当满足时,电子设备可确定与该设备属性对应的重定向目标地址,当不满足时,电子设备可放行该请求报文,不做重定向处理。In some embodiments, the aforementioned preset field conditions may be field conditions corresponding to device attributes, so that different redirection policies may be implemented according to different device attributes of devices accessing the hotspot. Specifically, after the electronic device obtains the request message initiated by the target device, it can determine whether the specified field in the request message satisfies the field condition corresponding to the device attribute. When it is satisfied, the electronic device can determine the redirection target address corresponding to the device attribute. When it is not satisfied, the electronic device can release the request message without performing redirection processing.

其中,设备属性对应的字段条件可以是电子设备要对获取到的请求报文进行重定向处理时,请求报文中的字段所表征的目标设备的设备属性需要满足的属性对应的字段条件。其中,设备属性可以是用于标识设备身份的信息,可以是设备厂商,也可以是设备类型等。也就是说,设备属性对应的字段条件可以预先设置的需要进行重定向处理的设备属性,请求报文中的字段可以表征的目标设备的设备属性,通过将请求报文中的字段与上述设备属性对应的字段条件进行比对,可以判断目标设备的设备属性是否符合需要进行重定向处理的设备属性,从而可确定该目标设备发起的请求报文是否进行重定向处理。当确定符合需要进行重定向处理的设备属性时,电子设备可确定对该目标设备发起的请求报文进行与该设备属性对应的重定向处理。从而实现了让不同的设备接入都有合适的重定向策略。也即不同设备属性的目标设备,可执行不同的重定向策略,或者可能有的设备进行重定向热点信息推送,有的设备不进行重定向热点信息推送。Wherein, the field condition corresponding to the device attribute may be the field condition corresponding to the attribute that the device attribute of the target device represented by the field in the request message needs to satisfy when the electronic device redirects the obtained request message. Wherein, the device attribute may be information used to identify the identity of the device, may be a device manufacturer, may also be a device type, and so on. That is to say, the field condition corresponding to the device attribute can pre-set the device attribute that needs to be redirected, and the field in the request message can represent the device attribute of the target device. By comparing the field in the request message with the field condition corresponding to the above device attribute, it can be determined whether the device attribute of the target device meets the device attribute that needs to be redirected, so as to determine whether the request message initiated by the target device is redirected. When it is determined that the device attribute that needs to be redirected is met, the electronic device may determine to perform redirection processing corresponding to the device attribute on the request message initiated by the target device. In this way, different device accesses have appropriate redirection strategies. That is, target devices with different device attributes can implement different redirection strategies, or some devices may push redirected hotspot information, and some devices may not push redirected hotspot information.

步骤S230:将所述请求报文请求的地址重定向到与所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。Step S230: Redirect the address requested by the request message to the target address, and the target address is used for the target device to obtain the push information to be displayed.

在本申请实施例中,在电子设备确定出与预设设备属性对应的目标地址之后,电子设备可将目标设备发送的请求报文请求的地址重定向到与该目标地址,该目标地址用于目标设备获取待显示的推送信息。其中,目标地址可以是与该预设设备属性对应的推送服务器的地址。当推送服务器存在多个推送网页地址时,目标地址也可以是与该预设设备属性具体对应的推送网页地址。In the embodiment of the present application, after the electronic device determines the target address corresponding to the preset device attribute, the electronic device may redirect the address requested by the request message sent by the target device to the target address, and the target address is used for the target device to obtain the push information to be displayed. Wherein, the target address may be the address of the push server corresponding to the preset device attribute. When the push server has multiple push webpage addresses, the target address may also be the push webpage address specifically corresponding to the preset device attribute.

在一些实施例中,推送信息可以包括多种类型的推送信息,该多种类型的推送信息可以与设备属性对应。也即,不同的设备属性推送不同类型的信息。作为一种实施方式,电子设备可以记录并存储有预设设备属性与重定向的目标地址的对应关系表,从而在请求报文中的指定字段满足预设设备属性对应的字段条件时,可以从该对应关系表中,查找到对应重定向的目标地址,即确定出与预设设备属性对应的重定向策略。In some embodiments, the push information may include multiple types of push information, and the multiple types of push information may correspond to device attributes. That is, different device attributes push different types of information. As an implementation, the electronic device may record and store a correspondence table between preset device attributes and redirected target addresses, so that when the specified field in the request message meets the field conditions corresponding to the preset device attributes, the corresponding redirected target address may be found from the correspondence table, that is, the redirection strategy corresponding to the preset device attributes is determined.

在一些实施例中,可以由用户设置要进行热点推送的设备属性,以及与设备属性对应的目标地址。具体地,上述重定向到与所述设备属性对应的目标地址,可以包括:重定向到根据用户配置界面中的选择操作所确定的与所述设备属性对应的目标地址,所述用户配置界面包括可选择的多个设备属性以及多个目标地址。In some embodiments, the user may set the device attribute to be pushed by hotspot and the target address corresponding to the device attribute. Specifically, the above redirecting to the target address corresponding to the device attribute may include: redirecting to the target address corresponding to the device attribute determined according to the selection operation in the user configuration interface, the user configuration interface includes a plurality of selectable device attributes and a plurality of target addresses.

在一些实施例中,用户可以是在电子设备启动热点之前进入用户配置界面,进行热点推送的设备属性设置,以及各个设备属性对应的目标地址的设置。具体地,请参阅图3,本申请的数据处理方法还可以包括:In some embodiments, the user may enter the user configuration interface before the electronic device starts the hotspot, and set the device properties of the hotspot push and the target address corresponding to each device property. Specifically, referring to FIG. 3, the data processing method of the present application may also include:

步骤S200:在用户配置界面,显示多个可选择推送的设备属性。Step S200: On the user configuration interface, display a plurality of device attributes that can be selected to be pushed.

在本实施例中,当用户欲进入电子设备的用户配置界面时,首先需要发送指令至电子设备以指示电子设备开启并显示用户配置界面,其中,所述指令可以是用户针对设置于电子设备界面上的用于进行热点配置的图标进行触控操作生成,也可以是用户在电子设备输入指示开启并显示用户配置界面的语音生成等,在此不做限定。In this embodiment, when the user wants to enter the user configuration interface of the electronic device, it is first necessary to send an instruction to the electronic device to instruct the electronic device to open and display the user configuration interface, wherein the instruction may be generated by the user performing a touch operation on an icon set on the interface of the electronic device for hotspot configuration, or may be a voice generated by the user inputting an instruction on the electronic device to enable and display the user configuration interface, etc., which are not limited herein.

在一些实施方式中,电子设备可以响应于热点启动指令,启动电子设备的热点,并显示用户配置界面。具体地,电子设备可以检测是否接收到热点启动指令并获得检测结果,如果检测结果表征接收到热点启动指令时,可以响应于该热点启动指令,启动电子设备的热点并显示用户配置界面,以供其他设备(如目标设备)搜索发现该电子设备的热点,以及供用户在配置用户界面进行热点推送的配置。In some implementations, the electronic device may respond to the hotspot activation instruction to activate the hotspot of the electronic device and display a user configuration interface. Specifically, the electronic device may detect whether a hotspot activation instruction is received and obtain a detection result. If the detection result indicates that a hotspot activation instruction is received, the electronic device may respond to the hotspot activation instruction to activate the hotspot of the electronic device and display a user configuration interface for other devices (such as target devices) to search and find the hotspot of the electronic device, and for the user to configure the configuration of the hotspot push in the user interface.

在一些实施例中,电子设备可在用户配置界面,显示多个可供用户选择推送的设备属性。其中,显示的设备属性选项可以是出厂默认设置,也可以是在之前的热点分享中,根据接入热点设备的设备属性实时更新该用户配置界面显示的设备属性选项,在此并不作限定。In some embodiments, the electronic device can display a plurality of device attributes that can be pushed by the user on the user configuration interface. Wherein, the displayed device attribute options may be factory default settings, or may be real-time updated device attribute options displayed on the user configuration interface according to the device attributes of the connected hotspot device in the previous hotspot sharing, which is not limited here.

步骤S201:当接收到对设备属性的选择操作时,将所述选择操作选中的设备属性作为预设设备属性,所述预设设备属性用于当目标设备连接所述电子设备的热点时,将所述目标设备发送的请求报文中请求的地址重定向到与所述预设设备属性对应的目标地址。Step S201: When a selection operation on a device attribute is received, use the device attribute selected by the selection operation as a preset device attribute, and the preset device attribute is used to redirect the address requested in the request message sent by the target device to the target address corresponding to the preset device attribute when the target device connects to the hotspot of the electronic device.

在本实施例中,电子设备在显示用户配置界面的过程中,可以对作用于用户配置界面的操作进行检测,当检测到作用于用户配置界面中设备属性选项的选择操作时,可以响应于作用于用户配置界面的选择操作,将选择操作选中的设备属性作为预设设备属性。In this embodiment, during the process of displaying the user configuration interface, the electronic device may detect operations acting on the user configuration interface, and when detecting a selection operation acting on a device attribute option in the user configuration interface, may respond to the selection operation acting on the user configuration interface, and use the device attribute selected by the selection operation as a preset device attribute.

例如,在用户配置界面显示的设备属性为设备类型手机、设备类型平板、设备类型电脑时,当接收到对设备类型手机的选择操作时,可以将手机这一设备类型作为预设设备属性。从而后续当接入设备的设备类型为手机时,可以对该手机发起的请求报文进行重定向操作,以实现在连接热点时向该手机的信息推送。For example, when the device attributes displayed on the user configuration interface are device type mobile phone, device type tablet, and device type computer, when a selection operation on the device type mobile phone is received, the device type of mobile phone can be used as the default device attribute. Therefore, when the device type of the access device is a mobile phone, the request message initiated by the mobile phone can be redirected, so as to push information to the mobile phone when connecting to a hotspot.

在一些实施例中,在用户配置界面,也可以显示与可推送的设备属性对应的推送信息选项。从而用户可针对各个设备属性选择推送不同的推送信息。提升电子设备的热点分享时信息推送的个性化需求和使用效果。In some embodiments, push information options corresponding to pushable device attributes may also be displayed on the user configuration interface. Thus, the user may choose to push different push information for each device attribute. Improve the personalized needs and use effects of information push when hotspot sharing of electronic devices.

在另一些实施例中,用户也可以是在目标设备连入电子设备的热点时,电子设备自动弹出用于设置热点推送的用户配置界面,然后用户可以从连入的目标设备中或者目标设备归类后的设备属性中,选择要进行热点推送的目标设备或者设备属性,以及推送的目标地址。从而电子设备可以自动记录目标设备与推送的目标地址的对应关系,或者记录设备属性与推送的目标地址的对应关系。In some other embodiments, the user may also be that when the target device is connected to the hotspot of the electronic device, the electronic device automatically pops up a user configuration interface for setting the hotspot push, and then the user can select the target device or device attribute to be pushed by the hotspot, and the target address of the push from the connected target device or the device attributes after the target device is classified. Therefore, the electronic device can automatically record the corresponding relationship between the target device and the pushed target address, or record the corresponding relationship between the device attribute and the pushed target address.

在一些实施例中,当电子设备根据用户的选择操作,记录了设备属性与推送的目标地址的对应关系之后,可以学习用户的选择习惯,自动对后续连入的设备,进行不同设备属性对应不同重定向地址的判断。In some embodiments, after the electronic device records the corresponding relationship between device attributes and pushed target addresses according to the user's selection operation, it can learn the user's selection habits, and automatically determine whether different device attributes correspond to different redirection addresses for subsequent connected devices.

本申请实施例提供的数据处理方法,电子设备通过在目标终端连接电子设备的无线热点时,获取目标设备发送的请求报文,当该请求报文中的指定字段满足设备属性对应的字段条件时,可确定与该设备属性对应的目标地址,并将请求报文请求的地址重定向到与该设备属性对应的目标地址,该目标地址用于目标设备获取待显示的推送信息,从而可以实现电子设备在分享热点时,根据终端发送的请求报文的字段特征所体现的设备属性信息,执行不同的重定向策略,以向该终端推送与自身设备属性相关的信息,提升电子设备在分享热点时的处理效果。也即电子设备是根据终端发送的请求报文的字段特征所体现的设备属性信息,来重定向至不同的目标地址,也使得不同属性的目标设备获取的推送信息不同,提升了热点连接时的推送信息的推送效果,既避免了推送信息的单一固定的问题,也提升了用户对推送信息的可接受度。In the data processing method provided by the embodiment of the present application, the electronic device obtains the request message sent by the target device when the target terminal is connected to the wireless hotspot of the electronic device. When the specified field in the request message satisfies the field condition corresponding to the device attribute, the target address corresponding to the device attribute can be determined, and the address requested by the request message is redirected to the target address corresponding to the device attribute. The target address is used for the target device to obtain push information to be displayed. The redirection strategy is used to push information related to its own device attributes to the terminal, so as to improve the processing effect of electronic devices when sharing hotspots. That is to say, the electronic device is redirected to different target addresses according to the device attribute information reflected in the field characteristics of the request message sent by the terminal, which also makes the push information obtained by target devices with different attributes different, which improves the push effect of push information when connected to a hotspot.

在一些实施方式中,上述设备属性可包括多种设备类型。电子设备可根据终端发送的请求报文的字段特征所体现的设备类型信息,执行不同的重定向策略。具体地,请参阅图4,图4示出了本申请又一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述电子设备,下面将针对图4所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:In some implementations, the aforementioned device attributes may include multiple device types. The electronic device can implement different redirection strategies according to the device type information reflected in the field characteristics of the request message sent by the terminal. Specifically, please refer to FIG. 4 , which shows a schematic flowchart of a data processing method provided in another embodiment of the present application. The data processing method is applied to the above-mentioned electronic equipment, and the flow shown in Figure 4 will be described in detail below, and the data processing method may specifically include the following steps:

步骤S310:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文。Step S310: Obtain a request message sent by the target device when the target device connects to the hotspot of the electronic device.

在本申请实施例中,步骤S310可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, for step S310, reference may be made to the contents of the foregoing embodiments, and details are not repeated here.

步骤S320:当所述请求报文中的第一字段满足目标设备类型对应的字段条件时,确定与所述目标设备类型对应的目标地址,所述目标设备类型为所述多种设备类型中的任一设备类型。Step S320: When the first field in the request message meets the field condition corresponding to the target device type, determine a target address corresponding to the target device type, where the target device type is any one of the multiple device types.

在一些实施例中,前述实施例中的预设设备属性可以包括多种设备类型,其中,设备类型可以是手机、平板、智能手表、电脑等类型,在此并不作限定。从而电子设备可根据终端发送的请求报文的能体现的设备类型的字段特征,来确定不同的重定向策略。具体地,在电子设备获取到目标设备发起的请求报文后,可以判断请求报文中的第一字段是否满足目标设备类型对应的字段条件,当满足时,可确定与该目标设备类型对应的重定向目标地址,其中,目标设备类型为上述多种设备类型中的任一设备类型。当不满足时,电子设备可放行该请求报文,不做重定向处理。In some embodiments, the preset device attributes in the foregoing embodiments may include multiple device types, wherein the device types may be mobile phones, tablets, smart watches, computers, etc., which are not limited herein. Therefore, the electronic device can determine different redirection strategies according to the field characteristics of the device type that can be reflected in the request message sent by the terminal. Specifically, after the electronic device obtains the request message initiated by the target device, it may determine whether the first field in the request message satisfies the field condition corresponding to the target device type, and if so, may determine a redirection target address corresponding to the target device type, wherein the target device type is any one of the above multiple device types. When not satisfied, the electronic device may release the request message without performing redirection processing.

作为一种实施方式,电子设备可以记录并存储有预设设备类型与重定向的目标地址的对应关系表,从而在请求报文中的指定字段满足预设设备类型中目标设备类型对应的字段条件时,可以从该对应关系表中,查找到对应重定向的目标地址,即确定出与目标设备类型对应的重定向策略。As an implementation, the electronic device may record and store a correspondence table between a preset device type and a redirected target address, so that when the specified field in the request message meets the field condition corresponding to the target device type in the preset device type, the corresponding redirected target address may be found from the correspondence table, that is, the redirection policy corresponding to the target device type is determined.

其中,上述第一字段可以是请求报文中能够表征目标设备的设备类型的字段信息。例如,可以是UA对应的字段信息。在一些实施例中,请求报文中的第一字段是否满足目标设备类型对应的字段条件时,可以是判断第一字段中是否存在可识别出目标设备类型的关键字符。当第一字段中存在可识别出目标设备类型的关键字符时,即可判定请求报文中的第一字段是否满足目标设备类型对应的字段条件,从而可确定执行与目标设备类型对应的重定向策略。Wherein, the above-mentioned first field may be field information in the request message that can represent the device type of the target device. For example, it may be field information corresponding to the UA. In some embodiments, whether the first field in the request message satisfies the field condition corresponding to the target device type may be to determine whether there is a key character that can identify the target device type in the first field. When there is a key character that can identify the target device type in the first field, it can be determined whether the first field in the request message meets the field conditions corresponding to the target device type, so that it can be determined to execute the redirection policy corresponding to the target device type.

步骤S330:将所述请求报文请求的地址重定向到所述目标地址。Step S330: Redirect the address requested by the request packet to the target address.

在本申请实施例中,在电子设备确定出与目标设备类型对应的目标地址之后,电子设备可将目标设备发送的请求报文请求的地址重定向到与该目标地址,该目标地址用于目标设备获取待显示的推送信息。其中,目标地址可以是与该目标设备类型对应的推送服务器的地址。当推送服务器存在多个推送网页地址时,目标地址也可以是与该目标设备类型具体对应的推送网页地址。In the embodiment of the present application, after the electronic device determines the target address corresponding to the target device type, the electronic device may redirect the address requested by the request message sent by the target device to the target address, and the target address is used for the target device to obtain the push information to be displayed. Wherein, the target address may be an address of a push server corresponding to the target device type. When the push server has multiple push webpage addresses, the target address may also be a push webpage address specifically corresponding to the type of the target device.

例如,当第一字段为请求报文中的UA字段时,可通过UA字段判断目标设备是手机还是平板或者电视,从而可以根据不同的设备类型,重定向到不同的推送服务器,从而实现差异化重定向推送。For example, when the first field is the UA field in the request message, the UA field can be used to determine whether the target device is a mobile phone, a tablet or a TV, so that different push servers can be redirected according to different device types, thereby realizing differentiated redirection and push.

本申请实施例提供的数据处理方法,可以实现电子设备在分享热点时,根据终端发送的请求报文的字段特征所体现的设备类型信息,执行不同的重定向策略,以向该终端推送与自身设备类型相关的信息,提升电子设备在分享热点时的处理效果。同时也使得不同设备类型的目标设备获取的推送信息不同,提升了热点连接时的推送信息的推送效果,既避免了推送信息的单一固定的问题,也提升了用户对推送信息的可接受度。The data processing method provided by the embodiment of the present application can implement different redirection strategies according to the device type information reflected in the field characteristics of the request message sent by the terminal when the electronic device is sharing a hotspot, so as to push information related to its own device type to the terminal, and improve the processing effect of the electronic device when sharing a hotspot. At the same time, it also makes the push information obtained by target devices of different device types different, which improves the push effect of the push information when the hotspot is connected, not only avoids the problem of a single fixed push information, but also improves the user's acceptance of the push information.

在另一些实施方式中,上述预设设备属性也可包括多种设备厂商。电子设备可根据终端发送的请求报文的字段特征所体现的设备厂商信息,执行不同的重定向策略。具体地,请参阅图5,图5示出了本申请再一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述电子设备,下面将针对图5所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:In some other implementation manners, the aforementioned preset device attributes may also include various device manufacturers. The electronic device can implement different redirection strategies according to the device manufacturer information reflected in the field characteristics of the request message sent by the terminal. Specifically, please refer to FIG. 5 , which shows a schematic flowchart of a data processing method provided in another embodiment of the present application. The data processing method is applied to the above-mentioned electronic equipment, and the flow shown in FIG. 5 will be described in detail below. The data processing method may specifically include the following steps:

步骤S410:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文。Step S410: Obtain a request message sent by the target device when the target device connects to the hotspot of the electronic device.

在本申请实施例中,步骤S410可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, reference may be made to the contents of the foregoing embodiments for step S410, and details are not repeated here.

步骤S420:当所述请求报文中的第二字段满足目标设备厂商对应的字段条件时,确定与所述目标设备厂商对应的目标地址,所述目标设备厂商为所述多种设备厂商中的任一设备厂商。Step S420: When the second field in the request message satisfies the field condition corresponding to the target device manufacturer, determine the target address corresponding to the target device manufacturer, and the target device manufacturer is any one of the multiple device manufacturers.

由于若对目标设备都统一进行重定向处理,无论是何种类型设备,则对于没有显示界面或者没有输入设备的设备就无法做到很好的兼容。因此,可通过识别目标设备的设备属性,以判断目标设备是否具备显示界面或信息输入的能力,在不具备显示界面或信息输入的能力时,Because if the redirection process is uniformly performed on the target devices, no matter what type of devices they are, it cannot be well compatible with devices without a display interface or without an input device. Therefore, by identifying the device attributes of the target device, it can be judged whether the target device has the ability to display the interface or information input. When it does not have the ability to display the interface or information input,

在一些实施例中,前述实施例中的预设设备属性可以包括多种设备厂商,其中,设备厂商可以是苹果、安卓、华为、小米等设备厂商,在此并不作限定。从而电子设备可根据终端发送的请求报文中能体现设备厂商的字段特征,来确定不同的重定向策略。具体地,在电子设备获取到目标设备发起的请求报文后,可以判断请求报文中的第二字段是否满足目标设备厂商对应的字段条件,当满足时,可确定与该目标设备厂商对应的重定向目标地址,其中,目标设备厂商为上述多种设备厂商中的任一设备厂商。当不满足时,电子设备可放行该请求报文,不做重定向处理。In some embodiments, the preset device attributes in the foregoing embodiments may include various device manufacturers, wherein the device manufacturers may be Apple, Android, Huawei, Xiaomi and other device manufacturers, which are not limited herein. Therefore, the electronic device can determine different redirection policies according to the field characteristics of the device manufacturer in the request message sent by the terminal. Specifically, after the electronic device obtains the request message initiated by the target device, it may determine whether the second field in the request message satisfies the field condition corresponding to the target device manufacturer, and if so, may determine a redirection target address corresponding to the target device manufacturer, wherein the target device manufacturer is any one of the above-mentioned multiple device manufacturers. When not satisfied, the electronic device may release the request message without performing redirection processing.

其中,上述第二字段可以是请求报文中能够表征目标设备的设备厂商的字段信息。例如,可以是MAC对应的字段信息。在一些实施例中,请求报文中的第二字段是否满足目标设备厂商对应的字段条件,可以是判断请求报文中的第二字段中是否存在目标设备厂商对应的关键字符。当第二字段中存在可识别出目标设备厂商的关键字符时,即可判定请求报文中的第二字段是否满足目标设备厂商对应的字段条件,从而可确定执行与目标设备厂商对应的重定向策略。Wherein, the above-mentioned second field may be field information in the request message that can represent the device manufacturer of the target device. For example, it may be field information corresponding to the MAC. In some embodiments, whether the second field in the request message satisfies the field condition corresponding to the target device manufacturer may be judging whether there is a key character corresponding to the target device manufacturer in the second field in the request message. When there is a key character that can identify the target device manufacturer in the second field, it can be determined whether the second field in the request message meets the field conditions corresponding to the target device manufacturer, so that it can be determined to execute the redirection strategy corresponding to the target device manufacturer.

步骤S430:将所述请求报文请求的地址重定向到所述目标地址。Step S430: Redirect the address requested by the request message to the target address.

在本申请实施例中,在电子设备确定出与目标设备厂商对应的目标地址之后,电子设备可将目标设备发送的请求报文请求的地址重定向到与该目标地址,该目标地址用于目标设备获取待显示的推送信息。其中,目标地址可以是与该目标设备厂商对应的推送服务器的地址。当推送服务器存在多个推送网页地址时,目标地址也可以是与该目标设备厂商具体对应的推送网页地址。In the embodiment of the present application, after the electronic device determines the target address corresponding to the target device manufacturer, the electronic device may redirect the address requested by the request message sent by the target device to the target address, and the target address is used for the target device to obtain the push information to be displayed. Wherein, the target address may be an address of a push server corresponding to the target device manufacturer. When the push server has multiple push webpage addresses, the target address may also be a push webpage address specifically corresponding to the target device manufacturer.

作为一种实施方式,电子设备可以记录并存储有预设设备厂商与重定向的目标地址的对应关系表,从而在请求报文中的指定字段满足预设设备厂商中目标设备厂商对应的字段条件时,可以从该对应关系表中,查找到对应重定向的目标地址,即确定出与目标设备厂商对应的重定向策略。As an implementation, the electronic device may record and store a correspondence table between preset device manufacturers and redirected target addresses, so that when the specified field in the request message meets the field conditions corresponding to the target device manufacturer in the preset device manufacturer, the corresponding redirected target address can be found from the correspondence table, that is, the redirection strategy corresponding to the target device manufacturer can be determined.

例如,当第一字段为请求报文中的MAC字段时,可通过MAC字段(8个字节长度)的前4个字节,判断目标设备对应的设备厂商是苹果还是安卓,从而可以根据不同的设备厂商,重定向到不同的推送服务器,从而实现差异化重定向推送。For example, when the first field is the MAC field in the request message, the first 4 bytes of the MAC field (8 bytes in length) can be used to determine whether the device manufacturer corresponding to the target device is Apple or Android, so that it can be redirected to different push servers according to different device manufacturers, thereby realizing differentiated redirection and push.

本申请实施例提供的数据处理方法,可以实现电子设备在分享热点时,根据终端发送的请求报文的字段特征所体现的设备厂商信息,执行不同的重定向策略,以向该终端推送与自身设备厂商相关的信息,提升电子设备在分享热点时的处理效果。同时也使得不同设备厂商的目标设备获取的推送信息不同,提升了热点连接时的推送信息的推送效果,既避免了推送信息的单一固定的问题,也提升了用户对推送信息的可接受度。The data processing method provided by the embodiment of the present application can implement different redirection strategies according to the device manufacturer information reflected in the field characteristics of the request message sent by the terminal when the electronic device is sharing the hotspot, so as to push information related to its own device manufacturer to the terminal, and improve the processing effect of the electronic device when sharing the hotspot. At the same time, the push information obtained by the target devices of different device manufacturers is different, which improves the push effect of the push information when the hotspot is connected, not only avoids the problem of a single fixed push information, but also improves the user's acceptance of the push information.

请参阅图6,图6示出了本申请又一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述电子设备,下面将针对图6所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Please refer to FIG. 6 , which shows a schematic flowchart of a data processing method provided in another embodiment of the present application. The data processing method is applied to the above-mentioned electronic equipment, and the flow shown in FIG. 6 will be described in detail below. The data processing method may specifically include the following steps:

步骤S510:当目标设备连接所述电子设备的热点时,获取所述目标设备发送的探测报文。Step S510: When the target device connects to the hotspot of the electronic device, obtain the detection message sent by the target device.

在本申请实施例中,步骤S510可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, for step S510, reference may be made to the content of the foregoing embodiments, and details are not repeated here.

步骤S520:当所述探测报文的URL字段在预先设置的URL字段名单中时,确定与所述URL字段对应的目标地址。Step S520: When the URL field of the detection message is in the preset URL field list, determine the target address corresponding to the URL field.

在一些实施例中,当无法根据指定字段识别目标设备的设备属性的情况,也可以通过预先设置的特定字段名单,来确定不同的重定向策略。具体地,在电子设备获取到目标设备发起的探测报文后,可以判断探测报文中的指定字段是否在预先设置的字段名单中,若在预先设置的字段名单中时,则可确定与该指定字段对应的重定向目标地址。若不在预先设置的字段名单中时,则电子设备可放行该请求报文,不做重定向处理。其中,指定字段可以是URL对应的字段信息,字段名单可以是特定的URL地址名单。In some embodiments, when the device attribute of the target device cannot be identified according to the specified field, different redirection policies may also be determined through a preset list of specific fields. Specifically, after the electronic device obtains the detection message initiated by the target device, it can determine whether the specified field in the detection message is in the preset field list, and if it is in the preset field list, it can determine the redirection target address corresponding to the specified field. If it is not in the preset field list, the electronic device can release the request message without redirection processing. Wherein, the specified field may be field information corresponding to the URL, and the field list may be a specific URL address list.

作为一种实施方式,电子设备可以记录并存储有预先设置的特定URL字段与重定向的目标地址的对应关系表,从而在请求报文中的URL字段为字段名单中的某一个特定URL字段时,可以从该对应关系表中,查找到对应重定向的目标地址,即确定出与该URL字段对应的重定向策略。As an implementation, the electronic device can record and store a preset correspondence table between a specific URL field and a redirected target address, so that when the URL field in the request message is a specific URL field in the field list, the corresponding redirected target address can be found from the correspondence table, that is, the redirection policy corresponding to the URL field can be determined.

在一些实施例中,可以将特定的URL地址设为电子设备的设备厂商对应的推送服务器地址,以保证仅有与电子设备属于同一设备厂商的目标设备接入热点时,可以重定向至该推送服务器的目标地址,可在一定程度上实现对其他设备厂商的信息封锁。In some embodiments, the specific URL address can be set as the push server address corresponding to the device manufacturer of the electronic device, so as to ensure that only the target device belonging to the same device manufacturer as the electronic device accesses the hotspot, and can be redirected to the target address of the push server, which can achieve information blocking of other device manufacturers to a certain extent.

步骤S530:将所述探测报文请求的地址重定向到所述目标地址。Step S530: Redirect the address requested by the probe message to the target address.

在本申请实施例中,在电子设备确定出与目标字段对应的目标地址之后,电子设备可将目标设备发送的请求报文请求的地址重定向到与该目标地址,该目标地址用于目标设备获取待显示的推送信息。其中,目标地址可以是与该目标字段对应的推送服务器的地址。当推送服务器存在多个推送网页地址时,目标地址也可以是与该目标字段具体对应的推送网页地址。In the embodiment of the present application, after the electronic device determines the target address corresponding to the target field, the electronic device may redirect the address requested by the request message sent by the target device to the target address, and the target address is used for the target device to obtain the push information to be displayed. Wherein, the target address may be the address of the push server corresponding to the target field. When the push server has multiple push webpage addresses, the target address may also be a push webpage address specifically corresponding to the target field.

本申请实施例提供的数据处理方法,电子设备通过在目标终端连接电子设备的无线热点时,获取目标设备发送的请求报文,当该探测报文的指定字段为预先设置的目标字段时,确定与该目标字段对应的目标地址,并基于将请求报文请求的地址重定向到该目标地址,该目标地址用于目标设备获取待显示的推送信息,从而可以实现电子设备在分享热点时,根据与终端发送的请求报文中指定字段一致的特定字段,执行对应的重定向策略,以向该终端推送与特定字段对应的信息,提升电子设备在分享热点时的处理效果。使得可以只对具有特定字段的请求报文进行重定向,实现了精准重定向,提升了热点连接时的推送信息的推送效果。In the data processing method provided by the embodiment of the present application, the electronic device obtains the request message sent by the target device when the target terminal is connected to the wireless hotspot of the electronic device, and when the specified field of the detection message is a preset target field, determines the target address corresponding to the target field, and redirects the address requested by the request message to the target address. The terminal pushes the information corresponding to the specific field to improve the processing effect of the electronic device when sharing the hotspot. It makes it possible to redirect only request packets with specific fields, realizes precise redirection, and improves the push effect of push information when hotspot connections are made.

请参阅图7,其示出了本申请实施例提供的一种数据处理装置400的结构框图。该数据处理装置400应用上述的电子设备,该数据处理装置400包括:请求获取模块410、策略确定模块420以及重定向模块430,其中,请求获取模块410用于当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文;策略确定模块420用于当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址;重定向模块430用于将所述请求报文请求的地址重定向到所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。Please refer to FIG. 7 , which shows a structural block diagram of a data processing apparatus 400 provided by an embodiment of the present application. The data processing apparatus 400 applies the above-mentioned electronic equipment, and the data processing apparatus 400 includes: a request acquisition module 410, a policy determination module 420, and a redirection module 430, wherein the request acquisition module 410 is used to acquire the request message sent by the target device when the target device is connected to the hotspot of the electronic device; the policy determination module 420 is used to determine the target address corresponding to the preset field condition when the specified field in the request message meets the preset field condition; the redirection module 430 is used to redirect the address requested by the request message to the A target address, where the target address is used by the target device to obtain push information to be displayed.

在一些实施方式中,上述预设字段条件可以是设备属性对应的字段条件,上述重定向到与所述预设字段条件对应的目标地址,可以包括:重定向到与所述设备属性对应的目标地址。In some implementations, the preset field condition may be a field condition corresponding to a device attribute, and the redirecting to the target address corresponding to the preset field condition may include: redirecting to the target address corresponding to the device attribute.

在一些实施方式中,上述设备属性可以包括设备类型和/或设备厂商。In some implementation manners, the aforementioned device attributes may include device type and/or device manufacturer.

在一些实施方式中,策略确定模块420中的所述请求报文中的指定字段满足预设字段条件,可以包括:所述请求报文中的指定字段中存在所述设备属性对应的关键字符。In some implementations, the specified field in the request message in the policy determination module 420 satisfies a preset field condition, which may include: the key character corresponding to the device attribute exists in the specified field in the request message.

在一些实施方式中,上述重定向到与所述设备属性对应的目标地址,可以包括:重定向到根据用户配置界面中的选择操作所确定的与所述设备属性对应的目标地址,所述用户配置界面包括可选择的多个设备属性以及多个目标地址。In some implementations, the above redirecting to the target address corresponding to the device attribute may include: redirecting to the target address corresponding to the device attribute determined according to the selection operation in the user configuration interface, the user configuration interface includes a plurality of selectable device attributes and a plurality of target addresses.

在一些实施方式中,上述指定字段为URL字段,所述请求报文为用于探测所述目标设备是否可以接入网络的探测报文,策略确定模块420也可以具体用于:当所述探测报文的URL字段在预先设置的URL字段名单中时,确定与所述URL字段对应的目标地址。In some implementations, the above specified field is a URL field, and the request message is a detection message for detecting whether the target device can access the network, and the policy determination module 420 may also be specifically configured to: determine the target address corresponding to the URL field when the URL field of the detection message is in a preset list of URL fields.

在一些实施方式中,上述指定字段可以包括:MAC字段、UA字段以及URL字段中的至少一种In some implementations, the above specified fields may include: at least one of the MAC field, the UA field and the URL field

在一些实施方式中,该数据处理装置400还可以包括:放行模块,用于当所述请求报文中的指定字段不满足预设字段条件时,放行所述请求报文,以供所述目标设备访问所述请求报文请求的地址。In some implementations, the data processing apparatus 400 may further include: a release module, configured to release the request message when the specified field in the request message does not meet the preset field conditions, so that the target device can access the address requested by the request message.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the devices and modules described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other forms of coupling.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.

综上所述,本申请提供的方案,电子设备通过在目标终端连接电子设备的无线热点时,获取目标设备发送的请求报文,当该请求报文中的指定字段满足预设字段条件时,可确定与该预设字段条件对应的目标地址,并将请求报文请求的地址重定向到该目标地址,该目标地址用于目标设备获取待显示的推送信息,从而可以实现电子设备在分享热点时,根据终端发送的请求报文的字段特征,执行不同的重定向策略,以向该终端推送个性化的相关信息,提升电子设备在分享热点时的处理效果。In summary, in the solution provided by this application, the electronic device obtains the request message sent by the target device when the target terminal is connected to the wireless hotspot of the electronic device. When the specified field in the request message meets the preset field conditions, the target address corresponding to the preset field condition can be determined, and the address requested by the request message is redirected to the target address. Relevant information to improve the processing effect of electronic devices when sharing hotspots.

请参考图8,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是智能手机、平板电脑、智能手表等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 8 , which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, and a smart watch. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, wherein one or more application programs may be stored in the memory 120 and configured to be executed by the one or more processors 110, and one or more programs are configured to perform the methods described in the foregoing method embodiments.

处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。Processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions of the electronic device 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 may be implemented in at least one hardware form of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable LogicArray, PLA). The processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the displayed content; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 110, but may be realized by a communication chip alone.

存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), and instructions for implementing the following various method embodiments. The storage data area can also store data created during use of the electronic device 100 (such as phonebook, audio and video data, chat record data) and the like.

请参考图9,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 9 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program codes are stored in the computer-readable medium 800, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.

计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium 800 has a storage space for program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. Program code 810 may, for example, be compressed in a suitable form.

最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements to some of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions away from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims (10)

1.一种数据处理方法,其特征在于,应用于电子设备,所述方法包括:1. A data processing method, characterized in that being applied to electronic equipment, the method comprises: 当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文;When the target device is connected to the hotspot of the electronic device, obtain the request message sent by the target device; 当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址,所述预设字段条件包括设备属性对应的字段条件;When the specified field in the request message satisfies a preset field condition, determine a target address corresponding to the preset field condition, where the preset field condition includes a field condition corresponding to a device attribute; 将所述请求报文请求的地址重定向到与所述设备属性对应的所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。Redirecting the address requested by the request message to the target address corresponding to the device attribute, where the target address is used by the target device to obtain push information to be displayed. 2.根据权利要求1所述的方法,其特征在于,所述设备属性包括设备类型和/或设备厂商。2. The method according to claim 1, wherein the device attributes include device type and/or device manufacturer. 3.根据权利要求1所述的方法,其特征在于,所述请求报文中的指定字段满足预设字段条件,包括:3. The method according to claim 1, wherein the specified field in the request message satisfies a preset field condition, including: 所述请求报文中的指定字段中存在所述设备属性对应的关键字符。Key characters corresponding to the device attributes exist in the specified fields in the request message. 4.根据权利要求1所述的方法,其特征在于,所述重定向到与所述设备属性对应的目标地址,包括:4. The method according to claim 1, wherein said redirecting to a target address corresponding to said device attribute comprises: 重定向到根据用户配置界面中的选择操作所确定的与所述设备属性对应的目标地址,所述用户配置界面包括可选择的多个设备属性以及多个目标地址。Redirecting to the target address corresponding to the device attribute determined according to the selection operation in the user configuration interface, where the user configuration interface includes a plurality of selectable device attributes and a plurality of target addresses. 5.根据权利要求1所述的方法,其特征在于,所述指定字段为URL字段,所述请求报文为用于探测所述目标设备是否可以接入网络的探测报文,所述当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址,包括:5. The method according to claim 1, wherein the specified field is a URL field, the request message is a detection message for detecting whether the target device can access the network, and when the specified field in the request message satisfies a preset field condition, determining the target address corresponding to the preset field condition includes: 当所述探测报文的URL字段在预先设置的URL字段名单中时,确定与所述URL字段对应的目标地址。When the URL field of the detection message is in the preset URL field list, determine the target address corresponding to the URL field. 6.根据权利要求1-4任一项所述的方法,其特征在于,所述指定字段包括:MAC字段、UA字段以及URL字段中的至少一种。6. The method according to any one of claims 1-4, wherein the designated field comprises: at least one of a MAC field, a UA field and a URL field. 7.根据权利要求1-5任一项所述的方法,其特征在于,所述方法还包括:7. The method according to any one of claims 1-5, characterized in that the method further comprises: 当所述请求报文中的指定字段不满足预设字段条件时,放行所述请求报文,以供所述目标设备访问所述请求报文请求的地址。When the specified field in the request message does not satisfy the preset field condition, the request message is released, so that the target device can access the address requested by the request message. 8.一种数据处理装置,其特征在于,应用于电子设备,所述装置包括:8. A data processing device, characterized in that it is applied to electronic equipment, and the device comprises: 请求获取模块,用于当目标设备连接所述电子设备的热点时,获取所述目标设备发送的请求报文;A request obtaining module, configured to obtain a request message sent by the target device when the target device is connected to the hotspot of the electronic device; 策略确定模块,用于当所述请求报文中的指定字段满足预设字段条件时,确定与所述预设字段条件对应的目标地址,所述预设字段条件包括设备属性对应的字段条件;A policy determination module, configured to determine a target address corresponding to the preset field condition when the specified field in the request message satisfies a preset field condition, and the preset field condition includes a field condition corresponding to a device attribute; 重定向模块,用于将所述请求报文请求的地址重定向到与所述设备属性对应的所述目标地址,所述目标地址用于所述目标设备获取待显示的推送信息。A redirection module, configured to redirect the address requested by the request message to the target address corresponding to the device attribute, where the target address is used by the target device to obtain push information to be displayed. 9.一种电子设备,其特征在于,包括:9. An electronic device, characterized in that it comprises: 一个或多个处理器;one or more processors; 存储器;memory; 一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行如权利要求1-7任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more application programs are configured to perform the method according to any one of claims 1-7. 10.一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-7任一项所述的方法。10. A computer-readable storage medium, wherein program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the method according to any one of claims 1-7.
CN202010773659.6A 2020-08-04 2020-08-04 Data processing method, device, electronic equipment and storage medium Active CN111953761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010773659.6A CN111953761B (en) 2020-08-04 2020-08-04 Data processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010773659.6A CN111953761B (en) 2020-08-04 2020-08-04 Data processing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111953761A CN111953761A (en) 2020-11-17
CN111953761B true CN111953761B (en) 2023-07-25

Family

ID=73339417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010773659.6A Active CN111953761B (en) 2020-08-04 2020-08-04 Data processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111953761B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626736B (en) * 2021-08-10 2023-11-17 迈普通信技术股份有限公司 URL feature learning method, device, electronic equipment and computer readable storage medium
CN114884730B (en) * 2022-05-07 2023-12-29 深信服科技股份有限公司 Request detection method, device, equipment and readable storage medium
CN115225394A (en) * 2022-07-21 2022-10-21 北京天融信网络安全技术有限公司 Message interception method and system based on domain name

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127782A (en) * 2007-07-19 2008-02-20 中兴通讯股份有限公司 Method for forceful implementation of portal service
CN105530638A (en) * 2016-01-12 2016-04-27 杭州敦崇科技股份有限公司 Free WIFI authentication system based on friend circle sharing
CN106488453A (en) * 2016-12-07 2017-03-08 上海斐讯数据通信技术有限公司 A kind of method and system of portal certification
CN106714206A (en) * 2016-09-29 2017-05-24 腾讯科技(深圳)有限公司 Method and device for detecting network connection by wireless network access point
CN107707653A (en) * 2017-09-30 2018-02-16 深圳市元征科技股份有限公司 A kind of advertisement sending method, device and vehicle intelligent equipment
CN108132973A (en) * 2017-12-06 2018-06-08 杭州迪普科技股份有限公司 Loading method and device, the computer readable storage medium of WEB jump page
CN109302437A (en) * 2017-07-25 2019-02-01 杭州萤石网络有限公司 A kind of method and apparatus redirecting website
CN109936847A (en) * 2019-04-22 2019-06-25 Oppo广东移动通信有限公司 Shared network access method, system and equipment thereof
CN109996201A (en) * 2018-01-02 2019-07-09 中国移动通信有限公司研究院 A kind of Network Access Method and the network equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8351898B2 (en) * 2009-01-28 2013-01-08 Headwater Partners I Llc Verifiable device assisted service usage billing with integrated accounting, mediation accounting, and multi-account
US8131847B2 (en) * 2009-08-12 2012-03-06 Cellco Partnership Mechanism to detect restricted access via internet hotspot

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127782A (en) * 2007-07-19 2008-02-20 中兴通讯股份有限公司 Method for forceful implementation of portal service
CN105530638A (en) * 2016-01-12 2016-04-27 杭州敦崇科技股份有限公司 Free WIFI authentication system based on friend circle sharing
CN106714206A (en) * 2016-09-29 2017-05-24 腾讯科技(深圳)有限公司 Method and device for detecting network connection by wireless network access point
CN106488453A (en) * 2016-12-07 2017-03-08 上海斐讯数据通信技术有限公司 A kind of method and system of portal certification
CN109302437A (en) * 2017-07-25 2019-02-01 杭州萤石网络有限公司 A kind of method and apparatus redirecting website
CN107707653A (en) * 2017-09-30 2018-02-16 深圳市元征科技股份有限公司 A kind of advertisement sending method, device and vehicle intelligent equipment
CN108132973A (en) * 2017-12-06 2018-06-08 杭州迪普科技股份有限公司 Loading method and device, the computer readable storage medium of WEB jump page
CN109996201A (en) * 2018-01-02 2019-07-09 中国移动通信有限公司研究院 A kind of Network Access Method and the network equipment
CN109936847A (en) * 2019-04-22 2019-06-25 Oppo广东移动通信有限公司 Shared network access method, system and equipment thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Abhay K. Meshram ; D.C. Mehetre.Optimization of Multipath Routing for Delay and Data Integrity Using Clustering in Wireless Sensor Network.《2017 International Conference on Computing, Communication, Control and Automation (ICCUBEA)》.2018, *
平安车载Wi-Fi系统的设计与实现;魏克慧;《中国优秀硕士学位论文全文数据库》;20190715;全文 *

Also Published As

Publication number Publication date
CN111953761A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CN111953761B (en) Data processing method, device, electronic equipment and storage medium
TW201842756A (en) Method, means, system, processor, and memory for intercepting malicious websites
CN104540189B (en) Equipment for surfing the net provides method and the equipment for surfing the net of wireless network access for mobile device
US10225215B2 (en) Method and system for caching input content
CN109388762B (en) Application sharing method and device
CN103269396B (en) A method and system for managing mobile terminals
CN107277025A (en) A kind of Secure Network Assecc method, mobile terminal and computer-readable recording medium
WO2017024842A1 (en) Internet access authentication method, client, computer storage medium
CN108804194B (en) Notification bar message processing method, device, user terminal and readable storage medium
CN104657201A (en) Application push method, device, equipment and system
CN104580406A (en) Method and device for synchronizing login status
KR20140123076A (en) A device control method and apparatus
US20120203859A1 (en) System and method for interaction between e-mail/web browser and communication devices
CN103279485A (en) Method and device for resource sharing
CN112291338B (en) Communication method and device and electronic equipment
CN103747016A (en) SAMBA-based fast access and control method for playing shared media files
CN107742067A (en) An identity verification method, device and system
CN104768066A (en) Data downloading method, device and terminal
CN106559315A (en) Buddy communication method and device
WO2024234837A1 (en) Login method, electronic device, and storage medium
CN114745324A (en) Device identification method, device, storage medium and routing device
CN107577933B (en) Application login method and device, computer equipment and computer readable storage medium
CN108337306A (en) Equipment searching method, device, system, terminal and storage medium
CN108282783B (en) Public wifi authentication method, device, user terminal and storage medium
WO2017193544A1 (en) Method, device, and electronic apparatus for downloading resource

Legal Events

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