Set-top box terminal upgrade test verification system and method based on HTTP request
Patent Information
- Application Number
- CN202310034368.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-10
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-01-10
AI Technical Summary
[0011]为解决现有技术中存在的问题,本发明的目的是提供一种基于HTTP请求的机顶盒终端升级测试验证系统及方法,本发明解决了基于HTTP的升级系统无法在机顶盒制造商的实验室环境测试的问题,并且能够同时支持集成不同HTTP请求规范的机顶盒同时批量测试
[0024] 1. This invention can realize online upgrade process testing in the laboratory of set-top box terminal manufacturers, simulating the operator environment, and can realize large-scale, high-intensity testing;
Smart Images

Figure CN116233546B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of set-top box upgrade technology, and in particular to a set-top box terminal upgrade testing and verification system and method based on HTTP requests. Background Technology
[0002] Due to the development of IP networks, most set-top boxes now adopt an IP upgrade solution. This solution is flexible and can be configured with various policies. Set-top box terminal integration is simple, but because the upgrade server is configured on the intranet of each operator, the testing process for this function is complex.
[0003] In existing solutions, most use HTTP requests to obtain upgrade information. The set-top box terminal initiates the HTTP request, and the server, after querying relevant data, replies with upgrade information to the set-top box terminal in a specific format. The terminal then parses the information and downloads the specified upgrade file. However, due to inconsistencies in server domain names, interfaces, and parameter structures, this solution can only be tested in the actual environment of the operator, resulting in the following problems:
[0004] 1. Insufficient test item coverage: The on-site testing environment is complex, and some items that require testing instruments may not be covered;
[0005] 2. Insufficient testing intensity: Since each test requires the cooperation of maintenance personnel, and these personnel need to support testing from multiple terminal manufacturers, the testing time and intensity may be insufficient.
[0006] 3. Insufficient testing equipment per test: Due to the complex on-site environment, it is often only possible to configure 1-2 set-top box devices for testing, making batch testing impossible;
[0007] 4. High testing costs: Each test requires a trip to the operator's testing site, resulting in high travel costs.
[0008] Existing solutions also involve setting up an upgrade server in the lab. When upgrading the set-top box terminal, the HTTP request specification is adjusted to adapt to the server's rules. However, the following problems still exist:
[0009] 1. Adjusting parameters on the set-top box terminal requires modifying the terminal code, so the version used during testing is not the final version, and the testing process is not rigorous.
[0010] 2. Some set-top box terminal upgrade codes are completed by third parties and cannot be modified, so this process cannot be followed for testing. Summary of the Invention
[0011] To address the problems existing in the prior art, the purpose of this invention is to provide a set-top box terminal upgrade testing and verification system and method based on HTTP requests. This invention solves the problem that HTTP-based upgrade systems cannot be tested in the laboratory environment of set-top box manufacturers, and can simultaneously support batch testing of set-top boxes integrating different HTTP request specifications.
[0012] To achieve the above objectives, the technical solution adopted by the present invention is: a set-top box terminal upgrade testing and verification system based on HTTP requests, including multiple set-top box terminals to be upgraded, and a test server. The multiple set-top box terminals and the test server are connected to the same router. The test server uses a fixed IP address, the set-top box terminals use Dynamic Host Configuration Protocol (DHCP) to obtain IP addresses, and the router points the DNS server to the test server.
[0013] This invention also discloses a set-top box terminal upgrade testing and verification method based on HTTP requests, employing the set-top box terminal upgrade testing and verification system based on HTTP requests as described above. The method includes the following steps:
[0014] Step 1: Set up a DNS service on the test server and point the domain name of the upgrade server requested by the set-top box terminal to the fixed IP address of the test server;
[0015] Step 2: Set up an HTTP server on the test server to receive HTTP upgrade requests from set-top box terminals, return specified content, and provide HTTP-based file download services.
[0016] Step 3: The HTTP server can quickly configure the request parameters and response content corresponding to different request routing addresses through JSON files, so as to return different content for different requests, and can customize URL routing rules;
[0017] Step 4: The set-top box terminal initiates an HTTP request to the corresponding upgrade address and redirects the HTTP request to the DNS service of the test server through the router;
[0018] Step 5: Intercept the HTTP requests through the server-side middleware, redirect all HTTP requests to the specified business API, and obtain the request parameter content and pass it to the business API;
[0019] Step 6: The HTTP server finds the node corresponding to the request route in the JSON file through the request route, obtains the request parameters that need to be submitted for that request route, and then compares the actual request parameters with the request parameters set in the JSON file one by one to determine whether the actual request parameters are valid.
[0020] Step 7: If the request parameters match, the HTTP server will return the response content of the corresponding request route in the JSON file; otherwise, the returned parameters will not match.
[0021] Step 8: The set-top box terminal receives the returned HTTP message, parses the corresponding parameters, and if it contains an upgrade address, requests an HTTP download of the upgrade package;
[0022] Step 9: After the set-top box terminal completes the download, perform file verification before executing the upgrade logic.
[0023] The beneficial effects of this invention are:
[0024] 1. This invention can realize online upgrade process testing in the laboratory of set-top box terminal manufacturers, simulating the operator environment, and can realize large-scale, high-intensity testing;
[0025] 2. This invention can be used to enable batch online upgrades of set-top box terminals in the manufacturer's workshop. Attached Figure Description
[0026] Figure 1 This is a topology diagram of the set-top box terminal upgrade test and verification system in an embodiment of the present invention;
[0027] Figure 2 This is a flowchart of the set-top box terminal upgrade test and verification method in an embodiment of the present invention. Detailed Implementation
[0028] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0029] Example
[0030] like Figure 1 As shown, a set-top box terminal upgrade testing and verification system based on HTTP requests includes: connecting the set-top box terminal and the test server under the same router; the test server using a fixed IP address; the set-top box terminal using Dynamic Host Configuration Protocol (DHCP) to obtain an IP address; and the router pointing the DNS server to the test server.
[0031] like Figure 2 As shown, this embodiment, based on the aforementioned set-top box terminal upgrade testing and verification system, also provides a set-top box terminal upgrade testing and verification method based on HTTP requests, including:
[0032] 1. Set up a DNS service on the test server and point the upgrade server domain name requested by the set-top box to the fixed IP address of the test server.
[0033] 2. Set up an HTTP server on the test server with the following functions:
[0034] ① Receive the HTTP upgrade request from the set-top box terminal and return the specified content;
[0035] ② Provide HTTP-based file download service.
[0036] 3. The HTTP server can quickly configure the request parameters and response content corresponding to different request route addresses through JSON files, so as to return different content for different requests, and can customize URL routing rules.
[0037] For example:
[0038] For example, the HTTP addresses of the upgrade platform that different operators need to request for their set-top boxes are as follows:
[0039] http: / / upgrade.j iuzhou.com / index? mac=0023B8112233&stbid=123456789&hardware=2606&software=1.0.1
[0040] http: / / update.baidu.com / checkupdate / stb?macaddr=0023B8112233&serialnum=123456789&hw=2606&sw=1.0.1
[0041] The two addresses differ in domain name (upgrade.jiuzhou.com and update.baidu.com), routing rules (index and checkupdate / stb), request parameters (mac, stbid, hardware, software and macaddr, serialnum, hw, sw), and response content.
[0042] The request parameters and response content formats corresponding to multiple sets of request routes are configured in the server-side JSON file as follows:
[0043]
[0044] 4. The set-top box terminal initiates an HTTP request to the corresponding upgrade address.
[0045] 5. By redirecting requests to the test server's DNS service via the router, any domain name is directed to a fixed IP address on the test server, thus resolving the issue of domain name discrepancies.
[0046] 6. By intercepting requests through server-side middleware, all requests are redirected to the specified business API, and the request parameters are retrieved and passed to the business API, thus resolving the issue of request routing discrepancies.
[0047] 7. The server finds the corresponding request route node in the JSON file through request routing, obtains the request parameters that need to be submitted for that request route, and then compares the actual request parameters with the request parameters set in the JSON file one by one to determine whether the parameters are valid, thus solving the problem of parameter discrepancies.
[0048] 8. If the request parameters match, the server will return the response content of the corresponding request route in the JSON file; otherwise, the returned parameters will not match.
[0049] 9. The set-top box terminal receives the returned HTTP message, parses the corresponding parameters, and if it contains an upgrade address, requests an HTTP download of the upgrade package.
[0050] 10. After the set-top box terminal completes the download, it performs file verification before executing the upgrade logic.
[0051] This embodiment can implement the response of HTTP upgrade requests with different domain names, paths and parameters in a single system, thus enabling different set-top box terminals to complete the entire upgrade test process in the same system.
[0052] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for testing and verifying set-top box terminal upgrades based on HTTP requests, characterized in that, A set-top box terminal upgrade testing and verification system based on HTTP requests is adopted. The system includes multiple set-top box terminals to be upgraded and a test server. The multiple set-top box terminals and the test server are connected to the same router. The test server uses a fixed IP address, and the set-top box terminals obtain IP addresses using Dynamic Host Configuration Protocol (DHCP). The router points its DNS server to the test server. The method includes the following steps: Step 1: Set up a DNS service on the test server and point the domain name of the upgrade server requested by the set-top box terminal to the fixed IP address of the test server; Step 2: Set up an HTTP server on the test server to receive HTTP upgrade requests from set-top box terminals, return specified content, and provide HTTP-based file download services. Step 3: The HTTP server configures the request parameters and response content corresponding to different request routing addresses through a JSON file, so as to return different content for different requests, and can customize URL routing rules; Step 4: The set-top box terminal initiates an HTTP request to the corresponding upgrade address and redirects the HTTP request to the DNS service of the test server through the router; Step 5: Intercept the HTTP requests through the HTTP server middleware, redirect all HTTP requests to the specified business API, and obtain the request parameter content and pass it to the business API; Step 6: The HTTP server finds the node corresponding to the request route in the JSON file through the request route, obtains the request parameters that need to be submitted for that request route, and then compares the actual request parameters with the request parameters set in the JSON file one by one to determine whether the actual request parameters match. Step 7: If the request parameters match, the HTTP server will return the response content of the corresponding request route in the JSON file; otherwise, the returned parameters will not match. Step 8: The set-top box terminal receives the returned HTTP message, parses the corresponding parameters, and if it contains an upgrade address, requests an HTTP download of the upgrade package; Step 9: After the set-top box terminal completes the download, perform file verification before executing the upgrade logic.
Citation Information
Patent Citations
Router upgrading method and system
CN105763461A
DNS-based multi-environment test access method and device
CN112532473A