Method and device for processing request
Through layer templates and offset encryption processing between the server and terminal, garbled response results are generated and layer display data are merged, which solves the problem of data being easily crawled and improves data security and user experience.
Patent Information
- Application Number
- CN202010382979.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-08
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2040-05-08
AI Technical Summary
In the prior art, data is directly passed from the server to the terminal, resulting in data being easily crawled and has low security.
Data is processed through layer templates and offset encryption on the server side, garbled response results are generated, and layers are parsed and merged at the terminal side to display data, increasing the difficulty of data acquisition.
It reduces the risk of data being crawled, improves data security, and does not affect the normal user experience.
Smart Images

Figure CN113626832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing a request. Background Art
[0002] Currently, the existing request processing process includes: the terminal sends a request to the server; the server obtains at least one data according to the request and directly sends the at least one data to the terminal; and the terminal displays the at least one data.
[0003] In the process of implementing the present invention, the inventors discovered that the prior art has at least the following problems:
[0004] Since at least one data is directly transmitted from the server to the terminal without any processing, the data can be easily crawled and the data security is not high. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a method and apparatus for processing requests, which can reduce the risk of data being crawled and improve data security.
[0006] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for processing a request is provided.
[0007] The method for processing a request according to an embodiment of the present invention, applied to a server, includes:
[0008] receiving a first request, and acquiring at least one data, a first layer template, and a second layer template according to the first request;
[0009] identifying sub-data in the data, and selecting at least one first sub-data from all the sub-data;
[0010] Generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template;
[0011] A response result of the first request is generated according to an offset of at least one first sub-data, the first layer, and the second layer, and the response result of the first request is sent.
[0012] In one embodiment, generating a first layer according to the at least one data and the first layer template, and generating a second layer according to the at least one first sub-data and the second layer template, includes:
[0013] Replacing each first sub-data in the at least one data with a placeholder to obtain at least one new data;
[0014] Adding the new data to the first layer template to obtain a first layer;
[0015] For each first sub-data, obtaining a target format of the first sub-data, and performing format conversion on the first sub-data according to the target format to obtain second sub-data; the target format is the same as the format of the placeholder to which the first sub-data belongs in the first layer;
[0016] Add all the second sub-data to the second layer template to obtain the second layer.
[0017] In one embodiment, generating a response result of the first request according to the offset of at least one first sub-data, the first layer, and the second layer includes:
[0018] For each first sub-data, determining the first coordinates of the position of the placeholder to which the first sub-data belongs on the first layer with the preset position of the first layer as the origin; determining the second coordinates of the initial position of the second sub-data to which the first sub-data belongs on the second layer with the preset position of the second layer as the origin; and determining the coordinates of the second coordinates relative to the first coordinates as the offset of the first sub-data;
[0019] encrypting the offsets of all first sub-data together to obtain encrypted data;
[0020] The encrypted data, the first layer, and the second layer are determined as a response result of the first request.
[0021] In one embodiment, the method further comprises:
[0022] Determining and sending an area of the first layer occupied by each data in the at least one data and an identifier of each data;
[0023] receiving a second request, and updating the number of requests of the terminal according to the second request, wherein the second request matches the first request;
[0024] Determine whether the number of requests is equal to a threshold; if so, end; if not, obtain and send a response result of the second request.
[0025] In one embodiment, the first request includes a request message, a size of the terminal screen, and a display direction of the terminal screen;
[0026] Acquiring at least one data, a first layer template, and a second layer template according to the first request includes:
[0027] Acquire at least one data that matches the request message, the size, and the display direction;
[0028] A first layer template and a second layer template that match both the size and the display direction are obtained respectively.
[0029] In one embodiment, determining the encrypted data, the first layer, and the second layer as a response result of the first request includes:
[0030] Obtain a basemap style layer that matches the size and display direction;
[0031] The encrypted data, the first layer, the second layer, and the basemap style layer are determined as a response result of the first request.
[0032] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for processing a request is provided.
[0033] The method for processing a request according to an embodiment of the present invention, applied to a terminal, includes:
[0034] Sending a first request, and receiving a response result of the first request;
[0035] Parsing the response result of the first request to obtain at least one first sub-data offset, a first layer, and a second layer;
[0036] Modify the second layer according to the offset of the at least one first sub-data to obtain a third layer;
[0037] The first layer and the third layer are merged to obtain a picture containing at least one data, and the picture is displayed.
[0038] In one embodiment, modifying the second layer according to the offset of the at least one first sub-data to obtain the third layer includes:
[0039] For each first sub-data, taking the preset position of the second layer as the origin, determine the second coordinate of the initial position of the second sub-data to which the first sub-data belongs in the second layer, and determine the final position of the second sub-data to which the first sub-data belongs in the second layer based on the second coordinate and the offset of the first sub-data;
[0040] Each second sub-data in the second layer is moved from an initial position to a final position to obtain a third layer.
[0041] In one embodiment, a basemap style layer is parsed from the response result of the first request;
[0042] Merging the first layer and the third layer to obtain a picture containing at least one data includes:
[0043] Taking the preset position of the first layer, the preset position of the third layer, and the preset position of the base map style layer as base points, the first layer, the third layer, and the base map style layer are merged to obtain a picture containing at least one data.
[0044] In one embodiment, the method further comprises:
[0045] Receiving an area occupied by each data item of the first layer and an identifier of each data item in at least one data item;
[0046] In response to an instruction input by a user, determining a click position and an operation mode, and selecting a target area including the click position from at least one area;
[0047] generating a second request according to the identifier of the data occupying the target area and the operation mode, and sending the second request;
[0048] Receive a response result of the second request.
[0049] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for processing a request is provided.
[0050] The method for processing a request according to an embodiment of the present invention includes:
[0051] The server receives a first request, obtains at least one data, a first layer template, and a second layer template according to the first request, identifies sub-data in the data, and selects at least one first sub-data from all the sub-data; generates a first layer according to the at least one data and the first layer template, and generates a second layer according to the at least one first sub-data and the second layer template; generates a response result to the first request according to an offset of the at least one first sub-data, the first layer, and the second layer, and sends the response result to the first request;
[0052] The terminal sends the first request and receives a response result of the first request; parses the offset of the at least one first sub-data, the first layer, and the second layer from the response result of the first request; modifies the second layer according to the offset of the at least one first sub-data to obtain a third layer; merges the first layer and the third layer to obtain a picture containing the at least one data, and displays the picture.
[0053] To achieve the above objective, according to one aspect of an embodiment of the present invention, a device for processing a request is provided.
[0054] The apparatus for processing a request according to an embodiment of the present invention, applied to a server, includes:
[0055] An acquiring unit, configured to receive a first request, and acquire at least one data, a first layer template, and a second layer template according to the first request;
[0056] an identification unit, configured to identify sub-data in the data and select at least one first sub-data from all the sub-data;
[0057] a first processing unit, configured to generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template;
[0058] The second processing unit is used to generate a response result of the first request according to the offset of at least one first sub-data, the first layer and the second layer, and send the response result of the first request.
[0059] In one embodiment, the first processing unit is configured to:
[0060] Replacing each first sub-data in the at least one data with a placeholder to obtain at least one new data;
[0061] Adding the new data to the first layer template to obtain a first layer;
[0062] For each first sub-data, obtaining a target format of the first sub-data, and performing format conversion on the first sub-data according to the target format to obtain second sub-data; the target format is the same as the format of the placeholder to which the first sub-data belongs in the first layer;
[0063] Add all the second sub-data to the second layer template to obtain the second layer.
[0064] In one embodiment, the second processing unit is configured to:
[0065] For each first sub-data, determining the first coordinates of the position of the placeholder to which the first sub-data belongs on the first layer with the preset position of the first layer as the origin; determining the second coordinates of the initial position of the second sub-data to which the first sub-data belongs on the second layer with the preset position of the second layer as the origin; and determining the coordinates of the second coordinates relative to the first coordinates as the offset of the first sub-data;
[0066] encrypting the offsets of all first sub-data together to obtain encrypted data;
[0067] The encrypted data, the first layer, and the second layer are determined as a response result of the first request.
[0068] In one embodiment, the apparatus further comprises:
[0069] a third processing unit, configured to determine and send an area of the first layer occupied by each data item in the at least one data item and an identifier of each data item;
[0070] receiving a second request, and updating the number of requests of the terminal according to the second request, wherein the second request matches the first request;
[0071] Determine whether the number of requests is equal to a threshold; if so, end; if not, obtain and send a response result of the second request.
[0072] In one embodiment, the first request includes a request message, a size of the terminal screen, and a display direction of the terminal screen;
[0073] The acquisition unit is used to:
[0074] Acquire at least one data that matches the request message, the size, and the display direction;
[0075] A first layer template and a second layer template that match both the size and the display direction are obtained respectively.
[0076] In one embodiment, the second processing unit is configured to:
[0077] Obtain a basemap style layer that matches the size and display direction;
[0078] The encrypted data, the first layer, the second layer, and the basemap style layer are determined as a response result of the first request.
[0079] To achieve the above objective, according to one aspect of an embodiment of the present invention, a device for processing a request is provided.
[0080] The apparatus for processing a request according to an embodiment of the present invention, applied to a terminal, includes:
[0081] a transceiver unit, configured to send a first request and receive a response result of the first request;
[0082] a parsing unit, configured to parse the response result of the first request to obtain at least one first sub-data offset, a first layer, and a second layer;
[0083] a modifying unit, configured to modify the second layer according to the offset of the at least one first sub-data to obtain a third layer;
[0084] The merging unit is configured to merge the first layer and the third layer to obtain a picture containing at least one data, and display the picture.
[0085] In one embodiment, the modification unit is configured to:
[0086] For each first sub-data, taking the preset position of the second layer as the origin, determine the second coordinate of the initial position of the second sub-data to which the first sub-data belongs in the second layer, and determine the final position of the second sub-data to which the first sub-data belongs in the second layer based on the second coordinate and the offset of the first sub-data;
[0087] Each second sub-data in the second layer is moved from an initial position to a final position to obtain a third layer.
[0088] In one embodiment, the parsing unit is configured to:
[0089] Parsing the basemap style layer from the response result of the first request;
[0090] Merging cells are used to:
[0091] Taking the preset position of the first layer, the preset position of the third layer, and the preset position of the base map style layer as base points, the first layer, the third layer, and the base map style layer are merged to obtain a picture containing at least one data.
[0092] In one embodiment, the apparatus further comprises:
[0093] A fourth processing unit is configured to receive an area of the first layer occupied by each data item in at least one data item and an identifier of each data item;
[0094] In response to an instruction input by a user, determining a click position and an operation mode, and selecting a target area including the click position from at least one area;
[0095] generating a second request according to the identifier of the data occupying the target area and the operation mode, and sending the second request;
[0096] Receive a response result of the second request.
[0097] To achieve the above objective, according to one aspect of an embodiment of the present invention, a system for processing requests is provided.
[0098] The system for processing requests according to an embodiment of the present invention includes:
[0099] The server is configured to receive a first request, obtain at least one data, a first layer template, and a second layer template according to the first request, identify sub-data in the data, and select at least one first sub-data from all the sub-data, generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template, generate a response result to the first request according to an offset of the at least one first sub-data, the first layer, and the second layer, and send the response result to the first request;
[0100] The terminal is used to send the first request and receive a response result of the first request; parse the offset of the at least one first sub-data, the first layer, and the second layer from the response result of the first request; modify the second layer according to the offset of the at least one first sub-data to obtain a third layer; merge the first layer and the third layer to obtain a picture containing the at least one data, and display the picture.
[0101] To achieve the above objective, according to one aspect of an embodiment of the present invention, an electronic device is provided.
[0102] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing requests provided by an embodiment of the present invention.
[0103] To achieve the above objective, according to one aspect of an embodiment of the present invention, a computer-readable medium is provided.
[0104] A computer-readable medium according to an embodiment of the present invention stores a computer program, which, when executed by a processor, implements the method for processing a request provided by an embodiment of the present invention.
[0105] An embodiment of the above invention has the following advantages or beneficial effects: various parts of the data are placed on different layers, which increases the difficulty of obtaining the data. Only the first and second layers obtain garbled characters. The offset of the first sub-data further increases the difficulty of obtaining the data. What is finally obtained is a picture containing the data, which further increases the difficulty of obtaining the data, reduces the risk of data being crawled, and improves the security of the data.
[0106] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0107] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.
[0108] Figure 1 is a schematic diagram of the main process of a method for processing a request according to an embodiment of the present invention;
[0109] Figure 2 is a schematic diagram of the main process of a method for processing a request according to another embodiment of the present invention;
[0110] Figure 3 is an interactive schematic diagram of a method for processing a request according to yet another embodiment of the present invention;
[0111] Figure 4 is a schematic diagram of main units of an apparatus for processing a request according to an embodiment of the present invention;
[0112] Figure 5 is a schematic diagram of main units of an apparatus for processing a request according to another embodiment of the present invention;
[0113] Figure 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
[0114] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0115] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0116] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0117] Currently, e-commerce companies offer promotions, discounts, and other offers to attract users, increase traffic, enhance brand influence, and strengthen customer loyalty. These offers opportunities for unauthorized users to obtain high rewards at little or no cost. To achieve these goals and minimize losses, various anti-scam measures (e.g., traffic restrictions, verification codes, blacklists, etc.) and anti-crawling methods have emerged.
[0118] An existing anti-crawler method involves collecting user access information, determining normal user characteristics, and constructing a normal user access model; defining access that does not conform to the model as abnormal access; using a clustering algorithm to determine the probability that the abnormal access is a crawler; and if the probability is outside a preset range, using crawler identification rules to authenticate the access to verify whether the access is a crawler. If a user's access is authenticated multiple times, the user's access is suspended.
[0119] Another existing anti-crawling method includes: the crawler itself has the function of detecting web pages. When the user browses the web page, it reads and collects web page information, and compares the web page information with the sample. When the comparison result is the same, the web page automatically pops up a warning window. The user confirms the type of malicious crawler and whether to intercept the malicious crawler through the warning window, generates data on the malicious crawler, and records it to detect and intercept malicious crawlers in the web page, preventing malicious crawlers from obtaining network data without authorization.
[0120] In summary, the existing technology does not achieve anti-crawling from the perspective of the data itself.
[0121] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a method for processing a request, which is applied to a server, such as Figure 1 As shown, the method includes:
[0122] Step S101: Receive a first request, and obtain at least one data, a first layer template, and a second layer template according to the first request.
[0123] In this step, when implemented, the at least one data may be at least one review (the review may be an item review or a service review, etc.) or at least one news item, etc. In addition, the specific implementation of this step is described in detail below and will not be repeated here.
[0124] Step S102: Identify sub-data in the data, and select at least one first sub-data from all sub-data.
[0125] The following is a specific example to illustrate this step: at least one data is five comments; for each comment, natural speech recognition technology is used to identify the predicate of the comment; three predicates are selected from the five predicates; and each of the three predicates is determined as the first sub-data.
[0126] A predicate is a term that describes or determines the properties, characteristics, or relationships between objects.
[0127] It should be understood that, without affecting the embodiments of the present invention, those skilled in the art can flexibly determine which part of the data is sub-data, for example, determining the body words in the comments as sub-data.
[0128] In addition, at least one first sub-data can be randomly selected.
[0129] Step S103: Generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template.
[0130] The specific implementation of this step is introduced in detail below and will not be elaborated here.
[0131] Step S104: Generate a response result of the first request according to the offset of at least one first sub-data, the first layer, and the second layer, and send the response result of the first request.
[0132] In this step, it should be noted that the generation of the response result of the first request is described in detail below and will not be elaborated here. The response result of the first request is sent to the terminal.
[0133] In an embodiment of the present invention, generating a first layer according to the at least one data and the first layer template, and generating a second layer according to the at least one first sub-data and the second layer template includes:
[0134] Replace each first sub-data in the at least one data with a placeholder respectively to obtain at least one new data;
[0135] Add the new data to the first layer template to obtain a first layer;
[0136] For each first sub-data, obtain the target format of the first sub-data, and perform format conversion on the first sub-data according to the target format to obtain a second sub-data; the target format is the same as the format of the placeholder to which the first sub-data belongs in the first layer;
[0137] Add all the second sub-data to the second layer template to obtain a second layer.
[0138] In this embodiment, specifically in implementation, the placeholder can be a space.
[0139] The following uses a specific example to illustrate obtaining the second sub-data: The first sub-data is "yes", the target format is Song typeface, and "yes" is formatted according to Song typeface to obtain "yes" in Song typeface.
[0140] The following is a specific example to illustrate adding new data to the first layer template: at least one data is three data, and each first sub-data in the three data is replaced by a placeholder to obtain three new data; the three new data are arranged to obtain the arrangement value of each new data; the first layer template includes three boxes, and the three boxes are distributed in the first layer template from top to bottom, the new data with the largest arrangement value is added to the top box, the new data with the smallest arrangement value is added to the bottom box, and the remaining new data are added to the remaining boxes to obtain the first layer.
[0141] There is no restriction on where the second sub-data is added to the second layer template.
[0142] In this embodiment, a first layer lacking the first sub-data is generated, and a second layer is generated based on the first sub-data, which further increases the difficulty of obtaining data, further reduces the risk of data being crawled, and further improves data security.
[0143] In the embodiment of the present invention, generating a response result of the first request according to the offset of at least one first sub-data, the first layer, and the second layer includes:
[0144] For each first sub-data, determining the first coordinates of the position of the placeholder to which the first sub-data belongs on the first layer with the preset position of the first layer as the origin; determining the second coordinates of the initial position of the second sub-data to which the first sub-data belongs on the second layer with the preset position of the second layer as the origin; and determining the coordinates of the second coordinates relative to the first coordinates as the offset of the first sub-data;
[0145] encrypting the offsets of all first sub-data together to obtain encrypted data;
[0146] The encrypted data, the first layer, and the second layer are determined as a response result of the first request.
[0147] In this embodiment, during specific implementation, the offsets of all first sub-data are encrypted together using the MD5 encryption algorithm and the first key to obtain encrypted data.
[0148] The following is a specific example to illustrate the process of obtaining the offset of the first sub-data:
[0149] Rank each comment in at least one comment to obtain a ranking value of each comment;
[0150] The predicate in a comment with a permutation value of 1 is selected as the first sub-data. This predicate is the second character of the comment. The predicate in the comment is replaced with a placeholder to create a new comment. The position of the first character of the new comment on the first layer is known. The position of the first character of the new comment on the first layer and the fact that the predicate is the second character of the comment are used to determine the position of the placeholder to which the predicate belongs on the first layer. The predicate is formatted to obtain the second sub-data. After adding the second sub-data to the second layer template, the initial position of the second sub-data to which the predicate belongs on the second layer is determined. A rectangular coordinate system is established with the upper left corner of the first layer as the coordinate origin. The first coordinate is determined by the position of the placeholder to which the predicate belongs on the first layer. The rectangular coordinate system is established with the upper left corner of the second layer as the coordinate origin. The second coordinate is determined by the initial position of the second sub-data associated with the predicate in the second layer. The abscissa value of the second coordinate is subtracted from the abscissa value of the first coordinate to obtain the first value, and the ordinate value of the second coordinate is subtracted from the ordinate value of the first coordinate to obtain the second value. The abscissa value of the offset of the predicate is the first value, and the ordinate value of the offset of the predicate is the second value. In addition, the parameters of all rectangular coordinate systems in this article are the same.
[0151] It should be noted that the encrypted data, the first layer and the second layer are determined as the response result of the first request. Therefore, the response result of the first request contains a small amount of data and does not affect user use.
[0152] In this embodiment, the offset of the first sub-data is obtained using the first coordinate of the position of the placeholder to which the first sub-data belongs in the first layer, and the second coordinate of the initial position of the second sub-data to which the first sub-data belongs in the second layer, which further increases the difficulty of obtaining data. The offset of the first sub-data is encrypted, which further increases the difficulty of obtaining data, further reduces the risk of data being crawled, and further improves the security of the data.
[0153] In an embodiment of the present invention, the method further includes:
[0154] Determining and sending an area of the first layer occupied by each data in the at least one data and an identifier of each data;
[0155] receiving a second request, and updating the number of requests of the terminal according to the second request, wherein the second request matches the first request;
[0156] Determine whether the number of requests is equal to a threshold; if so, end; if not, obtain and send a response result of the second request.
[0157] In this embodiment, for each data item, the range of the new data covering the first layer is determined as the area occupied by the data item. The data identifier can be a number or letter. Furthermore, the number of requests from the terminal can be the number of requests from the terminal within a period. The period can be one hour, half a day, etc.
[0158] The following is a specific example to illustrate updating the terminal's request count according to the second request: before receiving the second request, the terminal's request count is 3. When receiving the second request, the terminal's request count is updated from 3 to 4.
[0159] The first request and the second request are explained below with a specific example: the first request is to request reviews of jeans, the terminal displays a picture with five reviews of jeans, and the second request is to request to copy one of the five reviews.
[0160] The threshold can be set according to requirements.
[0161] The following is a specific example to illustrate how to obtain the response result of the second request: the second request includes the identification of the data occupying the target area and the operation mode, the operation mode is copy, and the data is obtained based on the identification of the data occupying the target area. Since the operation mode is copy, the data is determined as the response result of the second request.
[0162] If the number of requests reaches the threshold, the process ends and the user is identified as a risky user. A second request from the user is not responded to, without impacting other users. The area occupied by each piece of data on the first layer and the identifier of each piece of data are determined and sent, allowing users to manipulate the data and improving the user experience.
[0163] In an embodiment of the present invention, the first request includes a request message, a size of the terminal screen, and a display direction of the terminal screen;
[0164] Acquiring at least one data, a first layer template, and a second layer template according to the first request includes:
[0165] Acquire at least one data that matches the request message, the size, and the display direction;
[0166] A first layer template and a second layer template that match both the size and the display direction are obtained respectively.
[0167] In this embodiment, multiple data matching the request message are retrieved from a database, and at least one data item is selected from the multiple data items based on size and display mode. This is because the display of multiple data items is limited by size and display orientation. Furthermore, the size and display orientation, as well as the first and second layer templates that match both sizes and display orientations, are pre-stored in the database to process the request.
[0168] If the terminal is a mobile phone, the size of the terminal screen may be 5 inches or 6.5 inches, etc. If the terminal is a notebook, the size of the terminal screen may be 14 inches or 15.6 inches, etc. The display orientation of the terminal screen may be landscape or portrait.
[0169] In another embodiment, determining the encrypted data, the first layer, and the second layer as a response result of the first request includes:
[0170] Obtain a basemap style layer that matches the size and display direction;
[0171] The encrypted data, the first layer, the second layer, and the basemap style layer are determined as a response result of the first request.
[0172] In this embodiment, the base map style layer may be a layer containing a background color or a layer containing a watermark, etc.
[0173] It should be noted that by changing the first layer template and the base map style layer, the image obtained by the terminal can be changed, resulting in different display effects, thereby flexibly displaying at least one data and improving the user experience.
[0174] In another embodiment, the first request includes a request message and terminal information;
[0175] Acquiring at least one data, a first layer template, and a second layer template according to the first request includes:
[0176] Acquire at least one data that matches both the request message and the terminal information;
[0177] Respectively obtain the first layer template and the second layer template that match the terminal information;
[0178] The terminal information includes the resolution of the terminal screen, the size of the terminal screen, and the display direction of the terminal screen.
[0179] In this embodiment, the resolution of the terminal screen may be 1080*960.
[0180] The terminal screen has different resolutions, the amount of data in at least one data is different, the first layer template is different, and the second layer template is different. Thus, the terminal display effect is higher and the user experience is improved.
[0181] In order to solve the problems existing in the prior art, another embodiment of the present invention provides a method for processing a request, which is applied to a terminal, such as Figure 2 As shown, the method includes:
[0182] S201: Send a first request and receive a response to the first request.
[0183] S202: Parse the response result of the first request to obtain at least one first sub-data offset, a first layer, and a second layer.
[0184] S203: Modify the second layer according to the offset of the at least one first sub-data to obtain a third layer.
[0185] S204: Merge the first layer and the third layer to obtain a picture containing at least one data, and display the picture.
[0186] In this embodiment, the response to the first request includes encrypted data, a first layer, and a second layer. The encrypted data is decrypted using the MD5 encryption algorithm and the second key to obtain the offset of at least one first sub-data. The first key and the second key are identical or match. The specific implementation methods for obtaining the third layer and the image are described in detail below and will not be repeated here.
[0187] In the embodiment of the present invention, modifying the second layer according to the offset of the at least one first sub-data to obtain the third layer includes:
[0188] For each first sub-data, taking the preset position of the second layer as the origin, determine the second coordinate of the initial position of the second sub-data to which the first sub-data belongs in the second layer, and determine the final position of the second sub-data to which the first sub-data belongs in the second layer based on the second coordinate and the offset of the first sub-data;
[0189] Each second sub-data in the second layer is moved from an initial position to a final position to obtain a third layer.
[0190] In this embodiment, during specific implementation, a rectangular coordinate system is established with the upper left corner of the second layer as the coordinate origin. The second coordinate is determined by the initial position of the second sub-data belonging to the first sub-data in the second layer. The abscissa value of the second coordinate is subtracted from the abscissa value of the offset of the first sub-data to obtain a third value. The ordinate value of the second coordinate is subtracted from the ordinate value of the offset of the first sub-data to obtain a fourth value. The position where the abscissa value is the third value and the ordinate value is the fourth value is the final position of the second sub-data belonging to the first sub-data in the second layer.
[0191] The offset of the first sub-data and the second sub-data in the second layer (the second sub-data is obtained by format conversion of the first sub-data) can have the same identifier, so that the second sub-data in the second layer is moved from the initial position to the final position, and the same identifier is deleted when the movement is completed, thereby obtaining a third layer.
[0192] The final position of the second sub-data to which the first sub-data belongs in the second layer is the same as the position of the placeholder to which the first sub-data belongs in the first layer.
[0193] In this embodiment, the initial position and the final position are determined, so that each second sub-data in the second layer is moved from the initial position to the final position to obtain a third layer. The first layer, the third layer and the base map style layer are merged to obtain a picture containing at least one data, thereby further reducing the risk of data being crawled and further improving data security.
[0194] In an embodiment of the present invention, merging the first layer and the third layer to obtain a picture containing at least one data includes:
[0195] The first layer and the third layer are merged based on the preset position of the first layer and the preset position of the third layer to obtain a picture containing at least one data.
[0196] In this embodiment, during specific implementation, the first layer may include a background color or a watermark, etc., or the first layer may not include a background color or a watermark, etc.
[0197] In this embodiment, the image can only be obtained by merging based on the preset position, otherwise the image cannot be obtained, which further reduces the risk of data being crawled and further improves the security of the data.
[0198] In another embodiment, the basemap style layer is parsed from the response result of the first request;
[0199] Merging the first layer and the third layer to obtain a picture containing at least one data includes:
[0200] Taking the preset position of the first layer, the preset position of the third layer, and the preset position of the base map style layer as base points, the first layer, the third layer, and the base map style layer are merged to obtain a picture containing at least one data.
[0201] In this embodiment, the response result of the first request also includes a base map style layer.
[0202] The preset position can be the upper left corner or the lower left corner, etc. In addition, the first layer, the second layer, and the basemap style layer have the same shape and size.
[0203] In an embodiment of the present invention, the method further includes:
[0204] Receiving an area occupied by each data item of the first layer and an identifier of each data item in at least one data item;
[0205] In response to an instruction input by a user, determining a click position and an operation mode, and selecting a target area including the click position from at least one area;
[0206] generating a second request according to the identifier of the data occupying the target area and the operation mode, and sending the second request;
[0207] Receive a response result of the second request.
[0208] In this embodiment, during specific implementation, the operation mode may be copying or forwarding. The click position may be a point on the terminal screen, and the target area may be multiple points on the terminal screen. In addition, the identifiers of the area and the data have a one-to-one correspondence, so that the identifier of the data occupying the target area can be determined based on the target area.
[0209] In this embodiment, the user's operation on at least one data item in the image is not affected, thereby ensuring the user's interaction with the terminal and improving the user experience. The data item to be operated by the user is determined by the click position, the identifier of each data item, and the at least one area, thereby improving the user experience.
[0210] In order to solve the problems existing in the prior art, another embodiment of the present invention provides a method for processing a request, such as Figure 3 As shown, the method includes:
[0211] S301: The terminal generates a first request and sends the first request to the server.
[0212] Specifically, the terminal generates a first request in response to a query instruction from the user.
[0213] S302. The server receives a first request and obtains at least one data, a first layer template, a second layer template, and a base map style layer according to the first request; identifies sub-data in the data and selects at least one first sub-data from all sub-data; generates a first layer according to the at least one data and the first layer template, and generates a second layer according to the at least one first sub-data and the second layer template; generates a response result to the first request according to the offset of the at least one first sub-data, the first layer, the second layer, and the base map style layer; determines the area of the first layer occupied by each data in the at least one data and the identifier of each data; and sends the response result to the first request, the area of the first layer occupied by each data in the at least one data, and the identifier of each data to the terminal.
[0214] S303. The terminal receives a response result of the first request, an area of the first layer occupied by each data in the at least one data, and an identifier of each data; parses the offset of the at least one first sub-data, the first layer, the second layer, and the base map style layer from the response result of the first request; modifies the second layer according to the offset of the at least one first sub-data to obtain a third layer; merges the first layer, the third layer, and the base map style layer to obtain a picture containing the at least one data, and displays the picture.
[0215] S304. The terminal determines the click position and operation mode in response to the instruction input by the user, selects a target area including the click position from at least one area, generates a second request according to the identifier of the data occupying the target area and the operation mode, and sends the second request.
[0216] S305. The server receives the second request and updates the number of requests of the terminal according to the second request; the second request matches the first request; and determines whether the number of requests is equal to the threshold. If not, obtains the response result of the second request and sends it to the terminal.
[0217] S306: The terminal receives a response result of the second request.
[0218] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a device for processing requests, which is applied to a server, such as Figure 4 As shown, the device includes:
[0219] The acquisition unit 401 is configured to receive a first request and acquire at least one data, a first layer template, and a second layer template according to the first request.
[0220] The identification unit 402 is configured to identify sub-data in the data and select at least one first sub-data from all the sub-data.
[0221] The first processing unit 403 is configured to generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template.
[0222] The second processing unit 404 is configured to generate a response result of the first request according to an offset of at least one first sub-data, the first layer, and the second layer, and send the response result of the first request.
[0223] In this embodiment of the present invention, the first processing unit 403 is configured to:
[0224] Replacing each first sub-data in the at least one data with a placeholder to obtain at least one new data;
[0225] Adding the new data to the first layer template to obtain a first layer;
[0226] For each first sub-data, obtaining a target format of the first sub-data, and performing format conversion on the first sub-data according to the target format to obtain second sub-data; the target format is the same as the format of the placeholder to which the first sub-data belongs in the first layer;
[0227] Add all the second sub-data to the second layer template to obtain the second layer.
[0228] In this embodiment of the present invention, the second processing unit 404 is configured to:
[0229] For each first sub-data, determining the first coordinates of the position of the placeholder to which the first sub-data belongs on the first layer with the preset position of the first layer as the origin; determining the second coordinates of the initial position of the second sub-data to which the first sub-data belongs on the second layer with the preset position of the second layer as the origin; and determining the coordinates of the second coordinates relative to the first coordinates as the offset of the first sub-data;
[0230] encrypting the offsets of all first sub-data together to obtain encrypted data;
[0231] The encrypted data, the first layer, and the second layer are determined as a response result of the first request.
[0232] In an embodiment of the present invention, the device further includes:
[0233] a third processing unit, configured to determine and send an area of the first layer occupied by each data item in the at least one data item and an identifier of each data item;
[0234] receiving a second request, and updating the number of requests of the terminal according to the second request, wherein the second request matches the first request;
[0235] Determine whether the number of requests is equal to a threshold; if so, end; if not, obtain and send a response result of the second request.
[0236] In an embodiment of the present invention, the first request includes a request message, a size of the terminal screen, and a display direction of the terminal screen;
[0237] The acquisition unit 401 is used to:
[0238] Acquire at least one data that matches the request message, the size, and the display direction;
[0239] A first layer template and a second layer template that match both the size and the display direction are obtained respectively.
[0240] In this embodiment of the present invention, the second processing unit is configured to:
[0241] Obtain a basemap style layer that matches the size and display direction;
[0242] The encrypted data, the first layer, the second layer, and the basemap style layer are determined as a response result of the first request.
[0243] It should be noted that the specific implementation of this embodiment is different from Figure 1 The specific implementation methods of the illustrated embodiments are the same and will not be repeated here.
[0244] In order to solve the problems existing in the prior art, another embodiment of the present invention provides a device for processing a request, which is applied to a terminal, such as Figure 5 As shown, the device includes:
[0245] The transceiver unit 501 is configured to send a first request and receive a response to the first request.
[0246] The parsing unit 502 is configured to parse the response result of the first request to obtain at least one first sub-data offset, a first layer, and a second layer.
[0247] The modifying unit 503 is configured to modify the second layer according to the offset of the at least one first sub-data to obtain a third layer.
[0248] The merging unit 504 is configured to merge the first layer and the third layer to obtain a picture containing at least one data, and display the picture.
[0249] In this embodiment of the present invention, the modifying unit 503 is configured to:
[0250] For each first sub-data, taking the preset position of the second layer as the origin, determine the second coordinate of the initial position of the second sub-data to which the first sub-data belongs in the second layer, and determine the final position of the second sub-data to which the first sub-data belongs in the second layer based on the second coordinate and the offset of the first sub-data;
[0251] Each second sub-data in the second layer is moved from an initial position to a final position to obtain a third layer.
[0252] In the embodiment of the present invention, the parsing unit 502 is used to:
[0253] Parsing the basemap style layer from the response result of the first request;
[0254] The merging unit 504 is used to:
[0255] Taking the preset position of the first layer, the preset position of the third layer, and the preset position of the base map style layer as base points, the first layer, the third layer, and the base map style layer are merged to obtain a picture containing at least one data.
[0256] In an embodiment of the present invention, the device further includes:
[0257] A fourth processing unit is configured to receive an area of the first layer occupied by each data item in at least one data item and an identifier of each data item;
[0258] In response to an instruction input by a user, determining a click position and an operation mode, and selecting a target area including the click position from at least one area;
[0259] generating a second request according to the identifier of the data occupying the target area and the operation mode, and sending the second request;
[0260] Receive a response result of the second request.
[0261] It should be noted that the specific implementation of this embodiment is different from Figure 2 The specific implementation methods of the illustrated embodiments are the same and will not be repeated here.
[0262] In order to solve the problems existing in the prior art, another embodiment of the present invention provides a system for processing requests, the system comprising:
[0263] The server is configured to receive a first request, obtain at least one data, a first layer template, and a second layer template according to the first request, identify sub-data in the data, and select at least one first sub-data from all the sub-data, generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template, generate a response result to the first request according to an offset of the at least one first sub-data, the first layer, and the second layer, and send the response result to the first request;
[0264] The terminal is used to send the first request and receive a response result of the first request; parse the offset of the at least one first sub-data, the first layer, and the second layer from the response result of the first request; modify the second layer according to the offset of the at least one first sub-data to obtain a third layer; merge the first layer and the third layer to obtain a picture containing the at least one data, and display the picture.
[0265] Figure 6 An exemplary system architecture 600 is shown to which the method for processing a request or the apparatus for processing a request according to an embodiment of the present invention can be applied.
[0266] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0267] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0268] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0269] Server 605 may be a server that provides various services, such as a backend management server (for example only) that supports shopping websites browsed by users using terminal devices 601, 602, and 603. The backend management server may analyze and process received data such as product information query requests, and feed back processing results (for example, target push information and product information—for example only) to the terminal device.
[0270] It should be noted that the method for processing requests provided in the embodiment of the present invention is generally executed by the server 605 and the terminal. Accordingly, the device for processing requests is generally set in the server 605 and the terminal.
[0271] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0272] Reference below Figure 7 , which shows a schematic structural diagram of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0273] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the system 700 are also stored in the RAM 703. The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0274] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output section 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or a modem. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 710 as needed, so that computer programs read therefrom can be installed into the storage section 708 as needed.
[0275] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0276] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0277] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a unit, program segment, or a part of code, and the above-mentioned unit, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0278] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor includes an acquisition unit, an identification unit, a first processing unit, and a second processing unit. The names of these units do not, in some cases, limit the units themselves. For example, the identification unit may also be described as "a unit that identifies sub-data in the data and selects at least one first sub-data from all sub-data."
[0279] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: receiving a first request, obtaining at least one data, a first layer template, and a second layer template according to the first request; identifying sub-data in the data, and selecting at least one first sub-data from all sub-data; generating a first layer according to the at least one data and the first layer template, and generating a second layer according to the at least one first sub-data and the second layer template; generating a response result to the first request according to the offset of the at least one first sub-data, the first layer, and the second layer, and sending the response result to the first request.
[0280] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as follows: a processor including a transceiver unit, a parsing unit, a modification unit, and a merging unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the parsing unit may also be described as "a unit that parses the offset of at least one first sub-data, a first layer, and a second layer from the response result of the first request."
[0281] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment, or may exist independently and not be incorporated into the device. The computer-readable medium carries one or more programs. When executed by a device, the device performs the following operations: sending a first request and receiving a response to the first request; parsing the response to the first request to obtain an offset of at least one first sub-data, a first layer, and a second layer; modifying the second layer according to the offset of the at least one first sub-data to obtain a third layer; merging the first layer and the third layer to obtain an image containing at least one data, and displaying the image.
[0282] According to the technical solution of the embodiment of the present invention, various parts of the data are placed on different layers, which increases the difficulty of obtaining the data. Only the first and second layers obtain garbled characters. The offset of the first sub-data further increases the difficulty of obtaining the data. What is finally obtained is a picture containing the data, which further increases the difficulty of obtaining the data, reduces the risk of data being crawled, and improves the security of the data.
[0283] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for processing a request, characterized in that: Applicable to servers, including: receiving a first request from a terminal, and acquiring at least one data, a first layer template, and a second layer template according to the first request; identifying sub-data in the data, and selecting at least one first sub-data from all the sub-data; Generating a first layer based on the at least one data and the first layer template, and generating a second layer based on the at least one first sub-data and the second layer template, including: replacing each first sub-data in the at least one data with a placeholder to obtain at least one new data; adding the new data to the first layer template to obtain the first layer; for each first sub-data, obtaining a target format of the first sub-data, performing format conversion on the first sub-data according to the target format to obtain second sub-data; the target format is the same as the format of the placeholder to which the first sub-data belongs in the first layer; and adding all second sub-data to the second layer template to obtain the second layer; A response result of the first request is generated according to an offset of at least one first sub-data, the first layer, and the second layer, and the response result of the first request is sent.
2. The method according to claim 1, characterized in that Generating a response result of the first request according to the offset of at least one first sub-data, the first layer, and the second layer includes: For each first sub-data, determining the first coordinates of the position of the placeholder to which the first sub-data belongs on the first layer with the preset position of the first layer as the origin; determining the second coordinates of the initial position of the second sub-data to which the first sub-data belongs on the second layer with the preset position of the second layer as the origin; and determining the coordinates of the second coordinates relative to the first coordinates as the offset of the first sub-data; encrypting the offsets of all first sub-data together to obtain encrypted data; The encrypted data, the first layer, and the second layer are determined as a response result of the first request.
3. The method according to claim 1, characterized in that Also includes: Determining and sending an area of the first layer occupied by each data in the at least one data and an identifier of each data; receiving a second request from a terminal, and updating the number of requests from the terminal according to the second request; The second request matches the first request; Determining whether the number of requests is equal to a threshold; If yes, then end; if no, then obtain and send the response result of the second request.
4. The method according to claim 2, characterized in that The first request includes a request message, a size of the terminal screen, and a display direction of the terminal screen; Acquiring at least one data, a first layer template, and a second layer template according to the first request includes: Acquire at least one data that matches the request message, the size, and the display direction; A first layer template and a second layer template that match both the size and the display direction are obtained respectively.
5. The method according to claim 4, characterized in that Determining the encrypted data, the first layer, and the second layer as a response result of the first request includes: Obtain a basemap style layer that matches the size and display direction; The encrypted data, the first layer, the second layer, and the basemap style layer are determined as a response result of the first request.
6. A method for processing a request, characterized in that The terminal according to any one of claims 1 to 5 comprises: Sending a first request, and receiving a response result of the first request; Parsing the response result of the first request to obtain at least one first sub-data offset, a first layer, and a second layer; Modify the second layer according to the offset of the at least one first sub-data to obtain a third layer; The first layer and the third layer are merged to obtain a picture containing at least one data, and the picture is displayed.
7. The method according to claim 6, characterized in that Modifying the second layer according to the offset of the at least one first sub-data to obtain a third layer includes: For each first sub-data, taking the preset position of the second layer as the origin, determine the second coordinate of the initial position of the second sub-data to which the first sub-data belongs in the second layer, and determine the final position of the second sub-data to which the first sub-data belongs in the second layer based on the second coordinate and the offset of the first sub-data; Each second sub-data in the second layer is moved from an initial position to a final position to obtain a third layer.
8. The method according to claim 7, characterized in that Parsing the basemap style layer from the response result of the first request; Merging the first layer and the third layer to obtain a picture containing at least one data includes: Taking the preset position of the first layer, the preset position of the third layer, and the preset position of the base map style layer as base points, the first layer, the third layer, and the base map style layer are merged to obtain a picture containing at least one data.
9. The method according to claim 6, characterized in that Also includes: Receiving an area occupied by each data item of the first layer and an identifier of each data item in at least one data item; In response to an instruction input by a user, determining a click position and an operation mode, and selecting a target area including the click position from at least one area; generating a second request according to the identifier of the data occupying the target area and the operation mode, and sending the second request; Receive a response result of the second request.
10. A device for processing a request, characterized in that: Applicable to servers, including: An acquiring unit, configured to receive a first request from a terminal, and acquire at least one data, a first layer template, and a second layer template according to the first request; an identification unit, configured to identify sub-data in the data and select at least one first sub-data from all the sub-data; a first processing unit, configured to generate a first layer according to the at least one data and the first layer template, and generate a second layer according to the at least one first sub-data and the second layer template; a second processing unit, configured to generate a response result of the first request according to an offset of at least one first sub-data, the first layer, and the second layer, and send the response result of the first request; The first processing unit is further configured to: replace each first sub-data in the at least one data with a placeholder to obtain at least one new data; add the new data to the first layer template to obtain a first layer; for each first sub-data, obtain a target format of the first sub-data, perform format conversion on the first sub-data according to the target format to obtain second sub-data; the target format is the same as the format of the placeholder to which the first sub-data belongs in the first layer; and add all second sub-data to the second layer template to obtain a second layer.
11. A device for processing a request, characterized in that: Applicable to the terminal according to claim 10, comprising: a transceiver unit, configured to send a first request and receive a response result of the first request; a parsing unit, configured to parse the response result of the first request to obtain at least one first sub-data offset, a first layer, and a second layer; a modifying unit, configured to modify the second layer according to the offset of the at least one first sub-data to obtain a third layer; The merging unit is configured to merge the first layer and the third layer to obtain a picture containing at least one data, and display the picture.
12. A system for processing requests, characterized in that The system comprises a server and a terminal, wherein the server comprises the device for processing requests according to claim 10, and the terminal comprises the device for processing requests according to claim 11.
13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
14. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Setting and extraction methods for double-layer encrypted anti-counterfeiting marks
CN109130563A
Data information processing method, data information processing device, and terminal
WO2016173072A1