WO2016101753A1 - 请求信息统一处理的方法和装置 - Google Patents

请求信息统一处理的方法和装置 Download PDF

Info

Publication number
WO2016101753A1
WO2016101753A1 PCT/CN2015/095466 CN2015095466W WO2016101753A1 WO 2016101753 A1 WO2016101753 A1 WO 2016101753A1 CN 2015095466 W CN2015095466 W CN 2015095466W WO 2016101753 A1 WO2016101753 A1 WO 2016101753A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
processing
parameter
information
function module
Prior art date
Application number
PCT/CN2015/095466
Other languages
English (en)
French (fr)
Inventor
陈健
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2016101753A1 publication Critical patent/WO2016101753A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the present invention relates to the technical field of terminal devices, and in particular, to a method and apparatus for requesting unified processing of information.
  • the server will receive a large amount of request information, which undoubtedly increases the pressure on the server to process data.
  • the ability of the server to process data directly affects the user experience.
  • AJAX Asynchronous JavaScript And XML
  • AJAX technology can be used to process different request information, for example, AJAX technology to process requests for obtaining data information; AJAX technology to send data
  • the request for information is processed; the request for short text is processed by AJAX technology; the request for cross-domain communication is processed by AJAX technology; the request for time delay response is processed by AJAX technology; and only AJAX technology is used for the same time
  • the request of the data information can be sent for processing, etc., and the type of the request information does not include only the above types, and details are not described herein again.
  • the data information processing process for the request is extremely cumbersome, which increases the pressure on the server to process the data, and at the same time reduces the efficiency of requesting information processing.
  • the present invention has been made in order to provide a method and a corresponding apparatus for uniformly processing request information that overcomes the above problems or at least partially solves or alleviates the above problems.
  • a method for uniformly processing request information including:
  • the processing result is sent to the function module.
  • an apparatus for requesting unified processing of information includes:
  • a request receiving module configured to receive a request sent by a function module in a webpage
  • a request parameter obtaining module configured to obtain a request parameter of the request
  • a determining module configured to determine, according to the obtained request parameter, the request information, to obtain a determination result
  • a processing module configured to: if the determination result shows that the request is the same request as the previous request, read the previously processed processing result from the local cache; and send the processing result to the function module.
  • a computer program comprising computer readable code that, when executed on a computing device, causes the computing device to perform request information unification as described above The method of processing.
  • a computer readable medium storing a computer program as described above is provided.
  • the request information is determined, in particular, by the obtained request parameter to obtain a determination result; if the judgment result indicates that the request is the same request as the previous request, the request is read from the local cache.
  • the result of the previous request processing can alleviate the pressure of the server processing data and improve the efficiency of request information processing.
  • the amount of information required to process information is reduced, and the development efficiency of the application is improved.
  • the processing of request information is reduced, the amount of data information corresponding to the processing result is also greatly reduced, the possibility of data information error is reduced, the stability of the application is increased, and the security of the maintenance data information is also reduced. the cost of.
  • FIG. 1a is a schematic flow chart showing a method for unified processing of request information according to an embodiment of the present invention
  • FIG. 1b is a schematic diagram showing a unified processing of request information between different modules and a request manager according to an embodiment of the present invention
  • FIG. 1c is a schematic flow chart showing a method for unified processing of request information according to an embodiment of the present invention
  • FIG. 1d is a schematic diagram showing the sharing of processing results between different modules by means of monitoring according to an embodiment of the present invention
  • FIG. 2 is a schematic block diagram showing the internal structure of an apparatus for requesting information unified processing according to an embodiment of the present invention
  • FIG. 3 is a block diagram schematically showing a computing device for performing a method of unified processing of request information according to the present invention
  • Fig. 4 schematically shows a storage unit for holding or carrying program code implementing a method of unified processing of request information according to the present invention.
  • terminal and terminal device used herein include both a wireless signal receiver device, a device having only a wireless signal receiver without a transmitting capability, and a receiving and transmitting hardware.
  • Such devices may include cellular or other communication devices having a single line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, information Processing, fax, and/or messaging capabilities; PDA (Personal Digital Assistant), which can include radio frequency receivers, pagers, Internet/Intranet access, web browsers, notepads, calendars, and/or GPS (Global Positioning System (Global Positioning System) receiver; conventional laptop and/or palmtop computer or other device having a conventional laptop and/or palmtop computer or other device that includes and/or includes a radio frequency receiver.
  • PCS Personal Communications Service
  • PDA Personal Digital Assistant
  • terminal may be portable, transportable, installed in a vehicle (aviation, sea and/or land), or adapted and/or configured to operate locally, and/or Run in any other location on the Earth and/or space in a distributed form.
  • the "terminal” and “terminal device” used herein may also be a communication terminal, an internet terminal, a music/video playing terminal, and may be, for example, a PDA, a MID (Mobile Internet Device), and/or have a music/video playback.
  • Functional mobile phones can also be smart TVs, set-top boxes and other devices.
  • the inventors of the present invention have considered that, in particular, the request information is judged by the obtained request parameter to obtain a judgment result; if the judgment result indicates that the request is the same request as the previous request, the previously processed result is read from the local cache. This can alleviate the pressure on the server to process data and improve the efficiency of request information processing.
  • the same request information in the solution of the present invention refers to a plurality of pieces of request information having the same requesting subject, the same request type, and the same request information content.
  • the technical personnel applying the technical solution of the present invention do not need to repeat and redundantly write the request information and the processing information of each functional module when writing various functional modules of the webpage; the technician only needs to write in the functional module.
  • the request manager sends the statement of the request parameter, and the request manager can automatically generate the corresponding request information according to the request parameter sent by each function module to send to the server; and receive the response information of the server, and then process the result, and return the processing result to the corresponding The function module; improves the development efficiency of the webpage and reduces the redundancy of the code.
  • FIG. 1a is a schematic flowchart diagram of a method for unified processing of request information according to an embodiment of the present invention.
  • the types of request information in the embodiment of the present invention are various, and the request information may be request information for acquiring data information (get), and the request information may also be request information for sending data information (post).
  • the request information may also be request information of plain text, and the request information may also be request information of cross-domain communication (jsonp), and the request information may also be request information for delay response (delay), and the request information may also be
  • the request information of the data information (lock) can be sent only once at a time, but the type of the request information does not include only the above types, and details are not described herein again.
  • the processing of the request information is ordered, that is, only after the function module in the web page receives the processing result of the previous request, the request to be embedded in the web page is started.
  • the manager sends a new request, completing each request in turn until all requested data is returned to the function module in the web page.
  • the request information identifying the presence and the previous request information are the same request information, the current request is not processed, and the previously processed processing result is directly read from the cache; thus alleviating the pressure of the server processing the data.
  • the method for requesting unified processing of information in this embodiment specifically includes the following steps:
  • S110 Receive a request sent by a function module in a webpage.
  • a plurality of functional modules may be included in a webpage, and functions implemented by each functional module are different.
  • different request information is further classified according to a request manner; for example, the classified request information includes: request information for acquiring data information (get), and request information for transmitting data information (post), Request information for plain text, request information for cross-domain communication (jsonp), request information for delay response (delay), can only be sent at the same time Request information for one data message (lock).
  • the classified request information includes: request information for acquiring data information (get), and request information for transmitting data information (post), Request information for plain text, request information for cross-domain communication (jsonp), request information for delay response (delay), can only be sent at the same time Request information for one data message (lock).
  • the uniform resource locator can identify the location of the resource and locate the resource.
  • the system can perform various operations on resources such as access operations, update operations, replacement operations, and operations to find resource attributes.
  • the type of the request mode may be a type for acquiring data information (get), and the request mode may also be a type for transmitting data information (post).
  • JSON JSON adopts a completely language-independent text format, which has the advantages of easy reading and writing, and easy machine parsing and generation.
  • condition for sending the request may be set as follows: the same request can be sent only once at the same time; the condition for sending the request may also be set to: within a certain time threshold, the request cannot be sent again.
  • the processing method of the request data may be set to: cache request data.
  • S120 Acquire a request parameter of the request.
  • requesting the corresponding request parameter may include at least one of a request mode and a request configuration parameter.
  • the request information is judged by the obtained request parameter to obtain a judgment result; if the judgment result shows that the request is the same request as the previous request, the request is read from the local cache.
  • the result of the previous request processing this not only relieves the pressure of the server processing data, but also improves the efficiency of requesting information processing.
  • the amount of information required to process information is reduced, and the development efficiency of the application is improved.
  • the processing of request information is reduced, the amount of data information corresponding to the processing result is also greatly reduced, the possibility of data information error is reduced, the stability of the application is increased, and the security of the maintenance data information is also reduced. the cost of.
  • the function module A when the function module A sends the request information to the request manager for the first time, the content of the request is specifically: obtaining the full text of the "Chunxiao" of the Tang Dynasty poet Meng Haoran, and recording in the request manager.
  • the request when the function module A sends the request information of the same content to the request manager again, the request manager directly reads the previously processed processing result from the local cache, and sends the processing result to the function module A, namely: the function module A obtained the full text information of the Tang Dynasty poet Meng Haoran's "Spring Xiao".
  • the content of the request is specifically: sending an icon of the 360 security guard, and recording the request in the request manager;
  • the request manager directly reads the previously processed processing result from the local cache, and sends the processing result to the function module B, and the function module B acquires the icon of the 360 security guard.
  • FIG. 1b a schematic diagram of unified processing of request information between different modules and a request manager in an embodiment of the present invention is shown.
  • the function module A is used for obtaining data information about “how to improve memory” and displaying the obtained “various memory improvement” data information in a webpage
  • the function module B is used for searching and querying environmentally-related pictures on the webpage. Display the environmentally relevant images obtained on the web page.
  • the requesting mode of the requesting parameter sent by the function manager A which is embedded in the webpage, is specifically set to get, and the configuration parameter in the request parameter sent by the function module A may specifically include acquiring data.
  • the request mode in the request parameter sent by the function module A may also be specifically a post, and the configuration parameter in the request parameter sent by the function module A may specifically include a url for sending data.
  • the requesting manner of the requesting parameter sent by the function manager B, which is embedded in the webpage, is specifically a get, and the configuration parameter in the request parameter sent by the function module B may specifically include a uniform resource locator for acquiring data;
  • the request mode in the request parameter sent by the function module B may also be specifically a post, and the configuration parameter in the request parameter sent by the function module A may specifically include a url for sending data.
  • the method for uniformly processing the request information provided by the embodiment of the present invention further includes the following process steps:
  • requesting the corresponding request parameter may include at least one of a request mode and a request configuration parameter.
  • the request manager generates the request information according to at least one of the obtained request mode, the request configuration parameter, and the default configuration parameter in the request mode.
  • the request mode is specifically get, and the configuration in the request parameter sent by the function module A
  • the parameter may specifically include a uniform resource locator for acquiring data, the request manager according to the received request mode (get), the request configuration parameter (the uniform resource locator for acquiring data), and the default configuration parameter under the request mode (get) , generating request information for the request method (get).
  • the request mode is specifically post, and the configuration in the request parameter sent by the function module B
  • the parameter may specifically include a uniform resource locator for transmitting data, the request manager according to the received request mode (post), the request configuration parameter (the uniform resource locator of the sent data), and the default configuration parameter under the request mode (post) , generating request information for the request method (post).
  • S112 Perform corresponding processing according to the response information returned by the server, and send the processing result to the function module.
  • the response information returned by the server includes a response information parameter.
  • the response information parameter may include at least one of a return code of the response information and a content of the response information.
  • the preset processing mode is selected according to the response information parameter to perform corresponding processing; and the processing result is sent to the function module, where the same type of response information parameter corresponds to the same preset processing mode.
  • the processing is performed by using a preset processing manner corresponding to the preset return code. For example, when the information of the user in a certain social software is requested, if the return code of the response message is “-1”, the processing method preset by the return code “-1” is used, for example, to include “not logged in”. The pop-up window prompts the user.
  • the processing is performed by using a preset processing manner corresponding to the preset return content. For example, if the content of the response information is “unable to find the server”, the content is processed in a preset manner, for example, the current network connection point is replaced.
  • the function module after receiving the processing result of the request manager, the function module performs a corresponding function, for example, a display function and a sending function.
  • function module A when function module A performs the displayed function, function module A can read the full text of the previous Tang Dynasty poet Meng Haoran's Chun Xiao. "Spring sleep is not known, and ostriches are everywhere. Night winds and rains, flowers "How much is known” is displayed on the web page.
  • the function module A When the function module A performs the function of sending, the function module A can send the full text of the previous Tang Dynasty poet Meng Haoran's Chun Xiao, "When the sleep is not clear, the ostrich is smelled everywhere. The wind and the wind come, how much is spent" .
  • the function module B can display the previously acquired 360 security guard icon in the webpage.
  • the function module B When the function module B performs the function of the transmission, the function module B can transmit the previously acquired 360 security guard icon.
  • the corresponding request information is generated according to the obtained request parameter to be sent to the server; and the corresponding processing is performed according to the response information returned by the server, and the processing result is sent.
  • the response information returned by the server corresponds to the processing result, and the orderly and classified management of the original huge data information is automatically realized.
  • the request manager shares the processing results with other functional modules of the listening function module in the webpage.
  • FIG. 1d a schematic diagram of sharing processing results between different modules in the embodiment of the present invention is implemented.
  • the request manager shares the get processing result of the function module A to the function module B, wherein the function module B can monitor the function module A in the webpage, so that the function module B can also share the function module A.
  • the results of the get processing therefore, the function module B will be able to get the full text of the Tang Dynasty poet Meng Haoran's "Spring Xiao", "Huang Xiu does not know, everywhere smells bird. The sound of the night and the wind, the number of flowers knows" is displayed on the webpage.
  • the request manager can also share the result of the function processing of the function module B to the function module A, wherein the function module A can monitor the function module B in the webpage, so that when the function module A can also share the function module B
  • the get process is processed so that the function module A can display the previously acquired 360 security guard icon on the web page.
  • the shared processing result is not only a text material, but also a picture, or a video material, and will not be described here.
  • FIG. 2 is a schematic diagram of a framework of an internal structure of an apparatus for requesting unified processing of information according to an embodiment of the present invention.
  • the apparatus for requesting unified processing of information in this embodiment includes: a request receiving module 210, a request parameter obtaining module 220, a determining module 230, and a processing module 240.
  • the request receiving module 210 is configured to receive a request sent by a function module in a webpage.
  • the request parameter obtaining module 220 is configured to obtain the requested parameter of the request
  • the request parameter corresponding to the request may include at least one of a request mode and a request configuration parameter.
  • the determining module 230 is configured to determine the request information according to the obtained request parameter to obtain a determination result.
  • the processing module 240 is configured to: if the determination result display request is the same request as the previous request, read the previously processed processing result from the local cache; and send the processing result to the function module.
  • the processing module when the judgment result indicates that the request is the same request as the previous request, the processing module directly reads the processing result of the same request from the local cache; this can alleviate the pressure of processing the data of the server, and improve the processing of the request information. s efficiency. At the same time, the amount of information required to process information is reduced, and the development efficiency of the application is improved. In addition, since the processing of request information is reduced, the amount of data information corresponding to the processing result is also greatly reduced, the possibility of data information error is reduced, the stability of the application is increased, and the security of the maintenance data information is also reduced. the cost of.
  • processing module 240 is further configured to: if the determination result display request is different from the previous request, generate corresponding request information according to the obtained request parameter to send to the server; and perform corresponding processing according to the response information returned by the server, and process the The result is sent to the function module.
  • the processing module 240 is configured to generate request information according to at least one of the obtained request mode, the request configuration parameter, and the default configuration parameter in the request mode.
  • processing module 240 includes a first processing unit and a second processing unit.
  • the first processing unit is configured to: if the judgment result display request is the same as the previous request, please If so, the previously processed processing result is read from the local cache; and the processing result is sent to the function module.
  • the second processing unit is configured to: if the determination result display request is different from the previous request, generate corresponding request information according to the obtained request parameter to send to the server; and perform corresponding processing according to the response information returned by the server, and send the processing result to functional module.
  • the second processing unit includes a first subunit, where the first subunit is configured to select a preset processing manner according to the response information parameter to perform corresponding processing; and send the processing result to the function module; wherein, the same type of response information parameter Corresponds to the same preset processing method.
  • the response information returned by the server includes a response information parameter.
  • the response information parameter may include at least one of a return code of the response information and a content of the response information.
  • the second processing unit further includes a second sub-unit, and if the return code of the response information is similar to/consistent with the preset return code, the processing is performed by using a preset processing manner corresponding to the preset return code.
  • the second processing unit further includes a third sub-unit, where the third sub-unit is configured to perform processing according to a preset processing manner corresponding to the preset return content if the content of the response information is similar/same to the preset return content.
  • the processing module when the determination result indicates that the request is different from the previous request, the processing module generates corresponding request information according to the obtained request parameter to send to the server; and performs corresponding processing according to the response information returned by the server, and processes the The result is sent to the corresponding function module; by corresponding to the preset processing mode, the response information returned by the server corresponds to the processing result, and the classified management of the original huge data information is automatically realized.
  • the apparatus for requesting unified processing of data further includes a processing result sharing module.
  • the result sharing module is configured to share the processing result to other functional modules of the listening function module in the webpage.
  • the present invention further includes a terminal device having the above-mentioned request receiving module 210, a device requesting the parameter obtaining module 220, the determining module 230, and the processing module 240, and requesting information according to the device Perform unified processing.
  • the present invention includes apparatus related to performing one or more of the operations described herein. These devices may be specially designed and manufactured for the required purposes, or may also include known devices in a general purpose computer. These devices have computer programs stored therein that are selectively activated or reconfigured.
  • Such computer programs may be stored in a device (eg, computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, including but not limited to any Types of disks (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory) , EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card.
  • a readable medium includes any medium that is stored or transmitted by a device (eg, a computer) in a readable form.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Unless otherwise stated, this manual (including Each feature disclosed in the claims, the abstract and the drawings may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the apparatus for requesting information uniform processing in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 3 illustrates a computing device that can implement unified processing of request information in accordance with the present invention.
  • the computing device conventionally includes a processor 310 and a computer program product or computer readable medium in the form of a memory 320.
  • the memory 320 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • the memory 320 has a storage space 330 that stores program code 331 for performing any of the method steps described above.
  • storage space 330 storing program code may include various program code 331 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such computer program products are typically portable or fixed storage units such as those shown in FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 320 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit comprises computer readable code 331' for performing the steps of the method according to the invention, ie code that can be read by a processor such as 310, which when executed by the computing device causes the computing device Perform the various steps in the method described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种请求信息统一处理的方法和装置,其中,方法包括:接收网页中的功能模块发送的请求;获取请求的请求参数;根据获取的请求参数对请求信息进行判断,以得到判断结果;若判断结果显示请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及将处理结果发送给功能模块。本发明所提供的方法及装置,当判断结果显示请求与之前请求为相同的请求时,则从本地缓存读取之前相同请求的处理结果;这样能够缓解服务器的处理数据的压力,提高了请求信息处理的效率。

Description

请求信息统一处理的方法和装置 技术领域
本发明涉及终端设备的技术领域,尤其涉及请求信息统一处理的方法和装置。
背景技术
目前,随着互联网技术的发展,服务器会接收到大量的请求信息,无疑加重了服务器处理数据的压力,服务器处理数据的能力直接影响到用户的使用体验。
现有的技术,针对每次请求,服务器均会对其进行处理,并返回相应的处理结果。在万维网应用中,通过AJAX(Asynchronous JavaScript And XML,阿贾克斯)技术能够做到针对不同的请求信息进行处理,例如,通过AJAX技术对获取数据信息的请求进行处理;通过AJAX技术对发送数据信息的请求进行处理;通过AJAX技术对简文本的请求进行处理;通过AJAX技术对跨域通信的请求进行处理;通过AJAX技术对时间延迟响应的请求进行处理;以及通过AJAX技术对同一时间内只能发送一次数据信息的请求进行处理等等,所述请求信息的类型并不仅仅包括以上这些类型,在此不再赘述。这样,将使得针对请求的数据信息处理过程极其繁琐,加重了服务器处理数据的压力,同时,也降低了请求信息处理的效率。
因此,有必要提供一种请求信息统一处理的方法和装置,以应对和解决前述的相关技术问题。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上述问题的一种请求信息统一处理的方法和相应的装置。
根据本发明的一个方面,提供了一种请求信息统一处理的方法,包括:
接收网页中的功能模块发送的请求;
获取所述请求的请求参数;
根据获取的请求参数对所述请求信息进行判断,以得到判断结果;
若所述判断结果显示所述请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及
将所述处理结果发送给所述功能模块。
根据本发明的另一个方面,还提供了一种请求信息统一处理的装置,包括:
请求接收模块,用于接收网页中的功能模块发送的请求;
请求参数获取模块,用于获取所述请求的请求参数;
判断模块,用于根据获取的请求参数对所述请求信息进行判断,以得到判断结果;
处理模块,用于若所述判断结果显示所述请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及将所述处理结果发送给所述功能模块。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行如上文所述的请求信息统一处理的方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了如上文所述的计算机程序。
本发明的有益效果为:
本发明的技术方案中,特别是通过获取的请求参数对所述请求信息进行判断,以得到判断结果;若所述判断结果显示所述请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;这样能够缓解服务器的处理数据的压力,提高了请求信息处理的效率。同时,减少了请求信息处理的信息量,提高了应用的开发效率。此外,由于减少了请求信息的处理过程,获得的与处理结果对应的数据信息量也将大大地减少,减少了数据信息出错的可能性,增加了应用的稳定性,也减少了维护数据信息安全的成本。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1a示意性示出了根据本发明一个实施例的请求信息统一处理的方法的流程示意图;
图1b示意性示出了根据本发明一个实施例的不同模块和请求管理器之间进行请求信息统一处理的示意图;
图1c示意性示出了根据本发明一个实施例的请求信息统一处理的方法的流程示意图;
图1d示意性示出了根据本发明一个实施例的不同模块之间通过监听实现处理结果共享的示意图;
图2示意性示出了根据本发明一个实施例的请求信息统一处理的装置的内部结构的框架示意图;
图3示意性示出了用于执行根据本发明的请求信息统一处理的方法的计算设备的框图;以及
图4示意性示出了用于保持或者携带实现根据本发明的请求信息统一处理的方法的程序代码的存储单元。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中 间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。
本技术领域技术人员可以理解,这里所使用的“终端”、“终端设备”既包括无线信号接收器的设备,其仅具备无发射能力的无线信号接收器的设备,又包括接收和发射硬件的设备,其具有能够在双向通信链路上,进行双向通信的接收和发射硬件的设备。这种设备可以包括:蜂窝或其他通信设备,其具有单线路显示器或多线路显示器或没有多线路显示器的蜂窝或其他通信设备;PCS(Personal Communications Service,个人通信系统),其可以组合语音、信息处理、传真和/或信息通信能力;PDA(Personal Digital Assistant,个人数字助理),其可以包括射频接收器、寻呼机、互联网/内联网访问、网络浏览器、记事本、日历和/或GPS(Global Positioning System,全球定位系统)接收器;常规膝上型和/或掌上型计算机或其他设备,其具有和/或包括射频接收器的常规膝上型和/或掌上型计算机或其他设备。这里所使用的“终端”、“终端设备”可以是便携式、可运输、安装在交通工具(航空、海运和/或陆地)中的,或者适合于和/或配置为在本地运行,和/或以分布形式,运行在地球和/或空间的任何其他位置运行。这里所使用的“终端”、“终端设备”还可以是通信终端、上网终端、音乐/视频播放终端,例如可以是PDA、MID(Mobile Internet Device,移动互联网设备)和/或具有音乐/视频播放功能的移动电话,也可以是智能电视、机顶盒等设备。
本发明的发明人考虑到,特别是通过获取的请求参数对请求信息进行判断,以得到判断结果;若判断结果显示请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;这样能够缓解服务器的处理数据的压力,提高了请求信息处理的效率。
需要说明的是,本发明的方案中的同一请求信息是指具有相同的发出请求的主体,相同的请求类型,以及相同的请求信息的内容的多条请求信息。
而且,应用本发明的技术方案技术人员在编写网页的各个功能模块时,不用针对每个功能模块的请求信息、处理信息进行重复和冗余的代码编写;技术人员只需在功能模块中编写向请求管理器发送请求参数的语句,而请求管理器可以自动根据各个功能模块发送的请求参数生成相应的请求信息向服务器进行发送;并接收到服务器的响应信息后进行处理,将处理结果返回给对应的功能模块;提高了网页的开发效率,减小了代码的冗余度。
下面结合附图详细说明本发明的技术方案。
图1a为本发明实施例的请求信息统一处理的方法的流程示意图。需要说明的是,本发明实施例中的请求信息的种类是多种多样的,请求信息可以是获取数据信息(get)的请求信息,请求信息也可以是发送数据信息(post)的请求信息,请求信息也可以是简文本(plain)的请求信息,请求信息也可以是跨域通信(jsonp)的请求信息,请求信息也可以是对时间延迟响应(delay)的请求信息,请求信息也可以是对同一时间内只能发送一次数据信息(lock)的请求信息,但请求信息的类型并不仅仅包括以上这些类型,在此不再赘述。
需要说明的是,在本发明的方案中,对请求信息的处理是有序的,即:只有在网页中的功能模块接收到前一个请求的处理结果之后,才开始向嵌于网页中的请求管理器发送新的请求,依次完成每次请求,直到所有请求的数据返回到网页中的功能模块。
同时,在识别出现在的请求信息与之前请求信息是同一请求信息,则对现在的请求不做处理,直接从缓存中读取之前请求的处理结果;这样缓解了服务器的处理数据的压力。
如图1a所示,本实施例中请求信息统一处理的方法流程具体包括以下步骤:
S110:接收网页中的功能模块发送的请求。
在本发明实施例中,如图1b所示的,网页中可以包括多个功能模块,各功能模块实现的功能各不相同。
而且,在本发明的技术方案中还将不同的请求信息按照请求方式进行分类;例如,分类出的请求信息包括:获取数据信息(get)的请求信息,发送数据信息(post)的请求信息,简文本(plain)的请求信息,跨域通信(jsonp)的请求信息,对时间延迟响应(delay)的请求信息,对同一时间内只能发送 一次数据信息(lock)的请求信息。
为了使得本领域的普通技术人员更好地理解本发明,如下列举了目前常用的参数配置:
a、请求对应的统一资源定位符。
具体地,统一资源定位符能够识别资源的位置,并对资源定位。由此,系统就可以对资源进行各种操作,例如:存取操作、更新操作、替换操作和查找资源属性的操作。
b、请求方式的类型。
具体地,请求方式的类型可以是用于获取数据信息(get)的类型,请求方式也可以是用于发送数据信息(post)的类型。
c、标准化数据格式。
目前常用的是标准JSON化数据格式,其中,JSON采用完全独立于语言的文本格式,既具有易于人阅读和编写,同时也易于机器解析和生成的优势。
d、发送请求的条件。
具体地,发送请求的条件可以设置为:同一请求在同一时间内只能发送一次;也可以将发送请求的条件设置为:在某一时间阈值内,无法再次发送请求。
e、请求数据的处理方式。
具体地,可以将请求数据的处理方式设置为:缓存请求数据。
需要说明的是,如上所述,仅仅列举了目前常用的参数配置。在本发明的方案中,也可以根据实际应用环境,对相应的参数进行配置,在此不再赘述。
S120:获取请求的请求参数。
在本步骤中,请求对应的请求参数可包括:请求方式、请求配置参数中至少一个。
S130:根据获取的请求参数对请求信息进行判断,以得到判断结果。
S140:若判断结果显示请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及将处理结果发送给功能模块。
在本应用场景中,通过获取的请求参数对请求信息进行判断,以得到判断结果;若判断结果显示请求与之前请求为相同的请求,则从本地缓存读取 之前请求的处理结果;这样不仅能够缓解服务器的处理数据的压力,还提高了请求信息处理的效率。同时,减少了请求信息处理的信息量,提高了应用的开发效率。此外,由于减少了请求信息的处理过程,获得的与处理结果对应的数据信息量也将大大地减少,减少了数据信息出错的可能性,增加了应用的稳定性,也减少了维护数据信息安全的成本。
在实际应用中,如图1b所示,当功能模块A首次向请求管理器发送请求信息,其请求的内容具体为:获取唐朝诗人孟浩然的《春晓》的全文,并在请求管理器中记录该请求;这样当功能模块A再次向请求管理器发送相同内容的请求信息时,请求管理器直接从本地缓存读取之前请求的处理结果,并将处理结果发送给功能模块A,即:功能模块A获取到唐朝诗人孟浩然的《春晓》的全文信息。
在实际应用中,如图1b所示,当功能模块B首次向请求管理器发送请求信息,其请求的内容具体为:发送360安全卫士的图标,并在请求管理器中记录该请求;这样当功能模块B再次发送相同内容的请求信息时,请求管理器直接从本地缓存读取之前请求的处理结果,并将处理结果发送给功能模块B,功能模块B获取到360安全卫士的图标。
如图1b所示,为本发明实施例中的不同模块和请求管理器之间进行请求信息统一处理的示意图。
功能模块A用于获取有关“如何提高记忆力”的数据信息并将所获取的“多种提高记忆力”的数据信息显示在网页中,功能模块B用于搜索并查询网页中与环保有关的图片,并将所获取的与环保有关的图片显示在网页中。
如图1b所示,嵌于网页中的请求管理器接收网页中的功能模块A发送的请求参数中的请求方式具体为get,以及功能模块A发送的请求参数中的配置参数具体可以包括获取数据的统一资源定位符;此外,功能模块A发送的请求参数中的请求方式也可以具体为post,以及功能模块A发送的请求参数中的配置参数具体可以包括发送数据的url。
嵌于网页中的请求管理器接收网页中的功能模块B发送的请求参数中的请求方式具体为get,以及功能模块B发送的请求参数中的配置参数具体可以包括获取数据的统一资源定位符;此外,功能模块B发送的请求参数中的请求方式也可以具体为post,以及功能模块A发送的请求参数中的配置参数具体可以包括发送数据的url。
当判断结果显示请求与之前请求为不同的请求时,如图1c所示,本发明实施例所提供的请求信息统一处理的方法,还包括如下流程步骤:
S111:若判断结果显示请求与之前请求为不同的请求,根据获取的请求参数生成相应请求信息以向服务器发送。
在本步骤中,请求对应的请求参数可包括:请求方式、请求配置参数中至少一个。
具体地,在本发明的实施例中,请求管理器根据获取的请求方式、请求配置参数、该请求方式下的默认配置参数中至少一者,生成请求信息。
在实际应用中,如图1b所示,当嵌于网页中的请求管理器接收网页中的功能模块A发送的请求参数中的请求方式具体为get,以及功能模块A发送的请求参数中的配置参数具体可以包括获取数据的统一资源定位符时,请求管理器根据接收的请求方式(get)、请求配置参数(获取数据的统一资源定位符),以及该请求方式(get)下的默认配置参数,生成该请求方式(get)的请求信息。
在实际应用中,如图1b所示,当嵌于网页中的请求管理器接收网页中的功能模块B发送的请求参数中的请求方式具体为post,以及功能模块B发送的请求参数中的配置参数具体可以包括发送数据的统一资源定位符时,请求管理器根据接收的请求方式(post)、请求配置参数(发送数据的统一资源定位符),以及该请求方式(post)下的默认配置参数,生成该请求方式(post)的请求信息。
S112:根据服务器返回的响应信息进行相应处理,并将处理结果发送给功能模块。
在本步骤中,服务器返回的响应信息包含响应信息参数。响应信息参数可包括:响应信息的返回码、响应信息的内容中至少一个。
具体而言,依据响应信息参数选择预设处理方式以进行相应处理;以及将处理结果发送给功能模块,其中,同一类型的响应信息参数对应同一种预设处理方式。
进一步地,若响应信息的返回码与预设返回码相似/一致,则采用预设返回码对应的预设处理方式进行处理。例如,当请求某一社交软件中用户的信息时,若响应消息的返回码为“-1”,则采用返回码“-1”预设的处理方式进行处理,例如以包含“未登录”的弹窗提示用户。
进一步地,若响应信息的内容与预设返回内容相似/相同,则采用预设返回内容对应的预设处理方式进行处理。例如,若响应信息的内容为“无法找到服务器”,则采用所述内容的预设处理方式进行处理,例如,更换当前的网络连接点。
实际应用中,功能模块接收到请求管理器的处理结果后,执行相应的功能,例如,显示功能,发送功能。
如图1b所示,当功能模块A执行显示的功能时,功能模块A就可以将之前获取到的唐朝诗人孟浩然的春晓的全文“春眠不觉晓,处处闻啼鸟。夜来风雨声,花落知多少”显示在网页中。
当功能模块A执行发送的功能时,功能模块A就可以将之前获取到的唐朝诗人孟浩然的春晓的全文“春眠不觉晓,处处闻啼鸟。夜来风雨声,花落知多少”进行发送。
同理,当功能模块B执行显示的功能时,功能模块B就可以将之前获取到的360安全卫士的图标显示在网页中。
当功能模块B执行发送的功能时,功能模块B就可以将之前获取到的360安全卫士的图标进行发送。
在本应用场景中,当判断结果显示请求与之前请求为不同的请求时,根据获取的请求参数生成相应请求信息以向服务器发送;以及根据服务器返回的响应信息进行相应处理,并将处理结果发送给对应的功能模块;通过将响应信息参数的类型与预设处理方式相对应,使得服务器返回的响应信息与处理结果相对应,自动实现了对原本庞大的数据信息的有序且分类的管理。
此外,为了实现不同模块之间所获取的处理结果的共享,请求管理器将处理结果共享给网页中监听功能模块的其它功能模块。
如图1d所示,为本发明实施例中的不同模块之间通过监听实现处理结果共享的示意图。
需要说明的是,在不同模块之间通过监听实现处理结果共享的过程中,需要进行监听数据请求以及触发数据监听的事件管理。
如图1d所示,请求管理器将功能模块A的get处理结果共享给功能模块B,其中,功能模块B能够在网页中对功能模块A进行监听,这样,功能模块B也可以共享功能模块A的get处理结果,因此,功能模块B就能够将之前获取到的唐朝诗人孟浩然的《春晓》的全文“春眠不觉晓,处处闻啼 鸟。夜来风雨声,花落知多少”显示在网页中。
此外,请求管理器也可以将功能模块B的get处理结果共享给功能模块A,其中,功能模块A能够在网页中对功能模块B进行监听,这样,当功能模块A也可以共享功能模块B的get处理结果,这样功能模块A就能够将之前获取到的360安全卫士的图标显示在网页中。
需要说明的是,共享的处理结果不仅仅是文本资料,或者是图片,也可以是视频资料等,在此不再赘述。
图2为本发明实施例的请求信息统一处理的装置的内部结构的框架示意图。如图2所示,本实施例请求信息统一处理的装置包括:请求接收模块210,请求参数获取模块220、判断模块230和处理模块240。
具体而言,请求接收模块210,用于接收网页中的功能模块发送的请求。
请求参数获取模块220,用于获取请求的请求参数;
其中,请求对应的请求参数可包括:请求方式、请求配置参数中至少一个。
判断模块230,用于根据获取的请求参数对请求信息进行判断,以得到判断结果。
处理模块240,用于若判断结果显示请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及将处理结果发送给功能模块。
在上述实施例中,当判断结果显示请求与之前请求为相同的请求时,处理模块直接从本地缓存读取之前相同请求的处理结果;这样能够缓解服务器的处理数据的压力,提高了请求信息处理的效率。同时,减少了请求信息处理的信息量,提高了应用的开发效率。此外,由于减少了请求信息的处理过程,获得的与处理结果对应的数据信息量也将大大地减少,减少了数据信息出错的可能性,增加了应用的稳定性,也减少了维护数据信息安全的成本。
进一步地,处理模块240还用于若判断结果显示请求与之前请求为不同的请求,根据获取的请求参数生成相应请求信息以向服务器发送;以及根据服务器返回的响应信息进行相应处理,并将处理结果发送给功能模块。
较佳地,处理模块240具体用于根据获取的请求方式、请求配置参数、该请求方式下的默认配置参数中至少一者,生成请求信息。
进一步地,处理模块240包括第一处理单元和第二处理单元。
具体地,第一处理单元用于若判断结果显示请求与之前请求为相同的请 求,则从本地缓存读取之前请求的处理结果;以及将处理结果发送给功能模块。
第二处理单元用于若判断结果显示请求与之前请求为不同的请求,根据获取的请求参数生成相应请求信息以向服务器发送;以及根据服务器返回的响应信息进行相应处理,并将处理结果发送给功能模块。
进一步地,第二处理单元包括第一子单元,第一子单元用于依据响应信息参数选择预设处理方式以进行相应处理;以及将处理结果发送给功能模块;其中,同一类型的响应信息参数对应同一种预设处理方式。
其中,服务器返回的响应信息包含响应信息参数。响应信息参数可包括:响应信息的返回码、响应信息的内容中至少一个。
进一步地,第二处理单元还包括第二子单元,第二子单元用于若响应信息的返回码与预设返回码相似/一致,则采用预设返回码对应的预设处理方式进行处理。
进一步地,第二处理单元还包括第三子单元,第三子单元用于若响应信息的内容与预设返回内容相似/相同,则采用预设返回内容对应的预设处理方式进行处理。
在上述实施例中,当判断结果显示请求与之前请求为不同的请求时,处理模块根据获取的请求参数生成相应请求信息以向服务器发送;以及根据服务器返回的响应信息进行相应处理,并将处理结果发送给对应的功能模块;通过将响应信息参数的类型与预设处理方式相对应,使得服务器返回的响应信息与处理结果相对应,自动实现了对原本庞大的数据信息有序的分类管理。
此外,为了实现不同模块之间所获取的处理结果的共享,请求数据统一处理的装置还包括处理结果共享模块。
处理结果共享模块,用于将处理结果共享给网页中监听功能模块的其它功能模块。
上述请求接收模块210,请求参数获取模块220、判断模块230和处理模块240的功能的具体实现方法,可以参考上述如图1a、图1b、图1c、图1d所示的方法流程步骤的具体内容,此处不再赘述。
此外,本发明还包括具有上述请求接收模块210,请求参数获取模块220、判断模块230和处理模块240的装置的终端设备,根据上述装置对请求信息 进行统一处理。
本技术领域技术人员可以理解,本发明包括涉及用于执行本申请中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴 随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的请求信息统一处理的设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图3示出了可以实现根据本发明的请求信息统一处理的计算设备。该计算设备传统上包括处理器310和以存储器320形式的计算机程序产品或者计算机可读介质。存储器320可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器320具有存储用于执行上述方法中的任何方法步骤的程序代码331的存储空间330。例如,存储程序代码的存储空间330可以包括分别用于实现上面的方法中的各种步骤的各个程序代码331。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图4所示的便携式或者固定存储单元。该存储单元可以具有与图3的计算设备中的存储器320类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括用于执行根据本发明的方法步骤的计算机可读代码331’,即可以由诸如310之类的处理器读取的代码,当这些代码由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (21)

  1. 一种请求信息统一处理的方法,包括:
    接收网页中的功能模块发送的请求;
    获取所述请求的请求参数;
    根据获取的请求参数对所述请求信息进行判断,以得到判断结果;
    若所述判断结果显示所述请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及
    将所述处理结果发送给所述功能模块。
  2. 根据权利要求1所述的方法,其中,所述方法进一步包括:
    若所述判断结果显示所述请求与之前请求为不同的请求,根据获取的请求参数生成相应请求信息以向服务器发送;以及
    根据所述服务器返回的响应信息进行相应处理,并将处理结果发送给所述功能模块。
  3. 根据权利要求2所述的方法,其中,所述响应信息包含响应信息参数,以及根据所述服务器返回的响应信息进行相应处理,并将处理结果发送给所述功能模块的步骤进一步包括:
    依据所述响应信息参数选择预设处理方式以进行相应处理;以及
    将所述处理结果发送给所述功能模块,
    其中,同一类型的响应信息参数对应同一种预设处理方式。
  4. 根据权利要求3所述的方法,其中,所述响应信息参数包括以下至少一者:
    响应信息的返回码、响应信息的内容。
  5. 根据权利要求4所述的方法,其中,所述依据所述响应信息参数选择预设处理方式以进行相应处理的步骤进一步包括:
    若所述响应信息的返回码与预设返回码相似/一致,则采用所述预设返回码对应的预设处理方式进行处理。
  6. 根据权利要求4或5所述的方法,其中,所述依据所述响应信息参数选择预设处理方式以进行相应处理的步骤进一步包括:
    若所述响应信息的内容与预设返回内容相似/相同,则采用所述预设返回内容对应的预设处理方式进行处理。
  7. 根据权利要求1-6中任一项所述的方法,其中,所述请求参数 包括以下至少一者:
    请求方式、请求配置参数。
  8. 根据权利要求2-7中任一项所述的方法,其中,所述根据获取的请求参数生成相应请求信息以向服务器发送的步骤进一步包括:
    根据获取的请求方式、请求配置参数、该请求方式下的默认配置参数中至少一者,生成所述请求信息。
  9. 根据权利要求1-8中任一项所述的方法,其中,所述方法进一步包括:
    将所述处理结果共享给所述网页中监听所述功能模块的其它功能模块。
  10. 一种请求信息统一处理的装置,包括:
    请求接收模块,用于接收网页中的功能模块发送的请求;
    请求参数获取模块,用于获取所述请求的请求参数;
    判断模块,用于根据获取的请求参数对所述请求信息进行判断,以得到判断结果;
    处理模块,用于若所述判断结果显示所述请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及将所述处理结果发送给所述功能模块。
  11. 根据权利要求10所述的装置,其中,所述处理模块还用于若所述判断结果显示所述请求与之前请求为不同的请求,根据获取的请求参数生成相应请求信息以向服务器发送;以及根据所述服务器返回的响应信息进行相应处理,并将处理结果发送给所述功能模块。
  12. 根据权利要求11所述的装置,其中,所述处理模块包括:
    第一处理单元,若所述判断结果显示所述请求与之前请求为相同的请求,则从本地缓存读取之前请求的处理结果;以及将所述处理结果发送给所述功能模块;
    第二处理单元,若所述判断结果显示所述请求与之前请求为不同的请求,根据获取的请求参数生成相应请求信息以向服务器发送;以及根据所述服务器返回的响应信息进行相应处理,并将处理结果发送给所述功能模块。
  13. 根据权利要求12所述的装置,其中,所述响应信息包含响应信息参数;以及所述第二处理单元包括:
    第一子单元,用于依据所述响应信息参数选择预设处理方式以进行相应处理;以及将所述处理结果发送给所述功能模块;
    其中,同一类型的响应信息参数对应同一种预设处理方式。
  14. 根据权利要求13所述的装置,其中,所述响应信息参数包括以下至少一者:
    响应信息的返回码、响应信息的内容。
  15. 根据权利要求14所述的装置,其中,所述第二处理单元还包括:
    第二子单元,用于若所述响应信息的返回码与预设返回码相似/一致,则采用所述预设返回码对应的预设处理方式进行处理。
  16. 根据权利要求14所述的装置,其中,所述第二处理单元还包括:
    第三子单元,用于若所述响应信息的内容与预设返回内容相似/相同,则采用所述预设返回内容对应的预设处理方式进行处理。
  17. 根据权利要求10-16中任一项所述的装置,其中,所述请求参数包括以下至少一者:
    请求方式、请求配置参数。
  18. 根据权利要求11-17中任一项所述的装置,其中,
    所述处理模块具体用于根据获取的请求方式、请求配置参数、该请求方式下的默认配置参数中至少一者,生成所述请求信息。
  19. 根据权利要求10-18中任一项所述的装置,其中,所述装置还包括:
    共享模块,用于将所述处理结果共享给所述网页中监听所述功能模块的其它功能模块。
  20. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-9中的任一个所述的请求信息统一处理的方法。
  21. 一种计算机可读介质,其中存储了如权利要求20所述的计算机程序。
PCT/CN2015/095466 2014-12-26 2015-11-24 请求信息统一处理的方法和装置 WO2016101753A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410834375.8A CN104468833B (zh) 2014-12-26 2014-12-26 请求信息统一处理的方法和装置
CN201410834375.8 2014-12-26

Publications (1)

Publication Number Publication Date
WO2016101753A1 true WO2016101753A1 (zh) 2016-06-30

Family

ID=52914184

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095466 WO2016101753A1 (zh) 2014-12-26 2015-11-24 请求信息统一处理的方法和装置

Country Status (2)

Country Link
CN (1) CN104468833B (zh)
WO (1) WO2016101753A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399181A (zh) * 2019-07-23 2019-11-01 深圳市元征科技股份有限公司 软件开发工具包功能调用方法、系统及电子设备和介质
CN113114768A (zh) * 2021-04-14 2021-07-13 北京京东振世信息技术有限公司 一种业务请求处理方法、装置和系统
CN113778688A (zh) * 2021-09-17 2021-12-10 Oppo广东移动通信有限公司 内存管理系统、内存管理方法、内存管理装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468833B (zh) * 2014-12-26 2018-05-29 北京奇虎科技有限公司 请求信息统一处理的方法和装置
CN106161519B (zh) * 2015-04-01 2019-06-21 阿里巴巴集团控股有限公司 一种信息获取方法和装置
CN106484738B (zh) * 2015-09-01 2020-08-28 腾讯科技(深圳)有限公司 一种页面处理方法及装置
CN112866085B (zh) * 2016-12-19 2023-04-07 创新先进技术有限公司 一种资源传输方法及装置
CN106953857B (zh) * 2017-03-16 2020-03-10 郑州云海信息技术有限公司 一种基于cs架构的服务器端多线程管理方法
CN112527826B (zh) * 2019-09-19 2024-06-18 北京京东振世信息技术有限公司 处理请求的方法和装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021875A (zh) * 2007-03-22 2007-08-22 金蝶软件(中国)有限公司 面向对象的数据库访问方法及系统
CN103123630A (zh) * 2011-11-21 2013-05-29 腾讯科技(深圳)有限公司 一种获取网页内容的方法、系统以及移动终端和服务器
CN103218434A (zh) * 2013-04-15 2013-07-24 北京小米科技有限责任公司 一种加载静态资源的方法和装置
CN104090801A (zh) * 2014-07-11 2014-10-08 Tcl通讯(宁波)有限公司 移动终端浏览器快速打开网页的方法及浏览器
CN104123356A (zh) * 2014-07-17 2014-10-29 成都康赛信息技术有限公司 一种大数据量下提高网页响应的方法
CN104142966A (zh) * 2013-09-26 2014-11-12 腾讯科技(深圳)有限公司 一种展示网页的方法及客户端
CN104468833A (zh) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 请求信息统一处理的方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662503B (zh) * 2009-09-14 2012-09-05 金蝶软件(中国)有限公司 网络中的信息传输方法、代理服务器和服务系统
CN103177042B (zh) * 2011-12-26 2016-09-21 宇龙计算机通信科技(深圳)有限公司 一种网页浏览的方法及装置
CN104065637B (zh) * 2013-07-10 2015-07-01 腾讯科技(深圳)有限公司 网页游戏运行的方法及装置
CN103455632B (zh) * 2013-09-22 2018-11-23 深圳市金蝶精斗云网络科技有限公司 一种网页显示方法和客户端
CN103678549B (zh) * 2013-12-04 2017-06-13 新浪网技术(中国)有限公司 网页页面数据共享方法和装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021875A (zh) * 2007-03-22 2007-08-22 金蝶软件(中国)有限公司 面向对象的数据库访问方法及系统
CN103123630A (zh) * 2011-11-21 2013-05-29 腾讯科技(深圳)有限公司 一种获取网页内容的方法、系统以及移动终端和服务器
CN103218434A (zh) * 2013-04-15 2013-07-24 北京小米科技有限责任公司 一种加载静态资源的方法和装置
CN104142966A (zh) * 2013-09-26 2014-11-12 腾讯科技(深圳)有限公司 一种展示网页的方法及客户端
CN104090801A (zh) * 2014-07-11 2014-10-08 Tcl通讯(宁波)有限公司 移动终端浏览器快速打开网页的方法及浏览器
CN104123356A (zh) * 2014-07-17 2014-10-29 成都康赛信息技术有限公司 一种大数据量下提高网页响应的方法
CN104468833A (zh) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 请求信息统一处理的方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399181A (zh) * 2019-07-23 2019-11-01 深圳市元征科技股份有限公司 软件开发工具包功能调用方法、系统及电子设备和介质
CN113114768A (zh) * 2021-04-14 2021-07-13 北京京东振世信息技术有限公司 一种业务请求处理方法、装置和系统
CN113778688A (zh) * 2021-09-17 2021-12-10 Oppo广东移动通信有限公司 内存管理系统、内存管理方法、内存管理装置

Also Published As

Publication number Publication date
CN104468833B (zh) 2018-05-29
CN104468833A (zh) 2015-03-25

Similar Documents

Publication Publication Date Title
WO2016101753A1 (zh) 请求信息统一处理的方法和装置
US20200089718A1 (en) Inferred user identity in content distribution
KR101650253B1 (ko) 이동 단말 상에 검색 결과를 표시하기 위한 방법 및 장치
CN108846295B (zh) 敏感信息过滤方法、装置、计算机设备及存储介质
CN110262807B (zh) 集群创建进度日志采集系统、方法和装置
WO2015109946A1 (en) Methods and devices for controlling machines
US9722964B2 (en) Social media message delivery based on user location
CN108134816B (zh) 对远程设备上的数据的访问
WO2016000507A1 (zh) 省流量模式搜索服务的方法、服务器、客户端和系统
WO2016101732A1 (zh) 跨网页的信息传输方法和网页浏览装置
WO2017079866A1 (zh) 应用安装包获取方法、信息广播方法、移动设备及基站
CN103179552A (zh) 查询通话相对方信息的方法和装置
US10078740B2 (en) Method to fetch functionality across applications
CN113342759A (zh) 内容共享方法、装置、设备以及存储介质
CN103379022B (zh) 一种基于互联网地图搜索的即时通讯方法和系统
AU2020412338A1 (en) Method and device for improving the searchability of incident-specific social media content posted via particularly identified communication devices
US10771578B2 (en) Webpage loading method and apparatus
WO2019242279A1 (zh) 一种消息处理方法及装置
US10068065B2 (en) Assignment of a machine-readable link to content as a payoff
CN107295179A (zh) 一种短信息显示的方法和装置
EP2809049B1 (en) An intelligent system of unified content posting
CN108920589B (zh) 浏览劫持识别方法、装置、服务器及存储介质
CN106845202B (zh) 用于人脸识别系统的文件存取方法、装置和系统
US11736336B2 (en) Real-time monitoring of machine learning models in service orchestration plane
CN113938646A (zh) 一种信息实时显示方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15871822

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15871822

Country of ref document: EP

Kind code of ref document: A1