CN106487861A - Network data provides method and apparatus - Google Patents

Network data provides method and apparatus Download PDF

Info

Publication number
CN106487861A
CN106487861A CN201510553118.1A CN201510553118A CN106487861A CN 106487861 A CN106487861 A CN 106487861A CN 201510553118 A CN201510553118 A CN 201510553118A CN 106487861 A CN106487861 A CN 106487861A
Authority
CN
China
Prior art keywords
data
terminal
configuration information
objective network
network data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510553118.1A
Other languages
Chinese (zh)
Other versions
CN106487861B (en
Inventor
闫小坤
谷萍萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201510553118.1A priority Critical patent/CN106487861B/en
Publication of CN106487861A publication Critical patent/CN106487861A/en
Application granted granted Critical
Publication of CN106487861B publication Critical patent/CN106487861B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • H04L67/303Terminal profiles

Abstract

The invention discloses a kind of network data provides method and apparatus, belong to Internet technical field.Methods described includes:The data acquisition request that receiving terminal sends, the data acquisition request are used for acquisition request objective network data;Scenario parameters according to corresponding to the data acquisition request obtains the terminal;Data configuration information corresponding with the scenario parameters is inquired about in scene configuration file;Service logic corresponding with the objective network data is inquired about in business configuration file;According to the data configuration information and the service logic, the objective network data are provided to the terminal.The code that needing in server in prior art, different editions are set for different terminals is solved, consumes the problem of the ample resources of server;The network data for having reached each version can share same service logic, reduce the effect of the service logic resource of required occupancy in the server.

Description

Network data provides method and apparatus
Technical field
The present invention relates to Internet technical field, more particularly to a kind of network data offer method and apparatus.
Background technology
In order to better meet the demand of user, a lot of websites all support that user uses computer to access, also support User uses mobile phone access.
In prior art, in order to meet the demand, webpage development personnel are needed to computerized version webpage and mobile phone Version webpage is encoded respectively, this two sets of codes of server storage.So, send out when server receives terminal During the web access requests for sending, server can be computer or mobile phone according to terminal, select corresponding code And then corresponding web page files are generated, provide the terminal with the web page files of generation.
During the present invention is realized, inventor has found that prior art at least has problems with:Server Need the code of different editions is arranged for different types of terminal, consume the ample resources of server.
Content of the invention
In order to problems of the prior art are solved, a kind of offer of network data is embodiments provided Method and apparatus.The technical scheme is as follows:
First aspect, there is provided a kind of network data provides method, including:
The data acquisition request that receiving terminal sends, the data acquisition request are used for acquisition request objective network Data;
Scenario parameters according to corresponding to the data acquisition request obtains the terminal;
Data configuration information corresponding with the scenario parameters is inquired about in scene configuration file;
Service logic corresponding with the objective network data is inquired about in business configuration file;
According to the data configuration information and the service logic, the objective network number is provided to the terminal According to.
A kind of second aspect, there is provided network data offer device, including:
Request receiving module, for the data acquisition request that receiving terminal sends, the data acquisition request is used In acquisition request objective network data;
Parameter acquisition module, the data acquisition request for being received according to the request receiving module are obtained Take the scenario parameters corresponding to the terminal;
Data obtaining module, is got with the parameter acquisition module for inquiring about in scene configuration file The corresponding data configuration information of the scenario parameters;
Logic acquisition module, for inquiring about industry corresponding with the objective network data in business configuration file Business logic;
Network data provides module, for according to the data configuration information and the service logic, to described Terminal provides the objective network data.
The beneficial effect of technical scheme provided in an embodiment of the present invention is:
By the corresponding service logic of storage webpage in business configuration file, store in scene configuration file Data configuration information corresponding to scenario parameters, and then after data acquisition request is received, according to data Acquisition request scenario parameters are obtained, and after inquiring corresponding data configuration information in scene configuration file, Directly objective network number is provided the terminal with according to the service logic in data configuration information and business configuration file According to;The code that needing in server in prior art, different editions are set for different terminals is solved, is consumed The problem of the ample resources of server;The network data for having reached each version can share same business Logic, reduces the effect of the service logic resource of required occupancy in the server.Meanwhile, by by identical net The different editions of network data are designed as sharing same set of service logic so that developer is without the need for being different editions Overlapping development identical services logic, solves the problems, such as that development cost is higher in prior art, has reached permissible Reduce the effect of development cost.Additionally, developer only needs to safeguard a set of service logic in the later stage, reach The effect of maintenance cost can be reduced.
Description of the drawings
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below will be to institute in embodiment description The accompanying drawing for using is needed to be briefly described, it should be apparent that, drawings in the following description are only the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram that the network data that one embodiment of the invention is provided provides method;
Fig. 2A is the method flow diagram that the network data that another embodiment of the present invention is provided provides method;
Fig. 2 B is that the framework corresponding to the network data offer method that another embodiment of the present invention is provided is illustrated Figure;
Fig. 2 C is the signal of the corresponding relation stored in the scene configuration file that another embodiment of the present invention is provided Figure;
Fig. 3 is the block diagram of the network data offer device that one embodiment of the invention is provided.
Specific embodiment
In order that the object, technical solutions and advantages of the present invention are clearer, below in conjunction with accompanying drawing to this Bright it is described in further detail, it is clear that described embodiment is only present invention some embodiments, Rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing The all other embodiment obtained under the premise of going out creative work, belongs to the scope of protection of the invention.
Fig. 1 is refer to, the network data that it illustrates one embodiment of the invention offer provides the method stream of method Cheng Tu, as shown in figure 1, the network data provides method can include:
Step 101, the data acquisition request that receiving terminal sends, data acquisition request are used for acquisition request target Network data.
Step 102, the scenario parameters according to corresponding to data acquisition request obtains terminal.
Step 103, inquires about data configuration information corresponding with scenario parameters in scene configuration file.
Step 104, inquires about service logic corresponding with objective network data in business configuration file.
Step 105, according to data configuration information and service logic, provides the terminal with objective network data.
In sum, the network data that the present embodiment is provided provides method, by depositing in business configuration file The corresponding service logic of storage webpage, the data configuration letter in scene configuration file corresponding to storage scenarios parameter Breath, and then after data acquisition request is received, according to data acquisition request acquisition scenario parameters, and After inquiring corresponding data configuration information in scene configuration file, directly according to data configuration information and Service logic in business configuration file provides the terminal with objective network data;Solve in prior art and service Need the code of different editions is arranged for different terminals in device, consume the problem of the ample resources of server; The network data for having reached each version can share same service logic, reduce service logic in server Needed for take resource effect.Meanwhile, by the different editions of identical network data are designed as sharing Same set of service logic so that developer is solved without the need for being different editions overlapping development identical services logic Development cost higher problem in prior art, has reached the effect that can reduce development cost.Additionally, Developer only needs to safeguard a set of service logic in the later stage, has reached the effect that can reduce maintenance cost.
Fig. 2A is refer to, the network data that it illustrates another embodiment of the present invention offer provides the side of method Method flow chart, as shown in Figure 2 A, the network data provides method can be included:
Step 201, the data acquisition request that receiving terminal sends, data acquisition request are used for acquisition request target Network data.
Wherein, data acquisition request can be the request of the web data of acquisition request target web, it is also possible to It is the request for obtaining other data from server, such as, client obtains background service from server Request, the present embodiment are not limited to this.Also, the present embodiment is with data acquisition request as acquisition request The request of the web data of target web is illustrating.
Step 202, the scenario parameters according to corresponding to data acquisition request obtains terminal;Scenario parameters include: The network state of terminal, terminal type, the acquisition acquiring way of objective network data and interacting for server At least one in acquisition authority and the IP address of terminal that mode, terminal possess.
After server receives the data acquisition request of terminal transmission, server can be asked according to data acquisition Seek the scenario parameters corresponding to acquisition terminal.
Specifically, at least one during this step may include steps of:
First, server reads the network state of the terminal carried in data acquisition request, by the net for reading Network state is used as scenario parameters.
When terminal sends data acquisition request, terminal can be in HTML5 (the Hyper Text Markup for sending Language5, the 5th edition HTML) form data acquisition request in carry network identity, should Network identity is used for identifying the network state of terminal.
Such as, terminal is carried for identifying 2G (2-Generation wireless in data acquisition request Telephone technology, second generation mobile communication technical specification), 3G, 4G, WiFi (Wireless Fidelity, Wireless Fidelity) or ADSL (Asymmetric Digital Subscriber Line, ADSL Road) (computer end by dial up on the telephone) network identity for dialling, then server can be obtained according to the network identity Take the network state of terminal.
By the server network state identified by network identity is used as scenario parameters.
The present embodiment is simply illustrated by the network state of above-mentioned acquisition modes acquisition terminal with server Bright, alternatively, server can also obtain the network speed of terminal from terminal, then according to the network speed for getting Determine the network state of terminal.
Specifically, terminal can (Hyper Text Transfer Protocol, Hyper text transfer be assisted using HTTP View) 1.1 support that the characteristic of persistently connection sends first and asks to server, the reception server feedback for ringing The first of the first request is answered to feed back.Wherein, the data of 0k are carried in the first request and keep persistently connecting Mark.Terminal will receive time and the time difference of the time for sending the first request of the first feedback, determine Carry out DNS (Domain Name System, domain name system) parsing, set up and server between for terminal Connection and round-trip delay total time.Hereafter, terminal sends second and asks to server, receives service Second feedback for the second request of response of device feedback.Wherein, the data of 0k are carried in the second request. As when terminal sends the second request, dns resolution and the connection between server are set up and are completed, so Terminal would know that the time for receiving the second feedback and the time difference of the time for sending the second request are and come and go Time delay.Finally, terminal sends the 3rd and asks to server, and what the reception server was fed back please for response the 3rd The 3rd feedback that asks.Wherein, the data of default size are carried in the 3rd request.Then as terminal sends the During three requests, dns resolution and the connection between server are set up and are completed, so terminal would know that connecing Receive the time of the 3rd feedback and the time difference of the time for sending the 3rd request is and transmits the data for presetting size Time and round-trip delay total time.So, terminal would know that the time for sending the data for presetting size, Network speed is calculated according to transmission time and size of data.Wherein, the first request, the second request and the 3rd request Asked the domain name of the webpage of access identical.
After terminal is calculated network speed, terminal can send network speed to server.Optionally, server can Request is obtained to terminal to send network speed, after terminal receives network speed acquisition request, net is sent to server Speed.Certainly, terminal can also actively send the network speed of determination to server, and the present embodiment is not limited to this Fixed.
Second, server reads the identification information in data acquisition request, and the identification information for reading is determined For scenario parameters.Wherein, identification information is used for identifying the terminal type of terminal, and/or, terminal sends data Obtain the browser used during request.
User Agent can be carried in the data acquisition request that terminal sends, the User Agent is used for identifying The terminal type of terminal, and/or, terminal sends the browser used during data acquisition request.
Illustrated for identifying the terminal type of terminal with User Agent, when User Agent is During Windows, server can determine terminal for computer.And be iPhone in User Agent, then service Device can determine terminal for iPhone mobile phone.
Similar, if the User Agent is used for identifying browser, server can be according to the User Agent Obtain terminal and send the browser used during data acquisition request.Such as, User Agent is ' wx ', then take Business device would know that the browser that terminal is used is wechat browser.
3rd, server reads the header information of data acquisition request, by the acquisition mesh carried in header information The acquiring way of mark network data is used as scenario parameters.
Acquiring way refers to that terminal obtains the acquisition modes of objective network data.Such as, user is by scanning two Dimension code carrys out acquisition request objective network data;Or, by input network address in address field come acquisition request mesh Mark network data;Again or, by selecting come acquisition request target by way of the link shared in social networking application Network data.
When specifically, due to terminal transmission data acquisition request, terminal can be in the head of data acquisition request Carrying Refer, the Refer in information is used for representing terminal asks access target network data by which kind of mode, Namely the Refer represents that terminal obtains the acquiring way of objective network data, so server can be believed from head Acquiring way is read in breath, using the acquiring way for reading as scenario parameters.
4th, server can determine the side of interaction of terminal and server according to the data acquisition request for receiving Formula, using the interactive mode for determining as scenario parameters.
Specifically, terminal can be by synchronization page output, AJAX (Asynchronous Javascript And XML, asynchronous JavaScript and XML) or WebSocket and server interaction, so server can To determine interactive mode as synchronization page output, AJAX or WebSocket.
5th, server reads the acquisition authority of the terminal carried in data acquisition request, by obtaining for reading Weighting is limited as scenario parameters.
When terminal sends data acquisition request, terminal can be taken in the Cookies of the head of data acquisition request The acquisition authority of tape terminal, such as, when terminal is administrator, terminal can carry use in Cookies In the mark that mark terminal is keeper;When terminal is member user, terminal can carry use in Cookies In the mark that mark terminal is member user.Accordingly, server can determine terminal according to the Cookies Obtain authority.
6th, server obtains IP (Internet Protocol, the agreement interconnected between the network) address of terminal, Using the IP address as scenario parameters.
Step 203, inquires about data configuration information corresponding with scenario parameters in scene configuration file.
Fig. 2 B is refer to, the scene configuration that is stored with server file, the scene configuration file include that scene is joined Corresponding relation between the data configuration information of the web data of number and target web.Also, Fig. 2 C is refer to, Different scenario parameters can correspond to different data configuration information, it is also possible to join corresponding to identical data Confidence ceases.
After the scenario parameters that server determines terminal, server can be in each of scene configuration file storage Inquiry data configuration information corresponding with the scenario parameters for determining in individual corresponding relation.Specifically, server is looked into The step of asking data configuration information corresponding with scenario parameters can include:
First, if scenario parameters include the network state of terminal, according to network-like in scene configuration file Corresponding relation between state and picture/mb-type, determines the picture/mb-type corresponding to network state, the figure that will be determined Used as data configuration information, picture/mb-type includes photo resolution and/or picture size to sheet type.
Terminal is required to consume the one of terminal when obtaining data from server using 2G, 3G or 4G network Constant flow, and in order to reduce the flow of required consumption when terminal is surfed the Net, server can be in scene configuration file In prestore photo resolution less than first threshold and picture size less than Second Threshold and 2G, 3G or Corresponding relation between 4G network.
And if terminal is dialled up on the telephone using WiFi or ADSL, now user is not only without the concern for flow Also without the slow problem of network speed is worried, now in order to improve Consumer's Experience, server can be prestored point Resolution is higher than the 3rd threshold value and picture size is more than corresponding between the 4th threshold value and WiFi or ADSL dialing Relation.
After the network state that server determines terminal, server can be in above-mentioned corresponding relation, inquiry Picture/mb-type corresponding with network state, using the picture/mb-type for inquiring as data corresponding with network state Configuration information.
When actually realizing, when being surfed the Net using 3G or 4G due to terminal, network speed generally also than very fast, so In order to improve the Consumer's Experience of user, server can also arrange corresponding picture category in scene configuration file Type is high resolution in the 3rd threshold value and picture size is more than the 4th threshold value, and the present embodiment is not limited to this.
Second, if scenario parameters include the terminal type of terminal, according to the terminal class in scene configuration file Corresponding relation between the version of type and objective network data, determines the objective network number corresponding to terminal type According to version, using determine version as data configuration information, the version of objective network data includes computerized version Or mobile phone version.
During different types of terminal access objective network data, the network data that server is provided may be Different.Such as, when user is using computer to access target web, server can provide the webpage of computerized version; And if user accesses webpage using iPhone, server can provide iPhone version webpage;Similar, if User is surfed the Net using non-smart mobile phone, then server can provide very fast version webpage.
So, server can prestore terminal type with objective network data in scene configuration file Corresponding relation between version.After the terminal type for determining terminal, server can be in above-mentioned corresponding pass In system, inquire about the version of objective network data corresponding with terminal type, using the version for inquiring as with end The corresponding data configuration information of end type.
Similar, if scenario parameters include the browser mark that terminal is used, server can also exist in advance Corresponding relation in scene configuration file between storage browser and data content.And then determine eventually in server After the browser that end uses, server can inquire about number corresponding with browser in above-mentioned corresponding relation According to content.
3rd, if scenario parameters include the acquiring way for obtaining objective network data, according to scene configuration text The corresponding relation between acquiring way and data content in part, determines the data content corresponding to acquiring way, Using the data content for determining as data configuration information.
When terminal obtains objective network data by different acquiring way, server can provide the terminal with difference Data content.Such as, when terminal is by being input into network address access target webpage, server can be carried to terminal For the web page contents that gives tacit consent to;If terminal access target net by way of selecting the link that shares in social networking application Page, then server can provide the terminal with the webpage of simple version (web page contents are only comprising default objects webpage Core content in web page contents).
So, server can be in advance in scene configuration file between storage acquiring way and data content Corresponding relation.After the acquiring way that server determines terminal, server is in acquiring way and data content Between corresponding relation in, the corresponding data content of acquiring way of inquiry and determination, by the data for inquiring Content is used as data configuration information corresponding with acquiring way.
4th, if scenario parameters include the interactive mode with server, according to the friendship in scene configuration file Mutually the corresponding relation between mode and the data form of objective network data, determines the number corresponding to interactive mode According to form, using the data form for determining as data configuration information.
, when data acquisition request is sent to server, terminal can be by multiple interactive modes and service for terminal Device is interacted, and corresponds to every kind of interactive mode, and server needs to return the data of corresponding form.
So, server can store interactive mode in advance with objective network data in scene configuration file Corresponding relation between data form.After server determines interactive mode of the terminal with server, service Device can be inquired about corresponding with the interactive mode for determining according to the corresponding relation between interactive mode and data form Data form, using the data form for inquiring as data configuration information corresponding with interactive mode.
5th, if scenario parameters include the acquisition authority that terminal possesses, according to obtaining in scene configuration file Corresponding relation between weighting limit and data content, determines the data content obtained corresponding to authority, will determine Data content as data configuration information.
Under normal circumstances, multiple acquisition authorities are had when terminal obtains objective network data, and different acquisition is weighed The data content that server is provided during the terminal access identical network data of limit would generally be different.Such as, When terminal has administrator right, terminal can access the full content in webpage;When terminal is member user, Terminal can access the webpage after removal advertisement;When terminal is domestic consumer, terminal can only be accessed comprising wide The webpage of announcement.
So, in order to provide the objective network data of different content, server to the different terminals for obtaining authority The corresponding relation that obtain authority and data content between can be stored in scene configuration file in advance.In service After device determines the acquisition authority of terminal, server can obtain the corresponding pass between authority and data content In system, data content corresponding with the acquisition authority for determining is inquired about.
6th, if scenario parameters include the IP address of terminal, according to the IP address in scene configuration file with Corresponding relation between data content, determines the data content corresponding to IP address, the data content that will be determined As data configuration information.
During terminal access objective network data, the region residing for terminal is different, the objective network that server is provided The data content of data is likely to can be different.Such as, during a certain house property website of terminal access, server is permissible Provide the terminal with the house property information to Yingcheng City.Wherein, server is serviced when region residing for terminal is determined Device generally can be judged according to the IP address of terminal.
So, server can be right between storage IP address and data content in scene configuration file in advance Should be related to.After the IP address that server determines terminal, server can IP address and data content it Between corresponding relation in, inquire about data content corresponding with the IP address of terminal.
It should be added that, the present embodiment is simply to determine corresponding to scenario parameters by the way As a example by data configuration information, optionally, server can also determine that scenario parameters are corresponded to by other means Data configuration information, the present embodiment do not limited to this.Also, the present embodiment is also simply with each Scape parameter corresponds to above-mentioned data configuration information to illustrate, and when actually realizing, developer can be according to reality Border demand configures other data configuration information for each scenario parameters, and the present embodiment is not also limited to this.
Step 204, inquires about service logic corresponding with objective network data in business configuration file.
In conjunction with Fig. 2 B, in server, business configuration file can also be previously stored with, in the business configuration file The service logic being stored with corresponding to objective network data.Optionally, can store in business configuration file each Service logic corresponding to individual network data.Server receives the data acquisition of acquisition objective network data please After asking, server can inquire about the service logic corresponding to objective network data in business configuration file.
It should be added that, the present embodiment simply with step 202 and step 203 before the step 204 As a example by execution, optionally, step 204 can also be before step 202, or in step 202 and step Execute between 203, only need to ensure to execute before step 205 when actually realizing, the present embodiment is to which Actual execution sequence is not limited.
Step 205, according to data configuration information and service logic, provides the terminal with objective network data.
After server determines data configuration information and service logic, server can be believed according to data configuration Breath and service logic provide the terminal with objective network data.
Optionally, this step can include:
First, objective network data are generated according to data configuration information and service logic.
The first configuration letter for the data content for configuring objective network data can be included in data configuration information Breath, it is also possible to include the second configuration information for the data form for configuring objective network data, or, also The first configuration information and the second configuration information can be included simultaneously.So according to the content of data configuration information Difference, this step can include:
(1) if joining comprising first for configuring the data content of objective network data in data configuration information Confidence ceases, then the data of the requirement for being selected from material database to meet the first configuration information according to service logic;Root The objective network data of default form are generated according to service logic data.
If comprising the first configuration letter for configuring the data content of objective network data in data configuration information Breath, such as, data acquisition request is the request of the website data of acquisition request house property website, and data configuration is believed Breath includes:Picture/mb-type is for photo resolution is less than first threshold and picture size is less than Second Threshold and no The house property information of tin.Then, server can determine which picture needed according to service logic, and according to picture Type obtains corresponding picture materials;Meanwhile, server determines which kind of house property information needed according to service logic, As new house information, and obtain the new house information of Wuxi.Hereafter, server according to the picture materials for getting, The new house information of the Wuxi for getting and service logic generate the web data of default form.
(2) if joining comprising second for configuring the data form of objective network data in data configuration information Confidence ceases, then select from material database to meet the data that acquiescence is required according to service logic;According to service logic Data generates the objective network data of the data form required by the second configuration information.
And if comprising the second configuration letter for configuring the data form of objective network data in data configuration information Breath, such as data configuration information include:The corresponding data form of AJAX.Then, server is according to service logic After obtaining, from material database, the data that acquiescence is required, server can generate AJAX pair according to service logic The objective network data of the data form that answers.
(3) if data configuration information is while include for configuring the first of the data content of objective network data Configuration information and the second configuration information for configuring the data form of objective network data, then patrol according to business Collect the data of the requirement for selecting from material database to meet the first configuration information;Generated according to service logic data The objective network data of the data form required by the second configuration information.
If while comprising the first configuration information and the second configuration information, server in data configuration information First obtain the data of the requirement for meeting the first configuration information according to service logic from material database, then further according to Service logic data generates the objective network data of the data form required by the second configuration information.Wherein, Which implements and refer to above-mentioned two step, and the present embodiment will not be described here.
Second, the objective network data for generating are sent to terminal.
After server generates objective network data, server can send the objective network data of generation extremely Terminal.After terminal receives objective network data, you can the objective network data according to receiving are opened up Show.
It should be added that, while the scene configuration that is stored with server file and business configuration file, Server can report configuration file with data storage, and the data report configuration file to execute for instruction terminal Daily record is reported.So, each version can share same data and report configuration file, and server need not be deposited Store up the data corresponding to each version and configuration file is reported, reduce data and report configuration file in the server The resource of required occupancy.Simultaneously as developer only needs to write a data and reports configuration file, and Need the configuration file of identical function is write for each version, reduce the exploitation complexity of developer, carry High development efficiency.
In sum, the network data that the present embodiment is provided provides method, by depositing in business configuration file The corresponding service logic of storage webpage, the data configuration letter in scene configuration file corresponding to storage scenarios parameter Breath, and then after data acquisition request is received, according to data acquisition request acquisition scenario parameters, and After inquiring corresponding data configuration information in scene configuration file, directly according to data configuration information and Service logic in business configuration file provides the terminal with objective network data;Solve in prior art and service Need the code of different editions is arranged for different terminals in device, consume the problem of the ample resources of server; The network data for having reached each version can share same service logic, reduce service logic in server Needed for take resource effect.Meanwhile, by the different editions of identical network data are designed as sharing Same set of service logic so that developer is solved without the need for being different editions overlapping development identical services logic Development cost higher problem in prior art, has reached the effect that can reduce development cost.Additionally, Developer only needs to safeguard a set of service logic in the later stage, has reached the effect that can reduce maintenance cost.
The present embodiment is by storing between various scenario parameters and data configuration information in scene configuration file Corresponding relation, according to the data configuration information corresponding to the scenario parameters that corresponding relation inquires about terminal, Jin Ergen Corresponding objective network data are generated according to data configuration information, so developer is in scene configuration file After corresponding relation and then security configuration, server can provide security higher objective network number for terminal According to, it is to avoid when developer develops respectively to the objective network data of each version, due to personal carelessness The wrong or omission design of design for causing, and then the security of the objective network data of server offer is provided Poor problem, has reached the effect of the data safety that can improve the objective network data for providing the terminal with.
Additionally, scenario parameters of the present embodiment by determination terminal, obtain the data corresponding to scenario parameters and join Confidence ceases, and then provides the terminal with objective network data according to data configuration information and service logic, reaches Server can provide the terminal with corresponding objective network data according to the scenario parameters of terminal, improve user's The effect of Consumer's Experience.
Fig. 3 is refer to, the structure side of the network data offer device of one embodiment of the invention offer is provided Block diagram, the network data offer device can include:Request receiving module 310, parameter acquisition module 320, Data obtaining module 330, logic acquisition module 340 and network data provide module 350.
Request receiving module 310, for the data acquisition request that receiving terminal sends, data acquisition request is used for Acquisition request objective network data;
Parameter acquisition module 320, the data acquisition request for being received according to request receiving module 310 are obtained Scenario parameters corresponding to terminal;
Data obtaining module 330, is got with parameter acquisition module 320 for inquiring about in scene configuration file The corresponding data configuration information of scenario parameters;
Logic acquisition module 340, for inquiring about business corresponding with objective network data in business configuration file Logic;
Network data provides module 350, for according to data configuration information and service logic, providing the terminal with mesh Mark network data.
In sum, the network data offer device that the present embodiment is provided, by depositing in business configuration file The corresponding service logic of storage webpage, the data configuration letter in scene configuration file corresponding to storage scenarios parameter Breath, and then after data acquisition request is received, according to data acquisition request acquisition scenario parameters, and After inquiring corresponding data configuration information in scene configuration file, directly according to data configuration information and Service logic in business configuration file provides the terminal with objective network data;Solve in prior art and service Need the code of different editions is arranged for different terminals in device, consume the problem of the ample resources of server; The network data for having reached each version can share same service logic, reduce service logic in server Needed for take resource effect.Meanwhile, by the different editions of identical network data are designed as sharing Same set of service logic so that developer is solved without the need for being different editions overlapping development identical services logic Development cost higher problem in prior art, has reached the effect that can reduce development cost.Additionally, Developer only needs to safeguard a set of service logic in the later stage, has reached the effect that can reduce maintenance cost.
In conjunction with Fig. 3, each functional module in the network data offer device can also be implemented function such as:
Alternatively, network data provides module 350, is additionally operable to:
If comprising the first configuration letter for configuring the data content of objective network data in data configuration information Breath, then the data of the requirement for being selected from material database to meet the first configuration information according to service logic;According to industry The objective network data of business logical sum data genaration default form;
If comprising the second configuration letter for configuring the data form of objective network data in data configuration information Breath, then select from material database to meet the data that acquiescence is required according to service logic;According to service logic sum Default network data according to the data form generated required by the second configuration information;
If data configuration information is while include the first configuration letter for the data content for configuring objective network data Cease and for configuring the second configuration information of the data form of objective network data, then according to service logic from element In material storehouse, selection meets the data of the requirement of the first configuration information;Second is generated according to service logic data to join The objective network data of the required data form of confidence breath;
The objective network data for generating are sent to terminal.
Optionally, scenario parameters include:The network state of terminal, terminal type, acquisition objective network data Acquiring way and server interactive mode, acquisition authority that terminal possesses and terminal IP address in At least one.
Optionally, data obtaining module 330, are additionally operable to:
If scenario parameters include the network state of terminal, according to the network state in scene configuration file and figure Corresponding relation between sheet type, determines the picture/mb-type corresponding to network state, the picture/mb-type that will be determined Used as data configuration information, picture/mb-type includes photo resolution and/or picture size;
If scenario parameters include the terminal type of terminal, according to the terminal type in scene configuration file and mesh Corresponding relation between the version of mark network data, determines the version of the objective network data corresponding to terminal type This, using the version for determining as data configuration information;
If scenario parameters include the acquiring way for obtaining objective network data, according in scene configuration file Corresponding relation between acquiring way and data content, determines the data content corresponding to acquiring way, will be really Fixed data content is used as data configuration information;
If scenario parameters include the interactive mode with server, according to the interactive mode in scene configuration file And the corresponding relation between the data form of objective network data, determines the data form corresponding to interactive mode, Using the data form for determining as data configuration information;
If scenario parameters include the acquisition authority that terminal possesses, according to the acquisition authority in scene configuration file Corresponding relation between data content, determines the data content obtained corresponding to authority, the data that will be determined Content is used as data configuration information;
If scenario parameters include the IP address of terminal, according in the IP address in scene configuration file and data Corresponding relation between appearance, determines the data content corresponding to IP address, using the data content for determining as number According to configuration information.
Optionally, the data that are also stored with server report configuration file, and data report configuration file for referring to Show that terminal execution journal is reported.
In sum, the network data offer device that the present embodiment is provided, by depositing in business configuration file The corresponding service logic of storage webpage, the data configuration letter in scene configuration file corresponding to storage scenarios parameter Breath, and then after data acquisition request is received, according to data acquisition request acquisition scenario parameters, and After inquiring corresponding data configuration information in scene configuration file, directly according to data configuration information and Service logic in business configuration file provides the terminal with objective network data;Solve in prior art and service Need the code of different editions is arranged for different terminals in device, consume the problem of the ample resources of server; The network data for having reached each version can share same service logic, reduce service logic in server Needed for take resource effect.Meanwhile, by the different editions of identical network data are designed as sharing Same set of service logic so that developer is solved without the need for being different editions overlapping development identical services logic Development cost higher problem in prior art, has reached the effect that can reduce development cost.Additionally, Developer only needs to safeguard a set of service logic in the later stage, has reached the effect that can reduce maintenance cost.
The present embodiment is by storing between various scenario parameters and data configuration information in scene configuration file Corresponding relation, according to the data configuration information corresponding to the scenario parameters that corresponding relation inquires about terminal, Jin Ergen Corresponding objective network data are generated according to data configuration information, so developer is in scene configuration file After corresponding relation and then security configuration, server can provide security higher objective network number for terminal According to, it is to avoid when developer develops respectively to the objective network data of each version, due to personal carelessness The wrong or omission design of design for causing, and then the security of the objective network data of server offer is provided Poor problem, has reached the effect of the data safety that can improve the objective network data for providing the terminal with.
Additionally, scenario parameters of the present embodiment by determination terminal, obtain the data corresponding to scenario parameters and join Confidence ceases, and then provides the terminal with objective network data according to data configuration information and service logic, reaches Server can provide the terminal with corresponding objective network data according to the scenario parameters of terminal, improve user's The effect of Consumer's Experience.
It should be noted that:Above-described embodiment provide network data offer device provide network data when, Only it is illustrated with the division of above-mentioned each functional module, in practical application, can as desired will be upper State function distribution to be completed by different functional modules, will the internal structure of equipment be divided into different function moulds Block, to complete all or part of function described above.In addition, the network data that above-described embodiment is provided The embodiment of the method that offer device provides method with network data belongs to same design, and it is detailed which implements process See embodiment of the method, repeat no more here.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step for realizing above-described embodiment can pass through Hardware is completing, it is also possible to which the hardware for being instructed correlation by program is completed, and described program can be stored in In a kind of computer-readable recording medium, storage medium mentioned above can be read-only storage, disk or CD etc..
Presently preferred embodiments of the present invention is the foregoing is only, not in order to limit the present invention, all the present invention's Within spirit and principle, any modification, equivalent substitution and improvement that is made etc., should be included in the present invention's Within protection domain.

Claims (10)

1. a kind of network data provides method, it is characterised in that methods described includes:
The data acquisition request that receiving terminal sends, the data acquisition request are used for acquisition request objective network Data;
Scenario parameters according to corresponding to the data acquisition request obtains the terminal;
Data configuration information corresponding with the scenario parameters is inquired about in scene configuration file;
Service logic corresponding with the objective network data is inquired about in business configuration file;
According to the data configuration information and the service logic, the objective network number is provided to the terminal According to.
2. method according to claim 1, it is characterised in that described according to the data configuration information With the service logic, the objective network data are provided to the terminal, including:
If comprising for configuring the first of the data content of the objective network data in the data configuration information Configuration information, then select from material database to meet the requirement of first configuration information according to the service logic Data;According to the service logic and the objective network data of the data genaration default form;
If comprising for configuring the second of the data form of the objective network data in the data configuration information Configuration information, then select from material database to meet the data that acquiescence is required according to the service logic;According to institute State the target network of the data form described in service logic and the data genaration required by the second configuration information Network data;
If the data configuration information is while include for configuring the of the data content of the objective network data One configuration information and the second configuration information for configuring the data form of the objective network data, then basis The service logic selects the data of the requirement for meeting first configuration information from material database;According to described The objective network of the data form described in service logic and the data genaration required by the second configuration information Data;
The objective network data for generating are sent to the terminal.
3. method according to claim 1, it is characterised in that the scenario parameters include:The end The network state at end, terminal type, the acquiring way for obtaining the objective network data and the server Interactive mode, acquisition authority that the terminal possesses and the terminal IP address at least one.
4. method according to claim 3, it is characterised in that described inquire about in scene configuration file Data configuration information corresponding with the scenario parameters, including:
If the scenario parameters include the network state of the terminal, according in the scene configuration file Corresponding relation between the network state and picture/mb-type, determines the picture category corresponding to the network state Type, using the picture/mb-type for determining as the data configuration information, the picture/mb-type includes that picture divides Resolution and/or picture size;
If the scenario parameters include the terminal type of the terminal, according in the scene configuration file Corresponding relation between the version of the terminal type and the objective network data, determines the terminal type The version of the corresponding objective network data, using the version for determining as the data configuration information;
If the scenario parameters include the acquiring way for obtaining the objective network data, according to the scene The corresponding relation between the acquiring way and data content in configuration file, determines the acquiring way institute Corresponding data content, using the data content for determining as the data configuration information;
If the scenario parameters include the interactive mode with the server, according to the scene configuration file In the interactive mode and the data form of the objective network data between corresponding relation, determine described Data form corresponding to interactive mode, using the data form for determining as the data configuration information;
If the scenario parameters include the acquisition authority that the terminal possesses, according to the scene configuration file In the acquisition authority and data content between corresponding relation, determine described obtain authority corresponding to number According to content, using the data content for determining as the data configuration information;
If the scenario parameters include the IP address of the terminal, according to the institute in the scene configuration file The corresponding relation between IP address and data content is stated, determines the data content corresponding to the IP address, will The data content for determining is used as the data configuration information.
5. according to the arbitrary described method of Claims 1-4, it is characterised in that be also stored with server Data report configuration file, and the data report configuration file to report for indicating the terminal execution journal.
6. a kind of network data offer device, it is characterised in that described device includes:
Request receiving module, for the data acquisition request that receiving terminal sends, the data acquisition request is used In acquisition request objective network data;
Parameter acquisition module, the data acquisition request for being received according to the request receiving module are obtained Take the scenario parameters corresponding to the terminal;
Data obtaining module, is got with the parameter acquisition module for inquiring about in scene configuration file The corresponding data configuration information of the scenario parameters;
Logic acquisition module, for inquiring about industry corresponding with the objective network data in business configuration file Business logic;
Network data provides module, for according to the data configuration information and the service logic, to described Terminal provides the objective network data.
7. device according to claim 6, it is characterised in that the network data provides module, also For:
If comprising for configuring the first of the data content of the objective network data in the data configuration information Configuration information, then select from material database to meet the requirement of first configuration information according to the service logic Data;According to the service logic and the objective network data of the data genaration default form;
If comprising for configuring the second of the data form of the objective network data in the data configuration information Configuration information, then select from material database to give tacit consent to the data of requirement according to the service logic;According to the industry The objective network number of the data form described in data genaration described in business logical sum required by the second configuration information According to;
If the data configuration information is while include for configuring the of the data content of the objective network data One configuration information and the second configuration information for configuring the data form of the objective network data, then basis The service logic selects the data of the requirement for meeting first configuration information from material database;According to described The objective network of the data form described in service logic and the data genaration required by the second configuration information Data;
The objective network data are sent to the terminal.
8. device according to claim 6, it is characterised in that the scenario parameters include:The end The network state at end, terminal type, the acquiring way for obtaining the objective network data and the server Interactive mode, acquisition authority that the terminal possesses and the terminal IP address at least one.
9. device according to claim 8, it is characterised in that described information acquisition module, is additionally operable to:
If the scenario parameters include the network state of the terminal, according in the scene configuration file Corresponding relation between the network state and picture/mb-type, determines the picture category corresponding to the network state Type, using the picture/mb-type for determining as the data configuration information, the picture/mb-type includes that picture divides Resolution and/or picture size;
If the scenario parameters include the terminal type of the terminal, according in the scene configuration file Corresponding relation between the version of the terminal type and the objective network data, determines the terminal type The version of the corresponding objective network data, using the version for determining as the data configuration information;
If the scenario parameters include the acquiring way for obtaining the objective network data, according to the scene The corresponding relation between the acquiring way and data content in configuration file, determines the acquiring way institute Corresponding data content, using the data content for determining as the data configuration information;
If the scenario parameters include the interactive mode with the server, according to the scene configuration file In the interactive mode and the data form of the objective network data between corresponding relation, determine described Data form corresponding to interactive mode, using the data form for determining as the data configuration information;
If the scenario parameters include the acquisition authority that the terminal possesses, according to the scene configuration file In the acquisition authority and data content between corresponding relation, determine described obtain authority corresponding to number According to content, using the data content for determining as the data configuration information;
If the scenario parameters include the IP address of the terminal, according to the institute in the scene configuration file The corresponding relation between IP address and data content is stated, determines the data content corresponding to the IP address, will The data content for determining is used as the data configuration information.
10. according to the arbitrary described device of claim 6 to 9, it is characterised in that also store in server Data are had to report configuration file, the data report configuration file to report for indicating the terminal execution journal.
CN201510553118.1A 2015-09-01 2015-09-01 Network data providing method and device Active CN106487861B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510553118.1A CN106487861B (en) 2015-09-01 2015-09-01 Network data providing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510553118.1A CN106487861B (en) 2015-09-01 2015-09-01 Network data providing method and device

Publications (2)

Publication Number Publication Date
CN106487861A true CN106487861A (en) 2017-03-08
CN106487861B CN106487861B (en) 2021-04-02

Family

ID=58237866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510553118.1A Active CN106487861B (en) 2015-09-01 2015-09-01 Network data providing method and device

Country Status (1)

Country Link
CN (1) CN106487861B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134461A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of universal process method and device of data interaction
CN111339128A (en) * 2018-12-18 2020-06-26 北京嘀嘀无限科技发展有限公司 Data acquisition method and device, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015763A1 (en) * 2002-11-27 2006-01-19 Kazuaki Nakajima Real-time web sharing system
CN1897529A (en) * 2005-07-11 2007-01-17 中国移动通信集团公司 Automatic adapter for mobile telecommunication terminal display page
CN101067819A (en) * 2007-06-07 2007-11-07 北京大学 Web page resource issuing method and issuing system
CN101778168A (en) * 2010-02-05 2010-07-14 中国电信股份有限公司 Method and system for optimization display of wed pages on browser of mobile terminal
CN101815093A (en) * 2010-03-11 2010-08-25 深圳市嘉讯软件有限公司 Method for adapting webpage to mobile terminal and mobile terminal page adaptation device
CN101883089A (en) * 2010-04-22 2010-11-10 深圳市酷开网络科技有限公司 Method, device and system for displaying Internet webpage on play terminal
CN101996206A (en) * 2009-08-11 2011-03-30 阿里巴巴集团控股有限公司 Method, device and system for displaying web page
CN102253986A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Method and device for improving webpage displaying effect in multiple terminals
CN102497420A (en) * 2011-12-12 2012-06-13 中国电信股份有限公司 Content adaptation method and server
CN102882705A (en) * 2012-09-03 2013-01-16 青岛海信传媒网络技术有限公司 Method for reporting log through terminal equipment and log reporting system
CN104601522A (en) * 2013-10-30 2015-05-06 中国移动通信集团北京有限公司 Method, device and system for realizing interaction between mobile client and service system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060015763A1 (en) * 2002-11-27 2006-01-19 Kazuaki Nakajima Real-time web sharing system
CN1897529A (en) * 2005-07-11 2007-01-17 中国移动通信集团公司 Automatic adapter for mobile telecommunication terminal display page
CN101067819A (en) * 2007-06-07 2007-11-07 北京大学 Web page resource issuing method and issuing system
CN101996206A (en) * 2009-08-11 2011-03-30 阿里巴巴集团控股有限公司 Method, device and system for displaying web page
CN101778168A (en) * 2010-02-05 2010-07-14 中国电信股份有限公司 Method and system for optimization display of wed pages on browser of mobile terminal
CN101815093A (en) * 2010-03-11 2010-08-25 深圳市嘉讯软件有限公司 Method for adapting webpage to mobile terminal and mobile terminal page adaptation device
CN101883089A (en) * 2010-04-22 2010-11-10 深圳市酷开网络科技有限公司 Method, device and system for displaying Internet webpage on play terminal
CN102253986A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Method and device for improving webpage displaying effect in multiple terminals
CN102497420A (en) * 2011-12-12 2012-06-13 中国电信股份有限公司 Content adaptation method and server
CN102882705A (en) * 2012-09-03 2013-01-16 青岛海信传媒网络技术有限公司 Method for reporting log through terminal equipment and log reporting system
CN104601522A (en) * 2013-10-30 2015-05-06 中国移动通信集团北京有限公司 Method, device and system for realizing interaction between mobile client and service system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DIMPURR: "《CSS3 Media Query响应式媒体查询》", 《HTTP://BLOG.DIMPURR.COM/CSS-MEDIA/》 *
专注做前端: "《7个步骤让PC网站自动适配手机网页》", 《HTTPS://WWW.CNBLOGS.COM/QIETUWANG/P/4584521.HTML》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339128A (en) * 2018-12-18 2020-06-26 北京嘀嘀无限科技发展有限公司 Data acquisition method and device, electronic equipment and storage medium
CN111339128B (en) * 2018-12-18 2023-09-26 北京嘀嘀无限科技发展有限公司 Data acquisition method and device, electronic equipment and storage medium
CN110134461A (en) * 2019-04-09 2019-08-16 苏宁易购集团股份有限公司 A kind of universal process method and device of data interaction
WO2020206955A1 (en) * 2019-04-09 2020-10-15 苏宁云计算有限公司 Universal processing method and apparatus for data interaction

Also Published As

Publication number Publication date
CN106487861B (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN103716326A (en) Resource access method and URG
CN107608647A (en) One kind throws screen method, system, server and computer-readable recording medium
CN104283760A (en) Method, related device and system for WebRTC communication
EP2408174A1 (en) Messaging activity feed
CN102291243A (en) Service processing server, system and method
CN103269362A (en) Method, system and device for sharing localized content of picture in webpage
CN103167327A (en) Method, device and system of information interaction
CN104780184A (en) Method of using geographical location information for load balancing
CN105337841A (en) Information processing method and system, client, and server
CN102780983A (en) System and method for facilitating multi-level forwarding of messages
CN102752411A (en) Redirection method and device
CN103220297A (en) Method for carrying out multi-screen interaction through social network
CN102611948A (en) Method for sharing and issuing audios and videos of mobile internet terminal
CN102301678B (en) System and method for providing identity correlation for an over the top service in a telecommunications network
CN104618420A (en) Information display method and device
CN103997479A (en) Asymmetric service IP proxy method and equipment
CN104272705A (en) Method and apparatus for display of operator ads
CN102209276B (en) Method, server and system for providing real-time video service in telecommunication network
CN104717131A (en) Information interaction method and server
CN103797751B (en) Method and device for querying for user online state
CN106487861A (en) Network data provides method and apparatus
CN103533580A (en) Wifi data non-seamless branching method, apparatus and system
CN103139306A (en) Method facing forwarding of browse clipping page information and obtaining of enterprise cooperation information interaction
CN103368961B (en) The method of multi-screen interactive is carried out by social networks
CN103181140A (en) Method, media server and terminal device for identifying service request type

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant