WO2019076014A1 - 网页生成方法、装置、终端设备及介质 - Google Patents
网页生成方法、装置、终端设备及介质 Download PDFInfo
- Publication number
- WO2019076014A1 WO2019076014A1 PCT/CN2018/083301 CN2018083301W WO2019076014A1 WO 2019076014 A1 WO2019076014 A1 WO 2019076014A1 CN 2018083301 W CN2018083301 W CN 2018083301W WO 2019076014 A1 WO2019076014 A1 WO 2019076014A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- terminal
- data table
- page
- terminal model
- user information
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Definitions
- the present application belongs to the field of Internet technologies, and in particular, to a webpage generating method, device, terminal device, and medium.
- smart terminals such as mobile phones, tablets, smart TVs, and PCs.
- the web server generally returns different website pages for the smart terminal according to the type of the requesting terminal. For example, when the mobile phone accesses the page site A, the web server corresponding to the page site A needs to return a webpage page suitable for the mobile phone display; when the PC accesses the page site A, the webpage server corresponding to the page site A needs to be returned for the PC.
- the web page displayed by the machine can meet the display requirements of the user to a certain extent, the same type of terminal can only obtain a unified layout page. Since different terminals of the same type often have performance differences, for some terminals with lower configurations, the unified page layout may have problems such as the failure of the picture to be displayed or the protocol cannot be supported. For some terminals with higher configurations, you cannot maximize the advanced display performance.
- the embodiment of the present application provides a method, a device, a terminal device, and a medium for generating a webpage, so as to solve the problem that the webpage display effect of the terminal in the prior art is poor.
- a first aspect of the embodiment of the present application provides a webpage generating method, including:
- the terminal model corresponding to the user information exists in the preset first data table, the terminal model is read;
- the terminal model corresponding to the user information does not exist in the first data table, or the page version corresponding to the terminal model does not exist in the second data table, returning the universal version of the webpage page To the terminal, so that the terminal displays the webpage of the universal version.
- a second aspect of the embodiments of the present application provides a webpage generating apparatus, where the webpage generating apparatus includes a unit for executing the webpage generating method according to the first aspect.
- a third aspect of the embodiments of the present application provides a terminal device, including a memory and a processor, where the computer stores computer readable instructions executable on the processor, the processor executing the computer
- the steps of the web page generating method as described in the first aspect are implemented when the instructions are read.
- a fourth aspect of the embodiments of the present application provides a computer readable storage medium storing computer readable instructions, the computer readable instructions being executed by a processor to implement the first aspect as described in the first aspect The steps of the web page generation method.
- the terminal model and the page version corresponding to the user information can be identified from the pre-established data table, and the webpage corresponding to the performance is returned for the terminal of different models.
- the page achieves an adaptive page version matching effect, thereby enabling each terminal to have an optimal web page display effect.
- the terminal of the unknown performance parameter is ensured by returning the page of the universal version to the terminal.
- the web page can be displayed normally, avoiding the problem that the image cannot be displayed or the protocol cannot be supported.
- FIG. 1 is a flowchart of implementing a webpage generating method according to Embodiment 1 of the present application;
- FIG. 2 is a flowchart of implementing a webpage generating method according to Embodiment 2 of the present application
- FIG. 3 is a flowchart of a specific implementation of a webpage generating method S105 according to Embodiment 3 of the present application;
- FIG. 4 is a flowchart of implementing a webpage generating method according to Embodiment 4 of the present application.
- FIG. 5 is a flowchart of implementing a webpage generating method according to Embodiment 5 of the present application.
- FIG. 6 is a structural block diagram of a webpage generating apparatus provided in Embodiment 6 of the present application.
- FIG. 7 is a schematic diagram of a terminal device provided in Embodiment 7 of the present application.
- FIG. 1 shows an implementation flow of a webpage generating method provided by an embodiment of the present application, where the method flow includes steps S101 to S108.
- the specific implementation principle of each step is as follows.
- S101 Receive a first page access request sent by the terminal.
- the webpage generating method is applied to a web server.
- the web server is responsive to the received page access request to return the website page that the terminal needs to display.
- the terminal includes but is not limited to mobile phones, tablets, notebook computers, smart TVs, personal digital assistants (Personal Digital Assistant (PDA), PC, etc., which can communicate with the Internet and LAN.
- PDA Personal Digital Assistant
- a page access request is issued. For example, when the terminal detects that the user inputs and confirms the webpage address in the terminal browser, or receives a page link selected by the user, the page access event is triggered. At this point, the web server will receive a page access request from the terminal.
- S102 Acquire user information carried by the first page access request.
- the page access request is parsed to identify the user information in the page access request.
- User information includes UA (User Agent) information and/or login account number.
- the login account refers to the account that the user logs in on the current page site, such as the site member account.
- the login account is a mobile phone number pre-bound by the terminal user, that is, the terminal user can log in to the access page by using the mobile phone number.
- the UA information is a special string header.
- the browser running by the terminal invokes various performance parameters of the terminal to add the UA information based on the performance parameters.
- the UA information includes one or more of the operating system, version, CPU type, browser and version, browser rendering engine, plug-in information, and terminal model identifier of the terminal.
- the UA information extracted from the page access request is as follows: "Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/10.0.018; Profile/MIDP-2.0 Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413”.
- S103 Determine whether there is a terminal model corresponding to the user information in the preset first data table.
- the pre-established first data table is used for storing the correspondence between each user information and the terminal model, that is, for storing the correspondence between each UA information, the login account, and the terminal model.
- the first data table is invoked to determine from the first data table whether there is a terminal model corresponding to the UA information and the login account.
- step S105 is performed; otherwise, step S104 is performed.
- a web page of the universal version is generated based on the page resource under the page access path.
- the generic version of the web page applies to all models of the terminal, which is the lowest version of the web page.
- the generated generic version of the web page contains only text content, or, if not distorted, generates the lowest picture resource, and the like.
- the terminal model is directly read.
- S106 Determine whether a page version corresponding to the terminal model exists in the preset second data table.
- a plurality of records are stored in the second data table that is pre-established, and each record is used to store a correspondence between a terminal model and a page version.
- the page version indicates the version information of the web page, including but not limited to page versions such as Wap 1.0, Wap 2.0, HTML 5, and Web Standard.
- the page version corresponding to each terminal model is preset by the webmaster in the second data table.
- Each terminal model included in the second data table is obtained from a remote server of each connected terminal manufacturer.
- its parameter information such as the terminal model
- each terminal model in the second data table can be periodically updated based on the interface provided by the remote server.
- a record related to the terminal model is added, and the website administrator updates the page version in the record to determine a page corresponding to the terminal model. version.
- step S105 in the second data table, it is determined whether there is a page version corresponding to the terminal model.
- step S107 is performed; otherwise, step S108 is performed.
- S107 Generate a webpage page based on the page version, and return the webpage page to the terminal, so that the terminal displays the webpage page.
- the page resources stored in the web server are determined according to the page access path carried by the page access request.
- the page resources of the same data content have multiple versions, and different versions of the page resources use different protocols, development languages, or display parameters.
- a webpage page conforming to the wap1.0 version standard is generated based on the page resource under the page access path, and the generated webpage page is returned to the terminal.
- the web page of the universal version is generated based on the page resource under the page access path to return to the requesting terminal.
- the terminal model and the page version corresponding to the user information can be identified from the pre-established data table, and the webpage corresponding to the performance is returned for the terminal of different models.
- the page achieves an adaptive page version matching effect, thereby enabling each terminal to have an optimal web page display effect.
- the terminal of the unknown performance parameter is ensured by returning the page of the universal version to the terminal.
- the web page can be displayed normally, avoiding the problem that the image cannot be displayed or the protocol cannot be supported.
- the method further includes:
- the third data table is read every preset time interval, and the third data table stores the user information that the terminal type matching fails in the first data table.
- the third data table is used to record the user information of the terminal type matching failure, and the user information includes the UA information, and even the login account. Specifically, when there is no terminal model corresponding to the user information in the first data table, the user information is stored in the third data table.
- the third data table is invoked every predetermined time interval to read each record added in the third data table within the preset time period. For example, every 24 hours, each user information added to the third data table in the last 24 hours is read.
- a regular expression matching the UA information of each terminal model is separately collected.
- the regular expression is used to indicate a rule pattern that the UA information conforms to, which is represented by a rule string, which is used to filter and match the UA information.
- the regular expression matching the UA information of each terminal model may be obtained from parameter information published by the terminal manufacturer, or may be manually input by an administrator.
- S203 Detect, for each of the user information stored in the third data table, whether the UA information therein satisfies any of the regular expressions.
- the UA information in each user information read in step S201 is matched with each regular expression one by one by an internal preset regular expression engine to determine whether the UA information satisfies any regularity. expression.
- the terminal model is determined as the terminal model corresponding to the read user information according to the terminal model corresponding to the regular expression collection.
- the terminal model corresponding to the user information does not exist in the first data table. Therefore, the correspondence between the user information determined at the current time and the terminal model is added to the first data table.
- the terminal model corresponding to the user information cannot be confirmed.
- the record related to the user information is newly added in the first data table, and a prompt message is sent.
- the above prompt information includes but is not limited to an audio prompt or a pop-up prompt.
- the terminal model corresponding to the user information is re-confirmed and updated in the first data table, and the offline state is realized.
- the update of the first data table prevents the terminal model matching failure from occurring again when the same user information is detected next time, so that when the page access request carrying the user information is received again, the matching can be accurately matched. Requesting the web page of the terminal enhances the page display effect.
- the response speed of the web page can be improved by returning the web page of the general version.
- step S105 specifically includes:
- S1051 If there are multiple records related to the login account in the preset first data table, obtain an update time of each of the records.
- S1052 In the plurality of records, acquire the latest one of the records of the update time, and read the terminal model in the record.
- the embodiment of the present application is applicable to a scenario in which only a page access request with a login account is received.
- the UA information of the terminal cannot be obtained, and therefore, the accurate acquisition cannot be performed based on the foregoing S103.
- the model number of the terminal that issued the page access request is determined, and each record including the login account is detected in the first data table according to the login account resolved at the time.
- the same login account corresponding to different terminal models may appear in the multiple records detected.
- the plurality of records are sorted to determine a record whose update time is closest to the current system time, and the terminal model in the record is read.
- the method further includes:
- the fourth data table is read every preset time interval, and the fourth data table stores the terminal model in which the page version matching failure occurs in the second data table.
- the fourth data table is used to record the terminal model whose page version matching fails. Specifically, when there is no page version corresponding to the terminal model in the second data table, the terminal model is stored in the fourth data table.
- the fourth data table is invoked every predetermined time interval to read each record added in the fourth data table within the preset time period.
- S402 In the second data table, create a record related to the terminal model for each terminal model stored in the fourth data table, and prompt the administrator to input a page version corresponding to the terminal model. To improve the records related to the terminal model.
- a new record is created in the second data table, which is used to store the page version corresponding to the terminal model.
- the page version corresponding to the terminal model in the newly added record is null.
- a prompt message is sent to prompt the administrator to manually input a page version corresponding to the terminal model.
- the terminal model whose page version matching fails is recorded, and the preset time interval is reached, a page layout corresponding to the terminal model is added in the second data table, and the offline state is implemented.
- the update of the second data table avoids the occurrence of page layout matching failure when the same terminal model is detected next time, and ensures that the page access request matching the terminal model can be accurately matched and adapted.
- the page display effect is enhanced on the web page of the requesting terminal.
- the method further includes:
- S109 Send a data table call request, where the data table call request carries a active IP address and a key, to invoke the first data table when receiving the verification pass information based on the source IP address and the key And the second data table.
- the first data table and the second data table are stored in a third-party database.
- the first data table in which the user information and the terminal model correspondence relationship are pre-stored and the terminal model are stored are called.
- the second data table corresponding to the page version correspondence so the call request is sent to the third-party database.
- the above call request carries the IP address of the local web server and the key pre-agreed by the web server and the third party database.
- the third-party database extracts the IP address and key in the call request to verify its accuracy and security. Specifically, it is detected whether the IP address exists in a preset access control list and whether the key is correct. If the IP address exists in the preset access control list and the key is correct, the third-party server returns the verification pass information, thereby enabling the web server to normally invoke the first data table and the second data stored in the third-party database. table.
- the collected terminal information is stored in a third-party database, and the data table in the third-party database is used to match the terminal information after the IP address and the key are verified, thereby improving the management of the terminal data. Safety.
- FIG. 6 is a structural block diagram of the webpage generating apparatus provided by the embodiment of the present application. For the convenience of description, only parts related to the embodiment of the present application are shown.
- the apparatus includes:
- the receiving unit 61 is configured to receive a first page access request sent by the terminal.
- the first obtaining unit 62 is configured to acquire user information carried by the first page access request.
- the first reading unit 63 is configured to read the terminal model if a terminal model corresponding to the user information exists in the preset first data table.
- the generating unit 64 is configured to generate a webpage page based on the page version if a page version corresponding to the terminal model exists in the preset second data table, and return the webpage page to the terminal, to The terminal is caused to display the web page.
- a returning unit 65 configured to: if the terminal model corresponding to the user information does not exist in the first data table, or the page version corresponding to the terminal model does not exist in the second data table, The universal version of the web page is returned to the terminal to cause the terminal to display the universal version of the web page.
- the user information includes the UA information
- the webpage generating apparatus further includes:
- a second reading unit configured to read a third data table in a preset time interval, where the third data table stores the user information that the terminal model matching fails in the first data table .
- the second obtaining unit is configured to separately acquire a preset regular expression corresponding to each terminal model.
- a detecting unit configured to detect, for each of the user information stored in the third data table, whether the UA information therein satisfies any of the regular expressions.
- a first determining unit configured to determine, according to any of the regular expressions, the terminal model corresponding to the regular expression as a terminal model corresponding to the user information, and the user information and the terminal The correspondence of the model numbers is updated to the first data table.
- the user information is a login account
- the first reading unit 63 includes:
- a first obtaining subunit configured to acquire, when the plurality of records related to the login account are in the preset first data table, an update time of each of the records.
- a second obtaining subunit configured to acquire, in the plurality of records, the latest one of the records of the update time, and read the terminal model in the record.
- the foregoing webpage generating apparatus further includes:
- a third reading unit configured to read a fourth data table in a preset time interval, where the fourth data table stores the terminal model in which the page version matching failure occurs in the second data table .
- a creating unit configured to create, in the second data table, a record related to the terminal model for each terminal model stored in the fourth data table, and prompt the administrator to input a font corresponding to the terminal model The page version to complete the records related to the terminal model.
- the foregoing webpage generating apparatus further includes:
- a calling unit configured to send a data table call request, where the data table call request carries a active IP address and a key, to invoke the first when receiving the verification pass information based on the source IP address and the key A data table and the second data table.
- FIG. 7 is a schematic diagram of a terminal device according to an embodiment of the present application.
- the terminal device 7 of this embodiment includes a processor 70 and a memory 71 in which computer readable instructions 72, such as a web page generating program, executable on the processor 70 are stored.
- computer readable instructions 72 such as a web page generating program
- the processor 70 executes the computer readable instructions 72, the steps in the foregoing various webpage generating method embodiments are implemented, such as steps S101 to S108 shown in FIG.
- the processor 70 when executing the computer readable instructions 72, implements the functions of the various modules/units in the various apparatus embodiments described above, such as the functions of the units 61-65 shown in FIG.
- the computer readable instructions 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70, To complete this application.
- the one or more modules/units may be a series of computer readable instruction segments capable of performing a particular function for describing the execution of the computer readable instructions 72 in the terminal device 7.
- the terminal device 7 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
- the terminal device may include, but is not limited to, the processor 70 and the memory 71. It will be understood by those skilled in the art that FIG. 7 is only an example of the terminal device 7, and does not constitute a limitation of the terminal device 7, and may include more or less components than those illustrated, or combine some components or different components.
- the terminal device may further include an input/output device, a network access device, a bus, and the like.
- the so-called processor 70 can be a central processing unit (Central Processing Unit, CPU), can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
- the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
- the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7.
- the memory 71 may also be an external storage device of the terminal device 7, for example, a plug-in hard disk provided on the terminal device 7, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device.
- the memory 71 is configured to store the computer readable instructions and other programs and data required by the terminal device.
- the memory 71 can also be used to temporarily store data that has been output or is about to be output.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
- a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本方案提供了一种网页生成方法、装置、终端设备及介质,适用于互联网技术领域,该方法包括:接收终端发出的第一页面访问请求;获取第一页面访问请求所携带的用户信息;若预设的第一数据表中存在与用户信息对应的终端型号,则读取终端型号;若预设的第二数据表中存在与终端型号对应的页面版本,则生成基于页面版本的网页页面,并将网页页面返回至终端;若第一数据表中不存在与用户信息对应的终端型号,或第二数据表中不存在与终端型号对应的页面版本,则将通用版本的网页页面返回至终端。本方案为不同型号的终端返回与其性能相符的网页页面,使得各终端能够具有最优的网页显示效果,同时保证了未知性能参数的终端也能正常显示网页页面。
Description
本申请要求于2017年10月17日提交中国专利局、申请号为 201710966627.6 、发明名称为“网页生成方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请属于互联网技术领域,尤其涉及一种网页生成方法、装置、终端设备及介质。
随着互联网技术的发展,用户可以通过不同类型的智能终端,如手机、平板电脑、智能电视以及PC机等,来访问各种页面站点。
目前,网站服务器一般是根据请求终端的类型来为智能终端返回不同的网站页面。例如,当手机访问页面站点A时,页面站点A所对应的网站服务器需要返回适用于手机显示的网页页面;当PC机访问页面站点A时,页面站点A所对应的网站服务器需要返回适用于PC机显示的网页页面。然而,尽管这种适配方式能够在一定程度上符合用户的显示需求,但同一类型的终端也只能获取统一版式的页面。由于同一类型的不同终端往往会具有性能差异,故对于某些配置较低的终端来说,统一的页面版式可能会出现图片无法显示或者协议无法支持等问题。对于某些配置较高的终端来说,则无法最大限度地利用其所具备的高级显示效果。
综上所述,现有技术中,终端的网页显示效果相对较差。
有鉴于此,本申请实施例提供了一种网页生成方法、装置、终端设备及介质,以解决现有技术中终端的网页显示效果较差的问题。
本申请实施例的第一方面提供了一种网页生成方法,包括:
接收终端发出的第一页面访问请求;
获取所述第一页面访问请求所携带的用户信息;
若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号;
若预设的第二数据表中存在与所述终端型号对应的页面版本,则生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示;
若所述第一数据表中不存在与所述用户信息对应的终端型号,或所述第二数据表中不存在与所述终端型号对应的所述页面版本,则将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
本申请实施例的第二方面提供了一种网页生成装置,该网页生成装置包括用于执行上述第一方面所述的网页生成方法的单元。
本申请实施例的第三方面提供了一种终端设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如第一方面所述的网页生成方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如第一方面所述的网页生成方法的步骤。
本申请实施例中,通过提取页面访问请求中的用户信息,能够从预先建立的数据表中识别出与用户信息对应的终端型号以及页面版本,实现了为不同型号的终端返回与其性能相符的网页页面,达到了自适应的页面版本匹配效果,由此使得各个终端能够具有最优的网页显示效果。当预设的数据表中不存在与用户信息对应的终端型号,或不存在与所述终端型号对应的页面版本时,通过将通用版本的网页页面返回至终端,保证了未知性能参数的终端也能正常显示网页页面,避免了图片无法显示或者协议无法支持的问题出现。
图1是本申请实施例一提供的网页生成方法的实现流程图;
图2是本申请实施例二提供的网页生成方法的实现流程图;
图3是本申请实施例三提供的网页生成方法S105的具体实现流程图;
图4是本申请实施例四提供的网页生成方法的实现流程图;
图5是本申请实施例五提供的网页生成方法的实现流程图;
图6是本申请实施例六提供的一网页生成装置的结构框图;
图7是本申请实施例七提供的终端设备的示意图。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
实施例一
图1示出了本申请实施例提供的网页生成方法的实现流程,该方法流程包括步骤S101至S108。各步骤的具体实现原理如下。
S101:接收终端发出的第一页面访问请求。
在本申请实施例中,所述网页生成方法应用于网站服务器。网站服务器用于为接收到的页面访问请求做出响应,以返回终端所需展示的网站页面。其中,终端包括但不限于手机、平板电脑、笔记本电脑、智能电视机、个人数字助理(Personal
Digital Assistant,PDA)以及PC电脑等,其能够与互联网、局域网连接通信。
具体地,当终端检测到页面访问事件被触发时,发出页面访问请求。例如,当终端检测到用户在终端浏览器中输入并确认网页地址,或者接收到用户选取的页面链接时,页面访问事件被触发。此时,网站服务器将接收到终端发出的页面访问请求。
S102:获取所述第一页面访问请求所携带的用户信息。
对页面访问请求进行解析,以识别出页面访问请求中的用户信息。用户信息包括UA(User Agent,用户代理)信息和/或登录账号。登录账号是指用户在当前页面站点所登录使用的账号,如站点会员账号。优选地,上述登录账号为终端用户所预先绑定的手机号,即,终端用户可通过手机号来登录访问页面。
本申请实施例中,UA信息是一个特殊字符串头,在终端发出页面访问请求时,终端所运行的浏览器将调用终端的各项性能参数,以将基于各项性能参数的UA信息添加所需发送的页面访问请求中。UA信息中包含有终端的操作系统、版本、CPU 类型、浏览器及版本、浏览器渲染引擎、插件信息以及终端型号标识等信息中的一项或多项。
示例性地,从页面访问请求中提取得到的UA信息如下:“Mozilla/5.0
(SymbianOS/9.2; U; Series60/3.1 NokiaN95/10.0.018; Profile/MIDP-2.0
Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413”。
S103:判断预设的第一数据表中是否存在与所述用户信息对应的终端型号。
预先建立的第一数据表用于存储各用户信息以及终端型号的对应关系,即,用于存储每一UA信息、登录账号以及终端型号之间的对应关系。
当从页面访问请求中解析出UA信息以及登录账号时,调用第一数据表,以从第一数据表中判断是否存在对应于该UA信息以及登录账号的终端型号。
在判断结果为是时,执行步骤S105;否则,执行步骤S104。
S104:将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
若第一数据表中不存在与用户信息对应的终端型号,则基于页面访问路径下的页面资源,生成通用版本的网页页面。通用版本的网页页面适用于所有型号的终端,其为最低版本的网页页面。例如,生成的通用版本的网页页面仅包含文字内容,或者,在不失真的情况下,生成像素最低的图片资源等。
S105:读取所述终端型号。
基于S102中所获得的用户信息,若第一数据表中存在与该用户信息对应的终端型号,则直接读取该终端型号。
S106:判断预设的第二数据表中是否存在与所述终端型号对应的页面版本。
本申请实施例中,预先建立的第二数据表中存储有多条记录,每一条记录用于存储一终端型号及页面版本的对应关系。
页面版本表示网页页面的版本信息,包括但不限于Wap1.0、Wap2.0、HTML5版本以及Web标准版等页面版本。
每一终端型号所对应的页面版本由网站管理员预设于第二数据表中。第二数据表所包含的各个终端型号从已连接的各个终端厂商的远程服务器中获取。一般来说,当一款终端被发布时,其参数信息,如终端型号,会更新于上述终端厂商的远程服务器中。因此,基于远程服务器所提供的接口,可定时更新第二数据表中的各个终端型号。当检测到新的终端型号发布时,在第二数据表中,新增与该终端型号相关的记录,并由网站管理员更新该条记录中的页面版本,以确定与该终端型号对应的页面版本。
根据步骤S105所读取的终端型号,在第二数据表中,判断是否存在与该终端型号对应的页面版本。
在判断结果为是时,执行步骤S107;否则,执行步骤S108。
S107:生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示。
根据页面访问请求所携带的页面访问路径,确定出网站服务器中所存储的页面资源。同一数据内容的页面资源具有多种版本,不同版本的页面资源所分别使用的协议、开发语言或者显示参数不同。
根据确定出的页面版本,生成与该页面版本对应的网页页面,以将该网页页面做为终端所发出的页面访问请求的响应结果,使得终端在对该网页页面进行解析后,能够在显示屏中对该网页页面进行展示。
例如,若终端型号对应的页面版本为wap1.0,则基于页面访问路径下的页面资源,生成符合wap1.0版本标准的网页页面,并将生成的网页页面返回终端。
S108:将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
若第二数据表中不存在与终端型号对应的页面版本,则基于页面访问路径下的页面资源,生成通用版本的网页页面,以返回至请求终端。
本申请实施例中,通过提取页面访问请求中的用户信息,能够从预先建立的数据表中识别出与用户信息对应的终端型号以及页面版本,实现了为不同型号的终端返回与其性能相符的网页页面,达到了自适应的页面版本匹配效果,由此使得各个终端能够具有最优的网页显示效果。当预设的数据表中不存在与用户信息对应的终端型号,或不存在与所述终端型号对应的页面版本时,通过将通用版本的网页页面返回至终端,保证了未知性能参数的终端也能正常显示网页页面,避免了图片无法显示或者协议无法支持的问题出现。
实施例二
作为本申请的另一实施例,在上述S108之后,还包括:
S201:每隔预设的时间间隔,读取第三数据表,所述第三数据表中存储了在所述第一数据表中出现终端型号匹配失败的所述用户信息。
本申请实施例中,第三数据表用于记录终端型号匹配失败的用户信息,且用户信息中包含有UA信息,甚至还包含有登录账号。具体地,当第一数据表中不存在与用户信息对应的终端型号时,将该用户信息存储于第三数据表。
每隔预设的时间间隔,调用上述第三数据表,以对预设时长内新增于第三数据表中的各条记录进行读取。例如,每隔24小时,读取最近24小时内新增至第三数据表的各用户信息。
S202:分别获取预设的与各终端型号对应的正则表达式。
本申请实施例中,分别收集与各个终端型号的UA信息相匹配的正则表达式。正则表达式用于表示UA信息所符合的一个规则模式,其表现为一个规则字符串,用来对UA信息进行过滤及匹配。
例如,对于终端品牌为“YONE”,终端型号为“I909”的终端来说,若收集得到的关于该终端型号的每一UA信息中,均存在“YONE”以及“I909”等字符,则生成该终端型号对应的正则表达式为“*YONE*I909*”。
本申请实施例中,与各个终端型号的UA信息相匹配的正则表达式可从终端厂商所发布的参数信息中获取,也可由管理员手动输入。
在上述预设的时间间隔达到时,读取预先收集得到的各个正则表达式。
S203:对所述第三数据表中存储的每一所述用户信息,分别检测其中的所述UA信息是否满足任一所述正则表达式。
对于步骤S201中所读取的每一用户信息中的UA信息,通过内部预设的正则表达式引擎,将该UA信息与各正则表达式进行逐一匹配,以确定该UA信息是否满足任一正则表达式。
S204:若所述UA信息满足任一所述正则表达式,则将该正则表达式所对应的终端型号确定为该用户信息对应的终端型号,并将该用户信息与该终端型号的对应关系更新至所述第一数据表。
若存在与该UA信息匹配的正则表达式,则根据该正则表达式收集时所对应的终端型号,将该终端型号确定为与读取到的用户信息相对应的终端型号。
初始状态下,第一数据表中不存在该用户信息对应的终端型号,因此,将当前时刻所确定出的用户信息及其终端型号的对应关系添加至第一数据表中。
S205:若所述UA信息不满足任一所述正则表达式,则在所述第一数据表中,创建与该用户信息相关的记录,并提示管理员更新所述记录中的终端型号。
若不存在与该UA信息匹配的正则表达式,则表示无法确认与该用户信息对应的终端型号,此时,直接在第一数据表中新增与该用户信息相关的记录,并发出提示信息,以提示管理员人工输入与该用户信息对应的终端型号。上述提示信息包括但不限于音频提示或弹窗提示。
本申请实施例中,通过记录终端型号匹配失败的用户信息,并在预设的时间间隔达到时,在第一数据表中重新确认并更新与该用户信息对应的终端型号,实现了在离线状态下对第一数据表的更新,避免了下次检测到同一用户信息时会再次出现终端型号匹配失败的情况出现,以在再次接收到携带该用户信息的页面访问请求时,能够精确匹配适应于请求终端的网页页面,增强了页面显示效果。另外,在接收到页面访问请求时,若无法实时获取与用户信息对应的终端型号,则通过返回通用版本的网页页面,能够提高网页页面的响应速度。
实施例三
在上述各个实施例的基础之上,作为本申请的一个实施例,当所述用户信息仅包含登录账号时,如图3所示,上述步骤S105具体包括:
S1051:若预设的第一数据表中存在与所述登录账号相关的多条记录,则获取其中每一条所述记录的更新时间。
S1052:在所述多条记录中,获取所述更新时间最新的一条所述记录,并读取该记录中的所述终端型号。
在将用户信息以及终端型号的对应关系新增至第一数据表时,记录该对应关系的更新时间。
本申请实施例适用于仅接收到携带有登录账号的页面访问请求的场景之下,此时,对该页面访问请求进行解析后,无法获得终端的UA信息,因此,无法基于上述S103来准确获取与UA信息以及登录账号二者对应的终端型号。为了尽可能地提高终端的显示效果,确定发出页面访问请求的终端的型号,根据当时时刻所解析出的登录账号,在第一数据表中,检测出包含该登录账号的各条记录。
由于终端用户可能会使用过不同的终端来登录访问页面,故检测得到的多条记录中,会出现同一登录账号对应不同终端型号的情况。基于各条记录的更新时间与当前系统时间的接近程度,对上述多条记录进行排序,以确定出更新时间最接近当前系统时间的一条记录后,读取该记录中的终端型号。
将读取出的终端型号确定为发出页面访问请求的终端的型号,然后继续执行上述步骤S105之后的各步骤,以确定与当前时刻仅携带有登录账号的第二页面访问请求相匹配的页面版本。
基于终端用户在较为接近的时刻会使用同一终端来访问网页页面的原理,本申请实施例中,通过记录数据表中各记录的更新时间,并在接收到仅携带登录账号的页面访问请求时,读取与登录账号相关且更新时间最新的一条记录中的终端型号,能够相对准确地确定出发出页面访问请求的终端的型号,避免了终端型号匹配失败而仅能返回通用版本的网页页面的情况发生,由此增强了终端的网页页面显示效果。
实施例四
作为本申请的一个实施例,在上述实施例一的基础之上,如图4所示,在上述S108之后,还包括:
S401:每隔预设的时间间隔,读取第四数据表,所述第四数据表中存储了在所述第二数据表中出现页面版本匹配失败的所述终端型号。
本申请实施例中,第四数据表用于记录页面版本匹配失败的终端型号。具体地,当第二数据表中不存在与终端型号对应的页面版本时,将该终端型号存储于第四数据表。
每隔预设的时间间隔,调用上述第四数据表,以对预设时长内新增于第四数据表中的各条记录进行读取。
S402:在所述第二数据表中,对所述第四数据表中存储的每一终端型号,分别创建与该终端型号相关的记录,并提示管理员输入与该终端型号对应的页面版本,以完善与该终端型号相关的记录。
基于读取到每一个终端型号,在第二数据表中创建一条新的记录,该记录用于存储该终端型号对应的页面版本。初始状态下,新增记录中终端型号所对应的页面版本为空值。为了完善该记录,本申请实施例中,发出提示信息,以提示管理员需要人工输入与该终端型号对应的页面版本。
根据所述第四数据表中的各个终端型号,在更新第二数据表中与这些终端型号对应的页面版式后,返回执行上述S101。
本申请实施例未提到的步骤实现原理与其余各个实施例中的步骤实现原理相同,因此不再一一赘述。
本申请实施例中,通过记录页面版本匹配失败的终端型号,并在预设的时间间隔达到时,在第二数据表中新增与该终端型号对应的页面版式,实现了在离线状态下对第二数据表的更新,避免了下次检测到相同的终端型号时会再次出现页面版式匹配失败的情况出现,保证了在再次接收到与该终端型号匹配的页面访问请求时,能够精确匹配适应于请求终端的网页页面,增强了页面显示效果。
实施例五
作为本申请的一个实施例,在上述各个实施例的基础之上,如图5所示,在上述S103之前,还包括:
S109:发出数据表调用请求,所述数据表调用请求中携带有源IP地址以及密钥,以在接收到基于所述源IP地址以及密钥的验证通过信息时,调用所述第一数据表以及所述第二数据表。
本申请实施例中,第一数据表以及第二数据表存储于第三方数据库。在获取终端发出的页面访问请求所携带的用户信息后,为了获取与用户信息匹配的终端型号以及页面版本,需要调用预先存储有用户信息以及终端型号对应关系的第一数据表以及存储有终端型号以及页面版本对应关系的第二数据表,故向第三方数据库发出调用请求。上述调用请求携带有本端网页服务器的IP地址及网页服务器与第三方数据库所预先约定的密钥。
第三方数据库提取出调用请求中的IP地址以及密钥,以校验其准确性以及安全性。具体地,检测该IP地址是否存在于预设的访问控制列表以及检测该密钥是否正确。若该IP地址存在于预设的访问控制列表以及该密钥正确,则第三方服务器返回验证通过信息,由此使得网页服务器能够正常调用存储于第三方数据库中的第一数据表以及第二数据表。
本申请实施例中,通过将收集得到的终端信息存储于第三方数据库,并在IP地址以及密钥均验证通过后才调用第三方数据库中的数据表来匹配终端信息,提高了终端数据的管理安全。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
实施例六
对应于上文各实施例所述的网页生成方法,图6示出了本申请实施例提供的网页生成装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。
参照图6,该装置包括:
接收单元61,用于接收终端发出的第一页面访问请求。
第一获取单元62,用于获取所述第一页面访问请求所携带的用户信息。
第一读取单元63,用于若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号。
生成单元64,用于若预设的第二数据表中存在与所述终端型号对应的页面版本,则生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示。
返回单元65,用于若所述第一数据表中不存在与所述用户信息对应的终端型号,或所述第二数据表中不存在与所述终端型号对应的所述页面版本,则将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
可选地,所述用户信息中包含有UA信息,则上述网页生成装置还包括:
第二读取单元,用于每隔预设的时间间隔,读取第三数据表,所述第三数据表中存储了在所述第一数据表中出现终端型号匹配失败的所述用户信息。
第二获取单元,用于分别获取预设的与各终端型号对应的正则表达式。
检测单元,用于对所述第三数据表中存储的每一所述用户信息,分别检测其中的所述UA信息是否满足任一所述正则表达式。
第一确定单元,用于若所述UA信息满足任一所述正则表达式,则将该正则表达式所对应的终端型号确定为该用户信息对应的终端型号,并将该用户信息与该终端型号的对应关系更新至所述第一数据表。
可选地,所述用户信息为登录账号,所述第一读取单元63包括:
第一获取子单元,用于若预设的第一数据表中存在与所述登录账号相关的多条记录,则获取其中每一条所述记录的更新时间。
第二获取子单元,用于在所述多条记录中,获取所述更新时间最新的一条所述记录,并读取该记录中的所述终端型号。
可选地,上述网页生成装置还包括:
第三读取单元,用于每隔预设的时间间隔,读取第四数据表,所述第四数据表中存储了在所述第二数据表中出现页面版本匹配失败的所述终端型号。
创建单元,用于在所述第二数据表中,对所述第四数据表中存储的每一终端型号,分别创建与该终端型号相关的记录,并提示管理员输入与该终端型号对应的页面版本,以完善与该终端型号相关的记录。
可选地,上述网页生成装置还包括:
调用单元,用于发出数据表调用请求,所述数据表调用请求中携带有源IP地址以及密钥,以在接收到基于所述源IP地址以及密钥的验证通过信息时,调用所述第一数据表以及所述第二数据表。
图7是本申请一实施例提供的终端设备的示意图。如图7所示,该实施例的终端设备7包括:处理器70以及存储器71,所述存储器71中存储有可在所述处理器70上运行的计算机可读指令72,例如网页生成程序。所述处理器70执行所述计算机可读指令72时实现上述各个网页生成方法实施例中的步骤,例如图1所示的步骤S101至S108。或者,所述处理器70执行所述计算机可读指令72时实现上述各装置实施例中各模块/单元的功能,例如图6所示单元61至65的功能。
示例性的,所述计算机可读指令72可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令72在所述终端设备7中的执行过程。
所述终端设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于处理器70和存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的示例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器70可以是中央处理单元(Central
Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application
Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。所述存储器71也可以是所述终端设备7的外部存储设备,例如所述终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述终端设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机可读指令以及所述终端设备所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (20)
- 一种网页生成方法,其特征在于,包括:接收终端发出的第一页面访问请求;获取所述第一页面访问请求所携带的用户信息;若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号;若预设的第二数据表中存在与所述终端型号对应的页面版本,则生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示;若所述第一数据表中不存在与所述用户信息对应的终端型号,或所述第二数据表中不存在与所述终端型号对应的所述页面版本,则将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
- 如权利要求1所述的网页生成方法,其特征在于,所述用户信息中包含有UA信息,所述网页生成方法还包括:每隔预设的时间间隔,读取第三数据表,所述第三数据表中存储了在所述第一数据表中出现终端型号匹配失败的所述用户信息;分别获取预设的与各终端型号对应的正则表达式;对所述第三数据表中存储的每一所述用户信息,分别检测其中的所述UA信息是否满足任一所述正则表达式;若所述UA信息满足任一所述正则表达式,则将该正则表达式所对应的终端型号确定为该用户信息对应的终端型号,并将该用户信息与该终端型号的对应关系更新至所述第一数据表。
- 如权利要求1所述的网页生成方法,其特征在于,所述用户信息为登录账号,所述若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号,包括:若预设的第一数据表中存在与所述登录账号相关的多条记录,则获取其中每一条所述记录的更新时间;在所述多条记录中,获取所述更新时间最新的一条所述记录,并读取该记录中的终端型号。
- 如权利要求1所述的网页生成方法,其特征在于,还包括:每隔预设的时间间隔,读取第四数据表,所述第四数据表中存储了在所述第二数据表中出现页面版本匹配失败的所述终端型号;在所述第二数据表中,对所述第四数据表中存储的每一终端型号,分别创建与该终端型号相关的记录,并提示管理员输入与该终端型号对应的页面版本,以完善与该终端型号相关的记录。
- 如权利要求1至4任一项所述的网页生成方法,其特征在于,在所述获取所述第一页面访问请求所携带的用户信息之后,还包括:发出数据表调用请求,所述数据表调用请求中携带有源IP地址以及密钥,以在接收到基于所述源IP地址以及密钥的验证通过信息时,调用所述第一数据表以及所述第二数据表。
- 一种网页生成装置,其特征在于,包括:接收单元,用于接收终端发出的第一页面访问请求;第一获取单元,用于获取所述第一页面访问请求所携带的用户信息;第一读取单元,用于若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号;生成单元,用于若预设的第二数据表中存在与所述终端型号对应的页面版本,则生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示;返回单元,用于若所述第一数据表中不存在与所述用户信息对应的终端型号,或所述第二数据表中不存在与所述终端型号对应的所述页面版本,则将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
- 根据权利要求6所述的网页生成装置,其特征在于,所述用户信息中包含有UA信息,所述网页生成装置还包括:第二读取单元,用于每隔预设的时间间隔,读取第三数据表,所述第三数据表中存储了在所述第一数据表中出现终端型号匹配失败的所述用户信息;第二获取单元,用于分别获取预设的与各终端型号对应的正则表达式;检测单元,用于对所述第三数据表中存储的每一所述用户信息,分别检测其中的所述UA信息是否满足任一所述正则表达式;第一确定单元,用于若所述UA信息满足任一所述正则表达式,则将该正则表达式所对应的终端型号确定为该用户信息对应的终端型号,并将该用户信息与该终端型号的对应关系更新至所述第一数据表。
- 根据权利要求6所述的网页生成装置,其特征在于,所述用户信息为登录账号,所述第一读取单元包括:第一获取子单元,用于若预设的第一数据表中存在与所述登录账号相关的多条记录,则获取其中每一条所述记录的更新时间;第二获取子单元,用于在所述多条记录中,获取所述更新时间最新的一条所述记录,并读取该记录中的所述终端型号。
- 根据权利要求6所述的网页生成装置,其特征在于,还包括:第三读取单元,用于每隔预设的时间间隔,读取第四数据表,所述第四数据表中存储了在所述第二数据表中出现页面版本匹配失败的所述终端型号;创建单元,用于在所述第二数据表中,对所述第四数据表中存储的每一终端型号,分别创建与该终端型号相关的记录,并提示管理员输入与该终端型号对应的页面版本,以完善与该终端型号相关的记录。
- 根据权利要求6至9任一项所述的网页生成装置,其特征在于,还包括:调用单元,用于发出数据表调用请求,所述数据表调用请求中携带有源IP地址以及密钥,以在接收到基于所述源IP地址以及密钥的验证通过信息时,调用所述第一数据表以及所述第二数据表。
- 一种终端设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:接收终端发出的第一页面访问请求;获取所述第一页面访问请求所携带的用户信息;若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号;若预设的第二数据表中存在与所述终端型号对应的页面版本,则生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示;若所述第一数据表中不存在与所述用户信息对应的终端型号,或所述第二数据表中不存在与所述终端型号对应的所述页面版本,则将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
- 根据权利要求11所述的终端设备,其特征在于,所述用户信息中包含有UA信息,所述处理器执行所述计算机可读指令时还实现如下步骤:每隔预设的时间间隔,读取第三数据表,所述第三数据表中存储了在所述第一数据表中出现终端型号匹配失败的所述用户信息;分别获取预设的与各终端型号对应的正则表达式;对所述第三数据表中存储的每一所述用户信息,分别检测其中的所述UA信息是否满足任一所述正则表达式;若所述UA信息满足任一所述正则表达式,则将该正则表达式所对应的终端型号确定为该用户信息对应的终端型号,并将该用户信息与该终端型号的对应关系更新至所述第一数据表。
- 根据权利要求11所述的终端设备,其特征在于,所述用户信息为登录账号,所述若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号,包括:若预设的第一数据表中存在与所述登录账号相关的多条记录,则获取其中每一条所述记录的更新时间;在所述多条记录中,获取所述更新时间最新的一条所述记录,并读取该记录中的终端型号。
- 根据权利要求11所述的终端设备,其特征在于,所述处理器执行所述计算机可读指令时,还实现如下步骤:每隔预设的时间间隔,读取第四数据表,所述第四数据表中存储了在所述第二数据表中出现页面版本匹配失败的所述终端型号;在所述第二数据表中,对所述第四数据表中存储的每一终端型号,分别创建与该终端型号相关的记录,并提示管理员输入与该终端型号对应的页面版本,以完善与该终端型号相关的记录。
- 根据权利要求11至14任一项所述的终端设备,其特征在于,所述处理器执行所述计算机可读指令时,还实现如下步骤:发出数据表调用请求,所述数据表调用请求中携带有源IP地址以及密钥,以在接收到基于所述源IP地址以及密钥的验证通过信息时,调用所述第一数据表以及所述第二数据表。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:接收终端发出的第一页面访问请求;获取所述第一页面访问请求所携带的用户信息;若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号;若预设的第二数据表中存在与所述终端型号对应的页面版本,则生成基于所述页面版本的网页页面,并将所述网页页面返回至所述终端,以使所述终端对所述网页页面进行展示;若所述第一数据表中不存在与所述用户信息对应的终端型号,或所述第二数据表中不存在与所述终端型号对应的所述页面版本,则将通用版本的网页页面返回至所述终端,以使所述终端对所述通用版本的网页页面进行展示。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述用户信息中包含有UA信息,所述计算机可读指令被至少一个处理器执行时,还实现如下步骤:每隔预设的时间间隔,读取第三数据表,所述第三数据表中存储了在所述第一数据表中出现终端型号匹配失败的所述用户信息;分别获取预设的与各终端型号对应的正则表达式;对所述第三数据表中存储的每一所述用户信息,分别检测其中的所述UA信息是否满足任一所述正则表达式;若所述UA信息满足任一所述正则表达式,则将该正则表达式所对应的终端型号确定为该用户信息对应的终端型号,并将该用户信息与该终端型号的对应关系更新至所述第一数据表。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述用户信息为登录账号,所述若预设的第一数据表中存在与所述用户信息对应的终端型号,则读取所述终端型号,包括:若预设的第一数据表中存在与所述登录账号相关的多条记录,则获取其中每一条所述记录的更新时间;在所述多条记录中,获取所述更新时间最新的一条所述记录,并读取该记录中的终端型号。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时,还实现如下步骤:每隔预设的时间间隔,读取第四数据表,所述第四数据表中存储了在所述第二数据表中出现页面版本匹配失败的所述终端型号;在所述第二数据表中,对所述第四数据表中存储的每一终端型号,分别创建与该终端型号相关的记录,并提示管理员输入与该终端型号对应的页面版本,以完善与该终端型号相关的记录。
- 根据权利要求16至19任一项所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时,还实现如下步骤:发出数据表调用请求,所述数据表调用请求中携带有源IP地址以及密钥,以在接收到基于所述源IP地址以及密钥的验证通过信息时,调用所述第一数据表以及所述第二数据表。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710966627.6 | 2017-10-17 | ||
| CN201710966627.6A CN107870989A (zh) | 2017-10-17 | 2017-10-17 | 网页生成方法及终端设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019076014A1 true WO2019076014A1 (zh) | 2019-04-25 |
Family
ID=61753204
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/083301 Ceased WO2019076014A1 (zh) | 2017-10-17 | 2018-04-17 | 网页生成方法、装置、终端设备及介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107870989A (zh) |
| WO (1) | WO2019076014A1 (zh) |
Families Citing this family (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107870989A (zh) * | 2017-10-17 | 2018-04-03 | 平安科技(深圳)有限公司 | 网页生成方法及终端设备 |
| CN109376322A (zh) * | 2018-09-07 | 2019-02-22 | 平安科技(深圳)有限公司 | 一种灰度版本页面访问方法、装置、计算机设备及计算机存储介质 |
| CN109474680B (zh) * | 2018-11-02 | 2019-11-12 | 中国搜索信息科技股份有限公司 | 一种基于反向代理的移动设备属性检测方法 |
| CN109710440A (zh) * | 2018-12-14 | 2019-05-03 | 平安科技(深圳)有限公司 | 网页前端的异常处理方法、装置、存储介质及终端设备 |
| CN109831432B (zh) * | 2019-01-30 | 2021-06-01 | 重庆农村商业银行股份有限公司 | 服务提供方h5应用形式的第三方安全接入方法 |
| CN111506846B (zh) * | 2019-01-30 | 2023-05-02 | 杭州海康威视数字技术股份有限公司 | Web页面生成方法、装置、电子设备及存储介质 |
| CN109871501B (zh) * | 2019-03-11 | 2021-04-20 | 腾讯科技(深圳)有限公司 | 页面展示方法、装置、计算机可读存储介质和计算机设备 |
| CN113032058A (zh) * | 2019-12-24 | 2021-06-25 | 北京车和家信息技术有限公司 | 页面处理方法、装置及系统 |
| CN114860360B (zh) * | 2022-04-08 | 2024-09-17 | 南京四维智联科技有限公司 | 登录页面生成的方法、装置及电子设备 |
| CN114817793B (zh) * | 2022-06-24 | 2022-11-15 | 深圳市信润富联数字科技有限公司 | 页面生成方法、装置、设备及存储介质 |
| CN115168778B (zh) * | 2022-08-04 | 2026-02-03 | 广域铭岛数字科技有限公司 | 网站页面生成方法、系统、电子设备及可读存储介质 |
| CN115858979B (zh) * | 2022-12-06 | 2026-03-31 | 河北图鲲信息技术有限公司 | 一种网页访问方法及访问系统 |
| CN117290624A (zh) * | 2023-09-13 | 2023-12-26 | 北京沃东天骏信息技术有限公司 | 页面处理方法、装置、电子设备及存储介质 |
| CN119941298A (zh) * | 2025-04-10 | 2025-05-06 | 上海数禾信息科技有限公司 | 自适应分流规则生成方法、系统及介质 |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101212304A (zh) * | 2006-12-29 | 2008-07-02 | 上海亿动信息技术有限公司 | 一种对网络广告的多个备选版本选择发布的方法和装置 |
| CN101778168A (zh) * | 2010-02-05 | 2010-07-14 | 中国电信股份有限公司 | 一种移动终端浏览器上网页优化显示方法和系统 |
| CN101930439A (zh) * | 2009-06-23 | 2010-12-29 | 中国工商银行股份有限公司 | 一种适配各种型号手机的网站处理装置及其应用 |
| US20110113090A1 (en) * | 2008-06-16 | 2011-05-12 | Cellerium, Ltd. | Dynamic mobile client |
| CN103414734A (zh) * | 2013-09-05 | 2013-11-27 | 广东动易网络科技有限公司 | 用于支持不同类型终端设备访问同一网站的多屏优化技术 |
| CN103577458A (zh) * | 2012-08-01 | 2014-02-12 | 上海亿动信息技术有限公司 | 一种根据终端类型显示网页的控制方法及相应控制装置 |
| CN105117454A (zh) * | 2015-08-18 | 2015-12-02 | 浪潮软件集团有限公司 | 一种访问web产品的装置、系统和方法 |
| CN107124477A (zh) * | 2017-03-30 | 2017-09-01 | 努比亚技术有限公司 | 网站内容的处理方法、终端及服务器 |
| CN107870989A (zh) * | 2017-10-17 | 2018-04-03 | 平安科技(深圳)有限公司 | 网页生成方法及终端设备 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002259283A (ja) * | 2001-03-01 | 2002-09-13 | Sanyo Electric Co Ltd | データ提供装置及びデータ提供方法並びにプログラム |
| CN102056150B (zh) * | 2010-12-01 | 2013-08-07 | 北京迅捷英翔网络科技有限公司 | 手机终端策略适配装置及方法 |
| CN102866880A (zh) * | 2011-07-08 | 2013-01-09 | 北京亿赞普网络技术有限公司 | 移动用户自行设计手机页面布局的系统及方法 |
| CN103744985A (zh) * | 2014-01-16 | 2014-04-23 | 世纪龙信息网络有限责任公司 | 网页适配的方法和系统 |
-
2017
- 2017-10-17 CN CN201710966627.6A patent/CN107870989A/zh active Pending
-
2018
- 2018-04-17 WO PCT/CN2018/083301 patent/WO2019076014A1/zh not_active Ceased
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101212304A (zh) * | 2006-12-29 | 2008-07-02 | 上海亿动信息技术有限公司 | 一种对网络广告的多个备选版本选择发布的方法和装置 |
| US20110113090A1 (en) * | 2008-06-16 | 2011-05-12 | Cellerium, Ltd. | Dynamic mobile client |
| CN101930439A (zh) * | 2009-06-23 | 2010-12-29 | 中国工商银行股份有限公司 | 一种适配各种型号手机的网站处理装置及其应用 |
| CN101778168A (zh) * | 2010-02-05 | 2010-07-14 | 中国电信股份有限公司 | 一种移动终端浏览器上网页优化显示方法和系统 |
| CN103577458A (zh) * | 2012-08-01 | 2014-02-12 | 上海亿动信息技术有限公司 | 一种根据终端类型显示网页的控制方法及相应控制装置 |
| CN103414734A (zh) * | 2013-09-05 | 2013-11-27 | 广东动易网络科技有限公司 | 用于支持不同类型终端设备访问同一网站的多屏优化技术 |
| CN105117454A (zh) * | 2015-08-18 | 2015-12-02 | 浪潮软件集团有限公司 | 一种访问web产品的装置、系统和方法 |
| CN107124477A (zh) * | 2017-03-30 | 2017-09-01 | 努比亚技术有限公司 | 网站内容的处理方法、终端及服务器 |
| CN107870989A (zh) * | 2017-10-17 | 2018-04-03 | 平安科技(深圳)有限公司 | 网页生成方法及终端设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107870989A (zh) | 2018-04-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019076014A1 (zh) | 网页生成方法、装置、终端设备及介质 | |
| CN111414407B (zh) | 数据库的数据查询方法、装置、计算机设备及存储介质 | |
| CN109768992B (zh) | 网页恶意扫描处理方法及装置、终端设备、可读存储介质 | |
| CN111538651B (zh) | 接口测试方法、装置、服务器及存储介质 | |
| CN108667840B (zh) | 注入漏洞检测方法及装置 | |
| CN103744802A (zh) | Sql注入攻击的识别方法及装置 | |
| WO2016101635A1 (zh) | 一种同步登录状态的方法、装置、设备和计算机存储介质 | |
| WO2017167208A1 (zh) | 识别恶意网站的方法、装置及计算机存储介质 | |
| CN106649061B (zh) | 一种记录用户在web系统中的操作日志的方法与设备 | |
| US9521034B2 (en) | Method and apparatus for generating resource address, and system thereof | |
| CN110990365A (zh) | 一种数据同步方法、装置、服务器及存储介质 | |
| CN116723247A (zh) | 微服务调用方法、装置、设备及存储介质 | |
| CN114185804A (zh) | 一种接口测试方法、装置及终端设备 | |
| CN116304458B (zh) | 一种web页面实时通知更新方法、装置、设备及介质 | |
| CN108984673B (zh) | 一种文件检测方法及装置 | |
| WO2020073493A1 (zh) | Sql注入漏洞检测方法、装置、设备及可读存储介质 | |
| CN114706774A (zh) | 接口测试方法、装置、设备以及存储介质 | |
| CN114741108A (zh) | 一种浏览器补丁配置方法、系统及装置 | |
| CN111722994A (zh) | 一种任务请求的响应方法及设备 | |
| CN107133163A (zh) | 一种验证描述类api的方法与设备 | |
| CN106411891B (zh) | 文件处理方法、装置、服务端和设备 | |
| WO2020019514A1 (zh) | 一种注入漏洞检测方法及装置 | |
| CN114490752A (zh) | 一种数据获取方法、装置、电子设备和存储介质 | |
| CN109067726B (zh) | 建站系统识别方法、装置、电子设备及存储介质 | |
| CN115632885B (zh) | 蜜罐制作方法、装置、电子设备及可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 09.10.2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18868373 Country of ref document: EP Kind code of ref document: A1 |