CN102142939B - Method and device for testing forward pass rule - Google Patents
Method and device for testing forward pass rule Download PDFInfo
- Publication number
- CN102142939B CN102142939B CN2010102016167A CN201010201616A CN102142939B CN 102142939 B CN102142939 B CN 102142939B CN 2010102016167 A CN2010102016167 A CN 2010102016167A CN 201010201616 A CN201010201616 A CN 201010201616A CN 102142939 B CN102142939 B CN 102142939B
- Authority
- CN
- China
- Prior art keywords
- rule
- request
- forwarding
- query
- query request
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种前传规则的测试方法和装置,所述方法包括:构造前传规则查询请求并向前传规则存储装置发送;接收所述前传规则存储装置根据预设的反馈方式返回的前传规则;与预设的前传规则比较得到测试结果。通过本发明的方法,可以实现前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量。
The present invention discloses a test method and device for a forward transmission rule. The method includes: constructing a forward transmission rule query request and sending it to a storage device for the forward transmission rule; receiving the forward transmission rule returned by the storage device for the forward transmission rule according to a preset feedback mode; The test results are obtained by comparing with the preset forward pass rules. Through the method of the present invention, the efficient acquisition and testing of the forward transmission rules can be realized, and the workload of acquisition and testing of the forward transmission rules can be reduced.
Description
技术领域 technical field
本发明涉及通信领域,尤其是一种前传规则的测试方法和装置。The invention relates to the communication field, in particular to a method and device for testing a forward pass rule.
背景技术 Background technique
WAPGW(Wireless Application Protocol Gateway,WAP网关)前传规则,定义了网站和前传信息的对应关系。由于业务需要,WAPGW需要前传用户的手机号码、IP地址等信息给一些可信任的网站,这些信息涉及到用户隐私,所以前传信息控制非常重要,对不信任的网站不能前传用户信息,对可信任网站也只能前传必要的用户信息。WAP网关URL前传规则定义了对哪些网站进行信息前传及前传哪些信息。WAPGW (Wireless Application Protocol Gateway, WAP gateway) forwarding rules define the correspondence between websites and forwarding information. Due to business needs, WAPGW needs to forward the user's mobile phone number, IP address and other information to some trusted websites. This information involves user privacy, so forwarding information control is very important. For untrusted websites, user information cannot be forwarded. The website can only forward the necessary user information. The WAP gateway URL forwarding rules define which websites are forwarded and what information is forwarded.
可以前传的用户信息包括但不限于MSISDN(Mobile Station InternationalISDN Number,移动台国际ISDN号码)、MS IP、NAS IP、SGSN IP、APN(AccessPoint Name,接入点名)等。为了方便前传控制,这些信息分别用不同的前传代码表示,前传代码定义表示例如下,如表一:The user information that can be forwarded includes but is not limited to MSISDN (Mobile Station International ISDN Number, mobile station international ISDN number), MS IP, NAS IP, SGSN IP, APN (AccessPoint Name, access point name), etc. For the convenience of forwarding control, these information are represented by different forwarding codes. The definition and expression of the forwarding codes are as follows, as shown in Table 1:
表一Table I
WAPGW维护一张URL和前传代码的对应关系表,示例如下,如表二:WAPGW maintains a table of correspondence between URLs and pre-pass codes, examples are as follows, as shown in Table 2:
表二Table II
对照前传代码定义,这个表的内容表示对http://www.AAA.com需要前传MSISDN和APN,对http://www.BBB.com需要前传MSISDN,MS IP和BearerType。Compared with the definition of the forwarding code, the content of this table indicates that http://www.AAA.com needs to forward MSISDN and APN, and http://www.BBB.com needs to forward MSISDN, MS IP and BearerType.
由于Intemet业务变化频繁,运营商需要经常修改WAPGW上的URL前传规则,而且每次修改往往会涉及大量的URL,给修改后的验证工作带来很大挑战。现有技术的做法是抓取WAPGW发送到服务提供商SP的网络报文进行确认。但是发明人发现,如果设置的URL很多,这种确认方式会耗费较大工作量,据调查,某运营商每个省局每周平均修改两次前传规则,每次修改后的测试平均花费一人天的工作量。人工验证效率很低,费时费力,需要手工进行抓包和分析,如果设置的URL较多,则验证的工作量会很大。Due to frequent changes in Internet services, operators need to frequently modify URL forwarding rules on WAPGW, and each modification often involves a large number of URLs, which brings great challenges to the verification work after modification. The method in the prior art is to capture the network message sent by the WAPGW to the service provider SP for confirmation. However, the inventor found that if there are many URLs set, this confirmation method will consume a large amount of work. According to the survey, each provincial office of a certain operator modifies the pre-transmission rules twice a week on average, and each modified test costs an average of one person. day's workload. Manual verification is very inefficient, time-consuming and labor-intensive, and requires manual packet capture and analysis. If there are many URLs set, the workload of verification will be heavy.
发明内容 Contents of the invention
本发明实施例提供一种前传规则的测试方法和装置。Embodiments of the present invention provide a method and device for testing a forward pass rule.
一种前传规则的测试方法,所述方法包括:A method for testing a forward pass rule, the method comprising:
构造前传规则查询请求并向前传规则存储装置发送;Constructing a forwarding rule query request and sending it to the forwarding rule storage device;
接收所述前传规则存储装置根据预设的反馈方式返回的前传规则;receiving the forwarding rules returned by the forwarding rule storage device according to the preset feedback mode;
与预设的前传规则比较得到测试结果。The test results are obtained by comparing with the preset forward pass rules.
本发明实施例还提供了一种前传规则的测试方法,所述方法包括:The embodiment of the present invention also provides a method for testing a forward pass rule, the method comprising:
接收测试装置发送的前传规则查询请求;Receive the fronthaul rule query request sent by the test device;
根据所述前传规则查询请求,查询对应的前传规则,按照预设的反馈方式反馈给所述测试装置。According to the fronthaul rule query request, the corresponding fronthaul rule is queried, and fed back to the test device according to a preset feedback manner.
本发明实施例还提供了一种前传规则查询装置,The embodiment of the present invention also provides a fronthaul rule query device,
所述装置包括:查询请求构造模块;接收模块和比较模块;The device includes: a query request construction module; a receiving module and a comparison module;
所述查询请求构造模块,用于构造前传规则查询请求并向前传规则存储装置发送;The query request construction module is used to construct a forward rule query request and send it to the forward rule storage device;
所述接收模块,用于接收所述前传规则存储装置根据预设的反馈方式返回的前传规则;The receiving module is configured to receive the forwarding rules returned by the forwarding rule storage device according to a preset feedback method;
所述比较模块,用于将所述接收模块接收到的前传规则与预设的前传规则比较得到测试结果。The comparison module is configured to compare the forwarding rules received by the receiving module with preset forwarding rules to obtain test results.
本发明实施例还提供了一种前传规则存储装置,所述装置包括:请求接收模块,前传规则获取模块,反馈消息构造模块;The embodiment of the present invention also provides a fronthaul rule storage device, which includes: a request receiving module, a fronthaul rule acquisition module, and a feedback message construction module;
所述请求接收模块用于接收请求消息,判断如果收到的请求消息中包含前传请求查询标识,则将所述请求消息转发给前传规则获取模块;The request receiving module is used to receive a request message, and if the received request message contains a prequel request query identifier, forward the request message to the prequel rule acquisition module;
所述前传规则获取模块用于根据所述请求接收模块接收到的前传规则查询消息,获取对应的前传规则;The forwarding rule acquisition module is used to obtain the corresponding forwarding rule according to the forwarding rule query message received by the request receiving module;
所述反馈消息构造模块用于将所述获取的前传规则,以预设的反馈方式构造反馈消息并发送。The feedback message constructing module is used to construct and send a feedback message in a preset feedback manner based on the obtained forward transmission rule.
本发明实施例通过在前传规则存储装置和测试装置间约定前传规则的反馈方式,通过测试装置主动构造查询请求,并接收前传规则存储装置根据预设的反馈方式返回的前传规则,实现前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量,提高了前传规则测试效率。In the embodiment of the present invention, the feedback method of the fronthaul rule is stipulated between the fronthaul rule storage device and the test device, the test device actively constructs a query request, and receives the fronthaul rule returned by the fronthaul rule storage device according to the preset feedback method, so as to realize the fronthaul rule. Efficient acquisition and testing reduces the workload of acquiring and testing fronthaul rules and improves the efficiency of fronthaul rule testing.
附图说明 Description of drawings
图1为本发明实施例一前传规则测试方法流程图;FIG. 1 is a flow chart of a method for testing a prequel rule according to an embodiment of the present invention;
图2为本发明实施例二前传规则测试信令流程图;FIG. 2 is a signaling flow chart of the pre-transmission rule test in Embodiment 2 of the present invention;
图3为本发明实施例三前传规则测试信令流程图;Fig. 3 is a flow chart of the signaling of the fronthaul rule test in the third embodiment of the present invention;
图4为本发明实施例四前传规则测试装置结构图;FIG. 4 is a structural diagram of a prequel rule test device according to Embodiment 4 of the present invention;
图5为本发明实施例五前传规则存储装置结构图。FIG. 5 is a structural diagram of a prequel rule storage device according to Embodiment 5 of the present invention.
具体实施方式 Detailed ways
实施例一、Embodiment one,
本发明实施例通过在前传规则存储装置和测试装置间约定前传规则的反馈方式,通过测试装置主动构造查询请求,并接收前传规则存储装置根据预设的反馈方式返回的前传规则,通过与测试装置中预设的正确的前传规则比较,来实现前传规则的获取和测试,参考附图1,本发明实施例的步骤如下:In the embodiment of the present invention, the feedback method of the fronthaul rule is stipulated between the fronthaul rule storage device and the test device, and the test device actively constructs a query request, and receives the fronthaul rule returned by the fronthaul rule storage device according to the preset feedback method, and communicates with the test device The comparison of the correct pre-transmission rules preset in , to realize the acquisition and testing of the pre-transmission rules, with reference to accompanying drawing 1, the steps of the embodiment of the present invention are as follows:
S101、构造前传规则查询请求并向前传规则存储装置发送;S101. Construct a forwarding rule query request and send it to the forwarding rule storage device;
由于现有的前传规则的获取,都是通过抓取网络报文来实现的,效率低,难度大,本发明实施例通过主动构造前传规则查询请求并向存储有待测试前传规则的存储装置发送,来实现对实际网络中应用的前传规则的获取。Since the acquisition of existing pre-transmission rules is achieved by grabbing network messages, the efficiency is low and the difficulty is high. The embodiment of the present invention actively constructs a pre-transmission rule query request and sends it to the storage device storing the pre-transmission rules to be tested. To realize the acquisition of the fronthaul rules applied in the actual network.
S102、接收所述前传规则存储装置根据预设的反馈方式返回的前传规则;S102. Receive the forwarding rule returned by the forwarding rule storage device according to the preset feedback mode;
如前所述,由于测试装置和前传规则存储装置约定了反馈方式,则前传规则存储装置在收到查询请求后,根据预设的反馈方式返回其所存储的前传规则数据;As mentioned above, since the test device and the fronthaul rule storage device agree on a feedback method, the fronthaul rule storage device returns the stored fronthaul rule data according to the preset feedback method after receiving the query request;
由于前传规则可能涉及用户的隐私或者不愿意公开的信息,在本步骤中,前传规则存储装置在收到查询请求后,可以进一步对所述查询请求进行鉴权,以保证查询方的合法性,在鉴权通过后,再进行前传规则的查询和反馈。Since the fronthaul rules may involve the user's privacy or information that is unwilling to be disclosed, in this step, after the fronthaul rule storage device receives the query request, it can further authenticate the query request to ensure the legitimacy of the query party. After passing the authentication, query and feedback the forwarding rules.
S103、与预设的前传规则比较得到测试结果。S103. Obtain a test result by comparing it with a preset forward pass rule.
测试装置收到前传规则存储装置反馈的前传规则后,即可判断所述前传规则和用户或者其他第三方的设定的结果是否一致,得到并展示出测试结果。After the test device receives the forward transmission rules fed back by the forward transmission rule storage device, it can judge whether the said forward transmission rules are consistent with the results set by the user or other third parties, and obtain and display the test results.
本发明实施例通过在前传规则存储装置和测试装置间约定前传规则的反馈方式,通过测试装置主动构造查询请求,并接收前传规则存储装置根据预设的反馈方式返回的前传规则,实现前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量,提高了前传规则测试效率。In the embodiment of the present invention, the feedback method of the fronthaul rule is stipulated between the fronthaul rule storage device and the test device, the test device actively constructs a query request, and receives the fronthaul rule returned by the fronthaul rule storage device according to the preset feedback method, so as to realize the fronthaul rule. Efficient acquisition and testing reduces the workload of acquiring and testing fronthaul rules and improves the efficiency of fronthaul rule testing.
实施例二Embodiment two
本发明实施例二以测试装置向WAP网关请求前传规则为例,对本发明实施例一的方法进行说明;本实施例方法为:测试装置与WAPGW预设前传规则查询请求以及响应方式,测试开始时,测试装置向WAPGW发送特殊HTTP请求,该HTTP请求的URL就是要查询的URL,WAPGW根据预先的约定的反馈方式,判断出这是前传规则测试请求后,查询缓存中URL、前传代码对照表,将查询到的前传代码以HTTP头的形式回应给测试装置。测试装置得到回应后,根据预先的约定的反馈方式,解析出前传代码,与客户设置的规则进行比较,得出前传字段是否正确。Embodiment 2 of the present invention takes the test device requesting the pre-transmission rules from the WAP gateway as an example to illustrate the method of Embodiment 1 of the present invention; the method in this embodiment is: the test device and the WAPGW preset pre-transmission rule query request and response mode, when the test starts , the test device sends a special HTTP request to WAPGW, and the URL of the HTTP request is the URL to be queried. After WAPGW judges that this is a pre-pass rule test request according to the pre-agreed feedback method, it queries the URL in the cache and the pre-pass code comparison table. Respond to the test device with the queried forward code in the form of HTTP header. After the test device gets the response, it analyzes the pre-transmission code according to the pre-agreed feedback method, compares it with the rules set by the customer, and finds out whether the pre-transmission field is correct.
参考附图2,具体流程说明如下:Referring to accompanying drawing 2, the specific process is described as follows:
S201、测试装置构造测试请求;S201. The test device constructs a test request;
测试请求是HTTP请求。例如,测试装置要查询URL为:http://www.111.com对应的前传规则,于是,在测试请求中包含x-aaa-TestType字段来标识该请求为测试请求,并将其值设置为1,表示是对前传规则进行测试;当然,也可以定义其他标识以及设置标识中的值为其他的值,本实施例在此不做限定。Test requests are HTTP requests. For example, the test device needs to query the forwarding rules corresponding to the URL: http://www.111.com, so the x-aaa-TestType field is included in the test request to identify the request as a test request, and its value is set to 1, means to test the fronthaul rule; of course, other flags can also be defined and the values in the flags can be set to other values, which are not limited in this embodiment.
S202、测试装置向WAPGW发送所述HTTP请求;S202. The test device sends the HTTP request to the WAPGW;
所述请求中包含有查询的URL以及测试标识。The request includes a query URL and a test identifier.
S203、WAPGW收到请求后,检测出请求消息中带有“x-aaa-TestType:1”字段,根据预先的约定,判断出这是一个前传规则测试请求;S203. After receiving the request, the WAPGW detects that the request message contains the "x-aaa-TestType: 1" field, and judges that this is a fronthaul rule test request according to the pre-agreement;
S204、对查询方进行鉴权;S204. Authenticate the inquiring party;
为了保护用户隐私,防止普通用户获取URL前传规则信息,WAPGW可以对测试装置进行鉴权,例如,对测试装置的IP地址进行鉴权,只允许设定的IP地址发起前传规则测试,对于其他IP地址的请求按正常业务请求处理或者不处理等。In order to protect user privacy and prevent ordinary users from obtaining URL forwarding rule information, WAPGW can authenticate the test device, for example, authenticate the IP address of the test device, and only allow the set IP address to initiate the forwarding rule test. For other IP Address requests are processed or not processed as normal business requests.
S205、WAPGW查询请求URL的前传规则;S205. WAPGW queries the forwarding rules of the request URL;
查询在WAPGW上缓存的,http://www.111.com对应的前传规则。Query the forwarding rules corresponding to http://www.111.com cached on WAPGW.
S206、WAPGW构造查询结果消息;S206, WAPGW constructs a query result message;
WAPGW构造查询结果消息并回应,在回应的查询结果消息中加入前传字段信息。具体的,WAPGW在前传规则响应字段x-aaa-FwdHeaders中标识出查询到的前传规则,如:aaa-FwdHeaders:1,8,其中1,8是前传代码,参照前面背景技术中的示例,这个回应表示对http://www.111.com这个URL,WAPGW会前传MSISDN和APN两个字段。当然,前传规则响应还可以是其他字符串,本实施例在此不做限定。WAPGW constructs a query result message and responds, and adds prequel field information to the response query result message. Specifically, WAPGW identifies the queried forwarding rules in the forwarding rule response field x-aaa-FwdHeaders, such as: aaa-FwdHeaders: 1, 8, where 1, 8 are the forwarding codes, referring to the previous example in the background technology, this The response indicates that for the URL http://www.111.com, WAPGW will forward the two fields of MSISDN and APN. Certainly, the fronthaul rule response may also be other character strings, which is not limited in this embodiment.
S207、WAPGW发送查询结果消息给测试装置;S207, WAPGW sends a query result message to the test device;
S208-210、测试装置解析前传字段,判断与用户设定的前传字段是否符合,并可以将结果展现出来;S208-210. The test device parses the prequel field, judges whether it matches the prequel field set by the user, and displays the result;
测试装置在接收到回应后,解析x-aaa-FwdHeaders字段,得出当前URL的前传字段是1和8,判断与用户导入的规则是否一致,将结果展现给用户。After receiving the response, the test device parses the x-aaa-FwdHeaders field, and finds that the prequel fields of the current URL are 1 and 8, judges whether it is consistent with the rules imported by the user, and presents the result to the user.
本发明实施例的方法,测试装置和WAP网关事先约定,通过在HTTP请求中加入特殊字段表示前传规则测试,WAPGW收到前传规则查询请求后不进行业务处理直接查询URL前传规则,并通过相应的字段通知测试装置,实现了前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量,提高了前传规则测试效率。由于本实施例是在HTTP协议基础上实现,不需要对现有流程作出很大的改动,实现简单方便。另外,通过由WAPGW对前传规则测试方进行鉴权的方式,进一步保证了前传规则测试和用户隐私的安全性。In the method of the embodiment of the present invention, the test device and the WAP gateway agree in advance that by adding a special field in the HTTP request to indicate the forwarding rule test, the WAPGW directly queries the URL forwarding rule without performing business processing after receiving the forwarding rule query request, and passes the corresponding The field notification test device realizes the efficient acquisition and testing of the fronthaul rules, reduces the workload of the fronthaul rule acquisition and testing, and improves the efficiency of the fronthaul rule testing. Since this embodiment is implemented on the basis of the HTTP protocol, there is no need to make great changes to the existing process, and the implementation is simple and convenient. In addition, the WAPGW authenticates the fronthaul rule tester, which further ensures the security of the fronthaul rule test and user privacy.
实施例三Embodiment Three
本发明实施例利用网管模块,又称之为OAM(operation administration andmaintenance,操作维护管理)模块来实现对前传规则的获取和测试。The embodiment of the present invention utilizes the network management module, also known as the OAM (operation administration and maintenance, operation, maintenance and management) module, to realize the acquisition and testing of the forward transmission rules.
由于业务模块节点都需要与OAM保持连接,每个业务模块节点都会被分配一个唯一的节点ID(NodeID),这样,可以在OAM和某个业务模块节点(NodeN)之间约定前传规则反馈方式,例如可以定义URL前传规则查询消息和查询响应消息,消息定义示例如下:Since all business module nodes need to maintain connection with OAM, each business module node will be assigned a unique node ID (NodeID), so that the forward transmission rule feedback method can be agreed between OAM and a certain business module node (NodeN), For example, URL forwarding rule query messages and query response messages can be defined. Examples of message definitions are as follows:
查询请求消息格式,如表三:Query request message format, as shown in Table 3:
表三Table three
查询响应消息格式,如表四:Query response message format, as shown in Table 4:
表四Table four
具体实施的时候还可以再添加一个UI(User Interface,用户接口)模块,负责用户操作和结果展示,由UI模块发起查询消息到OAM,OAM将查询消息转发到正确的业务模块节点,将从业务模块节点查询到的消息返回给UI模块,UI模块得到回应后解析出查询结果,判断与用户导入的前传规则是否一致,将结果展现给用户。During specific implementation, a UI (User Interface, user interface) module can be added to be responsible for user operations and result display. The UI module initiates a query message to OAM, and OAM forwards the query message to the correct The message queried by the module node is returned to the UI module. After receiving the response, the UI module parses out the query result, judges whether it is consistent with the forwarding rules imported by the user, and presents the result to the user.
具体的,参考附图3,本发明实施例具体说明如下:Specifically, with reference to accompanying drawing 3, the specific description of the embodiment of the present invention is as follows:
S301、UI构造如表三所示的查询请求消息;S301. The UI constructs a query request message as shown in Table 3;
S302、UI发送查询请求给OAM;S302. The UI sends a query request to the OAM;
所述通过UI发送给OAM的查询请求包含有被查询的NodeN的ID,并且,所述消息中包含有MsgType(消息类型),表示是URL前传规则查询消息。The query request sent to the OAM through the UI includes the ID of the NodeN to be queried, and the message includes a MsgType (message type), indicating that it is a URL forwarding rule query message.
S303、OAM查询NodeN对应的IP地址;S303. The OAM queries the IP address corresponding to the NodeN;
由于OAM保存有NodeN的ID和IP地址的对应关系,所以可以查询到NodeN对应的IP地址。Since the OAM stores the correspondence between the ID of the NodeN and the IP address, the IP address corresponding to the NodeN can be queried.
S304、OAM转发查询请求给NodeN;S304. The OAM forwards the query request to NodeN;
S305、NodeN进行URL前传规则查询,并构造回应消息;S305, NodeN performs URL forwarding rule query, and constructs a response message;
所述构造的回应消息可以如表四所示,MsgType标识了该响应消息是URL前传规则查询响应;在消息的FwdHeaders字段中,标识了前传规则信息,如前传代码1,6,8。The constructed response message may be as shown in Table 4. The MsgType identifies that the response message is a URL forwarding rule query response; in the FwdHeaders field of the message, forwarding rule information is identified, such as forwarding codes 1, 6, and 8.
S306、NodeN发送回应消息给OAM;S306. NodeN sends a response message to OAM;
S307、OAM转发查询回应消息给UI;S307. The OAM forwards the query response message to the UI;
S308、UI解析前传字段信息;S308. The UI parses the prequel field information;
S309、UI判断解析出的前传代码和用户设定的是否一致;S309. The UI judges whether the parsed forward code is consistent with the one set by the user;
S310、UI展示测试结果。S310. The UI displays the test result.
在所述步骤S305之前,NodeN在收到查询请求后,可以进一步验证请求发送方的合法性。Before the step S305, after receiving the query request, the NodeN may further verify the legitimacy of the request sender.
本发明实施例,通过预先定义的OAM和NodeN之间的前传规则查询消息和查询响应消息,由OAM将前传规则查询请求发送给相应的被查询节点,并接收相应节点返回的包含前传规则的响应,实现了前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量。In the embodiment of the present invention, through the pre-defined forwarding rule query message and query response message between OAM and NodeN, the OAM sends the forwarding rule query request to the corresponding queried node, and receives the response containing the forwarding rule returned by the corresponding node , which realizes the efficient acquisition and testing of fronthaul rules, and reduces the workload of acquisition and testing of fronthaul rules.
实施例四、Embodiment four,
本发明实施例提供了一种前传规则测试装置,所述测试装置可以是一个计算机,包含存储器,处理器以及信息输入和输出接口,如图4所示,该装置包括:查询请求构造模块401;接收模块402,比较模块403;An embodiment of the present invention provides a fronthaul rule testing device. The testing device may be a computer, including a memory, a processor, and an information input and output interface. As shown in FIG. 4 , the device includes: a query
所述查询请求构造模块401,用于构造前传规则查询请求并向前传规则存储装置发送;具体的,可以通过在查询请求中包含前传规则查询标识,来表明所述查询请求是对前传规则的查询。例如,在HTTP请求中包含x-aaa-TestType字段来标识该请求为测试请求,并将其值设置为1,表示是对前传规则进行测试;当然,也可以定义其他标识以及设置标识中的值为其他的值,本实施例在此不做限定。The query
所述接收模块402,用于接收所述前传规则存储装置根据预设的反馈方式返回的前传规则;具体的,所述前传规则存储装置可以在x-aaa-FwdHeaders中标识出查询到的前传规则,如:aaa-FwdHeaders:1,8,其中1,8是前传代码。The receiving
所述比较模块403,用于将所述接收模块402接收到的前传规则与预设的前传规则比较得到测试结果。例如,比较模块在接收到前传规则存储装置的回应后,解析返回的消息中的x-aaa-FwdHeaders字段,得出当前URL的前传字段是1和8,判断与用户导入的规则是否一致,将结果展现给用户。The
本发明实施例提供的测试装置通过主动构造查询请求,并接收前传规则存储装置根据预设的反馈方式返回的前传规则,实现前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量,提高了前传规则测试效率。The test device provided by the embodiment of the present invention realizes the efficient acquisition and testing of the fronthaul rules by actively constructing the query request and receiving the fronthaul rules returned by the fronthaul rule storage device according to the preset feedback mode, and reduces the workload of the fronthaul rule acquisition and testing , improving the test efficiency of the forward pass rule.
实施例五Embodiment five
本发明实施例提供了一种前传规则存储装置,所述装置可以是一种网络节点,如WAP网关;如图5所示,所述装置包括:请求接收模块501,前传规则获取模块502,反馈消息构造模块503;An embodiment of the present invention provides a fronthaul rule storage device, the device may be a network node, such as a WAP gateway; as shown in Figure 5, the device includes: a
所述请求接收模块501,用于接收请求消息,判断如果收到的请求消息中包含前传请求查询标识,则将所述请求消息转发给前传规则获取模块;The
例如,所述请求消息可以是HTTP请求,所述HTTP请求中包含x-aaa-TestType字段来标识该请求为测试请求,该字段值为1,表示是对前传规则进行测试;当然,也可以定义其他标识以及设置标识中的值为其他的值,本实施例在此不做限定。For example, the request message may be an HTTP request, and the HTTP request includes an x-aaa-TestType field to identify the request as a test request, and the value of this field is 1, indicating that the pre-transmission rule is tested; of course, it is also possible to define Values in other identifiers and setting identifiers are other values, which are not limited in this embodiment.
所述前传规则获取模块502,用于根据所述请求接收模块501接收到的前传规则查询消息,获取对应的前传规则;The fronthaul
所述反馈消息构造模块503,用于根据预设的反馈方式构造反馈消息并将所述获取的前传规则通过所述构造的反馈消息发送。例如,对于HTTP请求,反馈消息构造模块503可以在x-aaa-FwdHeaders中标识出查询到的前传规则,如:aaa-FwdHeaders:1,8,其中1,8是前传代码。The feedback
本发明实施例提供的前传规则存储装置,通过识别出前传规则请求消息后,查询到相应的前传规则,并按照预设的反馈方式反馈给测试装置,实现前传规则的高效获取和测试,减轻了前传规则获取和测试的工作量,提高了前传规则测试效率。The fronthaul rule storage device provided by the embodiment of the present invention, after identifying the fronthaul rule request message, queries the corresponding fronthaul rule, and feeds back to the test device according to the preset feedback mode, so as to realize the efficient acquisition and testing of the fronthaul rule and reduce the The workload of acquiring and testing the fronthaul rules improves the test efficiency of the fronthaul rules.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括如下步骤:Those of ordinary skill in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium, and the program can be executed when executed , including the following steps:
构造前传规则查询请求并向前传规则存储装置发送;Constructing a forwarding rule query request and sending it to the forwarding rule storage device;
接收所述前传规则存储装置根据预设的反馈方式返回的前传规则;receiving the forwarding rules returned by the forwarding rule storage device according to the preset feedback mode;
与预设的前传规则比较得到测试结果。The test results are obtained by comparing with the preset forward pass rules.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like.
最后应说明的是:以上实施例仅用以说明本发明的技术方案而非对其进行限制,尽管参照较佳实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对本发明的技术方案进行修改或者等同替换,而这些修改或者等同替换亦不能使修改后的技术方案脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: it still Modifications or equivalent replacements can be made to the technical solutions of the present invention, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2010102016167A CN102142939B (en) | 2010-06-12 | 2010-06-12 | Method and device for testing forward pass rule |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2010102016167A CN102142939B (en) | 2010-06-12 | 2010-06-12 | Method and device for testing forward pass rule |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102142939A CN102142939A (en) | 2011-08-03 |
| CN102142939B true CN102142939B (en) | 2013-12-04 |
Family
ID=44410193
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2010102016167A Expired - Fee Related CN102142939B (en) | 2010-06-12 | 2010-06-12 | Method and device for testing forward pass rule |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102142939B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108388512B (en) * | 2018-02-13 | 2021-07-02 | 创新先进技术有限公司 | Data processing method and server |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1856790A (en) * | 2003-07-22 | 2006-11-01 | 基诺技术公司 | Information access using ontologies |
| CN101572608A (en) * | 2009-06-17 | 2009-11-04 | 杭州华三通信技术有限公司 | Method and device for acquiring once-login parameters |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8151323B2 (en) * | 2006-04-12 | 2012-04-03 | Citrix Systems, Inc. | Systems and methods for providing levels of access and action control via an SSL VPN appliance |
| US8615800B2 (en) * | 2006-07-10 | 2013-12-24 | Websense, Inc. | System and method for analyzing web content |
-
2010
- 2010-06-12 CN CN2010102016167A patent/CN102142939B/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1856790A (en) * | 2003-07-22 | 2006-11-01 | 基诺技术公司 | Information access using ontologies |
| CN101572608A (en) * | 2009-06-17 | 2009-11-04 | 杭州华三通信技术有限公司 | Method and device for acquiring once-login parameters |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102142939A (en) | 2011-08-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20130246504A1 (en) | Method for subscribing to notification, apparatus and system | |
| CN103391504B (en) | The method and device that a kind of flow is reminded | |
| CN102739684B (en) | Portal authentication method based on virtual IP address, and server thereof | |
| CN101695164A (en) | Verification method, device and system for controlling resource access | |
| CN104994504A (en) | Secure and automatic connection to wireless network | |
| CN102884764A (en) | Message receiving method, deep packet inspection device, and system | |
| CN102571857A (en) | Method and system for realizing logging in XMPP (Xmlbased Messaging and Presence Protocol) server | |
| CN102339285A (en) | Method and system for automatically matching web application with terminal and network side equipment | |
| CN103929482A (en) | A method and device for securely accessing monitoring front-end equipment | |
| CN101370159B (en) | A method, device and system for identifying services | |
| CN105813078A (en) | Network authentication method, device and system and AP (ACCESS POINT) with authentication function | |
| US20070088848A1 (en) | Method for limiting the number of times to forward a multimedia message in MMSC | |
| CN103249044A (en) | Method, system and device for accessing self-hold business to terminal through MiFi | |
| CN100415006C (en) | Short message URL device and system and method for realizing short message value-added service | |
| US8010087B2 (en) | Mobile carrier capability | |
| CN102142939B (en) | Method and device for testing forward pass rule | |
| US20120195294A1 (en) | Managing access gateways | |
| CN105790944A (en) | Wechat-based network authentication method and device | |
| CN101668011B (en) | Method and system for realizing industrial application platform multimedia message transmission in different places | |
| US9160811B2 (en) | Client provisioning with enhanced linking | |
| CN102244844A (en) | Method for transmitting multimedia message, device and system | |
| CN105338530B (en) | The display methods and display system of wireless connection | |
| CN101156400B (en) | A method and system for processing messages in multimedia message service | |
| US20160234685A1 (en) | Methods and Devices for Processing Identification Information | |
| CN102572696A (en) | Method for processing service request, apparatus and system thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20131204 Termination date: 20160612 |