CN110347467A - A kind of data request processing method, apparatus, terminal device and storage medium - Google Patents

A kind of data request processing method, apparatus, terminal device and storage medium Download PDF

Info

Publication number
CN110347467A
CN110347467A CN201910612130.3A CN201910612130A CN110347467A CN 110347467 A CN110347467 A CN 110347467A CN 201910612130 A CN201910612130 A CN 201910612130A CN 110347467 A CN110347467 A CN 110347467A
Authority
CN
China
Prior art keywords
data
request
server
main business
service
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.)
Pending
Application number
CN201910612130.3A
Other languages
Chinese (zh)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910612130.3A priority Critical patent/CN110347467A/en
Publication of CN110347467A publication Critical patent/CN110347467A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present disclosure discloses a kind of data request processing method, apparatus, terminal device and storage medium, which comprises when a request for data is received, judges whether main business server corresponding with the request of data works normally;If the main business server works normally, the request of data is forwarded to the main business server, the request of data is handled with the Service Instance carried by the main business server, obtains target data;If the main business server can not work normally, the request of data is forwarded to standby traffic server, target data is obtained with the Service Instance carried by the standby traffic server;Wherein, the Service Instance is the Service Instance for carrying all preset services of current business server.By the technical solution of the embodiment of the present disclosure, the purpose for improving and obtaining target data success rate is realized, and then improve the stability of data request processing operation system.

Description

A kind of data request processing method, apparatus, terminal device and storage medium
Technical field
The embodiment of the present disclosure is related to application of software data processing technique more particularly to a kind of data request processing method, dress It sets, terminal device and storage medium.
Background technique
With being widely used for intelligent terminal, various application software are continued to introduce new.Wherein, list page is (commonly referred to as Feed pages) it is a kind of relatively common interface appearance form in existing application software client.Can be shown one by one in Feed pages or Person recommends display list items according to the hobby of user, checks for user, and user can be entered by clicking corresponding list items Details page checks details or triggers the broadcasting of related column list item.
It is complete due to the interest of Feed pages of presentation content of some application software clients and the accuracy of commending contents The hobby for beauteously having catered to each user has attracted a large amount of bean vermicelli user, so that bean vermicelli user brush gets up to be so fond that will not let out of one's hand. In this way, causing Feed pages of some application software clients to need to carry huge day live data.
As it can be seen that Feed pages of the application software client most of advertising income for carrying each application software developer, Primary small Feed accident (be often referred to normally to show information list or cannot respond to user checks request) may Huge economic loss is brought to developer, while also will affect customer experience.Therefore, Feed pages of application software client steady It is qualitative extremely important.
Summary of the invention
The embodiment of the present disclosure provides a kind of data request processing method, apparatus, terminal device and storage medium, is obtained with improving Take the success rate of target data.
In a first aspect, the embodiment of the present disclosure provides a kind of data request processing method, applied to the upper of service server Grade server, which comprises
When a request for data is received, judge whether main business server corresponding with the request of data works normally;
If the main business server works normally, the request of data is forwarded to the main business server, with The request of data is handled by the Service Instance that the main business server carries, obtains target data;
If the main business server can not work normally, the request of data is forwarded to standby traffic server, Target data is obtained with the Service Instance carried by the standby traffic server;
Wherein, the Service Instance is the Service Instance for carrying all preset services of current business server.
Further, judge whether main business server corresponding with the request of data works normally, comprising:
The response identification returned based on the main business server for the request of data determines the main business service Whether device works normally.
Further, when the request of data is video refresh request, pass through the clothes of main business server carrying Pragmatic example handles the request of data, obtains target data, comprising:
The first preset service obtains video ID in Feed Service Instance based on main business server carrying;
The second preset service obtains described ID pairs of video in Feed Service Instance based on main business server carrying The video information answered.
Further, the method also includes: if based on default for obtaining the first of video ID in Feed Service Instance Service acquisition video ID failure, then the backup services based on the first preset service described in Feed Service Instance obtain video ID;
If based on corresponding for obtaining the second preset service acquisition video ID of video information in Feed Service Instance Video information failure, then backup services based on the second preset service described in Feed Service Instance obtain described ID pairs of video The video information answered.
Further, the method also includes: if the Feed Service Instance can not work normally, described in carrying The local file of the main business server of Feed Service Instance reads target data;
Wherein, when successfully getting video information by second preset service every time, the video that will acquire is believed Cease the local file based on setting regular backup to the main business server.
Further, if the main business server can not work normally, the request of data is forwarded to spare industry Business server obtains target data with the Service Instance carried by the standby traffic server, comprising:
Target data is read from presetting database by the Feedbackup Service Instance that standby traffic server carries;
Wherein, the target data of the presetting database is to subscribe to message kafka based on distributed post to service from described The local file of main business server is obtained and is written.
Further, the main business server and the standby traffic server are arranged in different regions.
Second aspect, the embodiment of the present disclosure additionally provide a kind of data request processing device, are integrated in service server Parent server, described device include:
Judgment module, for when a request for data is received, judging main business server corresponding with the request of data Whether work normally;
The request of data is forwarded to institute if working normally for the main business server by first processing module Main business server is stated, the request of data is handled with the Service Instance carried by the main business server, is obtained Take target data;
Second processing module forwards the request of data if can not work normally for the main business server To standby traffic server, target data is obtained with the Service Instance carried by the standby traffic server;
Wherein, the Service Instance is the Service Instance for carrying all preset services of current business server.
Further, the judgment module is specifically used for: being returned based on the main business server for the request of data The response identification returned determines whether the main business server works normally.
Further, when the request of data is video refresh request, the first processing module includes: the first video ID acquiring unit and the first acquiring video information unit;
Wherein, the video ID acquiring unit is used in the Feed Service Instance that carries based on the main business server the One preset service obtains video ID;The Feed clothes that the acquiring video information unit is used to carry based on the main business server The second preset service obtains the corresponding video information of the video ID in pragmatic example.
Further, the first processing module further include: the second video ID acquiring unit and the second acquiring video information Unit, if the second video ID acquiring unit is used for based on the first default clothes for being used to obtain video ID in Feed Service Instance Business obtains video ID failure, then the backup services based on the first preset service described in Feed Service Instance obtain video ID;Institute If stating the second acquiring video information unit for based on the second preset service for being used to obtain video information in Feed Service Instance The corresponding video information failure of the video ID is obtained, then the backup clothes based on the second preset service described in Feed Service Instance Business obtains the corresponding video information of the video ID.
Further, the first processing module further include: reading unit, if can not be just for the Feed Service Instance Often work then reads target data from the local file for the main business server for carrying the Feed Service Instance;Wherein, every The secondary video information that when successfully getting video information by second preset service, will acquire is based on setting regular backup To the local file of the main business server.
Further, the Second processing module is specifically used for: the Feedbackup carried by standby traffic server Service Instance reads target data from presetting database;
Wherein, the target data of the presetting database is to subscribe to message kafka based on distributed post to service from described The local file of main business server is obtained and is written.
Further, the main business server and the standby traffic server are arranged in different regions.
The third aspect, the embodiment of the present disclosure additionally provide a kind of terminal device, which includes:
One or more processing units;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processing units, so that one or more of places Manage data request processing method of the device realization as described in the embodiment of the present disclosure.
Fourth aspect, the embodiment of the present disclosure additionally provide a kind of computer readable storage medium, are stored thereon with computer Program realizes the data request processing method as described in the embodiment of the present disclosure when program is executed by processing unit.
A kind of data request processing method that the embodiment of the present disclosure provides, applied to the parent server of service server, When a request for data is received, judge whether main business server corresponding with the request of data works normally;If the master Service server works normally, then the request of data is forwarded to the main business server, to take by the main business The Service Instance of business device carrying handles the request of data, obtains target data;If the main business server can not It works normally, then the request of data is forwarded to standby traffic server, with what is carried by the standby traffic server Service Instance obtains target data;Wherein, the Service Instance is the clothes for carrying all preset services of current business server Pragmatic example realizes the purpose for improving and obtaining target data success rate, and then improves the steady of data request processing operation system It is qualitative.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure one provides;
Fig. 2 is a kind of service system structure schematic diagram that the embodiment of the present disclosure one provides;
Fig. 3 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure two provides;
Fig. 4 is a kind of structural schematic diagram for data request processing device that the embodiment of the present disclosure three provides;
Fig. 5 is a kind of hardware structural diagram for terminal device that the embodiment of the present disclosure four provides.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the disclosure, rather than the restriction to the disclosure.It also should be noted that in order to just Part relevant to the disclosure is illustrated only in description, attached drawing rather than entire infrastructure.
In following each embodiments, optional feature and example are provided simultaneously in each embodiment, that records in embodiment is each A feature can be combined, and form multiple optinal plans, and the embodiment of each number should not be considered merely as to a technical solution.
Embodiment one
Fig. 1 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure one provides.This method can fit The case where for responding to the request of data that client is sent, can be executed by data request processing device, which can By hardware and/or software sharing, and generally it is integrated in the parent server of service server.Specifically, shown in Figure 2 one Kind service system structure schematic diagram, including parent server 210, main business server 220 and standby traffic server 230, In, parent server 210 is used to receive the request of data of client transmission, and the request of data received is preferentially distributed to master Service server 220 is handled the request of data with the Service Instance carried by main business server 220;If main The request of data is then switched to standby traffic because failure can not be handled the request of data by service server 220 Server 230, to be handled by standby traffic server the request of data.Based on above-mentioned business system shown in Fig. 2 Uniting, framework is shown in Figure 1, and the data request processing method specifically comprises the following steps:
Whether just step 110, when a request for data is received judges main business server corresponding with the request of data Often work thens follow the steps 120 if the main business server works normally, no to then follow the steps 130.
Specifically, the request of data includes the request of any request data, such as user wants to check friend by mobile phone Certain picture of circle, then user can send the request for obtaining image data by mobile phone to server;For example user comes round again Cross mobile phone certain using brush entertaining video, then can pass through relevant video refresh page and send the request etc. for obtaining video data.
The main business server is the preferred service server of response data request, the service of the Service Instance of carrying Service function of the function usually than the Service Instance of standby traffic server carrying is more perfect, and service effectiveness is preferable, corresponding clothes Logic of being engaged in is more complex, and the calculating pressure of generation is also larger, and the cost spent certainly is also higher.It is understood that if disregarding into Both this factor, the standby traffic server can also carry identical Service Instance with the main business server, at this time Service function having the same, regardless of superiority and inferiority.
Specifically, the response identification that can be returned based on the main business server for the request of data determines the master Whether service server works normally.When parent server receives request of data, further the request of data can be sent out It send to main business server, the request of data is handled with the Service Instance carried by main business server, it is described After main business server receives the request of data, meeting superior server returns to corresponding identification information, to inform higher level Request of data has been received in server, likewise, also can if the main business server can not receive the request of data Superior server returns to corresponding identification information, to inform that parent server can not receive request of data.Therefore it can be based on institute It states the response identification that main business server is returned for the request of data and determines whether the main business server works normally.
The request of data is forwarded to the main business server by step 120, to be held by the main business server The Service Instance of load handles the request of data, obtains target data.
Wherein, the Service Instance is the Service Instance for carrying all preset services of main business server, it is possible to understand that , the Service Instance includes the preset service for handling the request of data.
The request of data is forwarded to standby traffic server by step 130, to be held by the standby traffic server The Service Instance of load obtains target data.
Wherein, the factor for causing main business server can not work normally includes: that the computer room where main business server is disconnected The electricity Service Instance that perhaps unknowable code issue causes main business server to carry can not integrally start or unknowable Code issue causes the CPU (Central Processing Unit, central processing unit) of main business server to be occupied full.
Illustratively, the main business server and the standby traffic server are arranged in different regions, to prevent working as certain When power failure occurs in area, main business server and standby traffic server are unavailable simultaneously, or due to other areas Property reason cause main business server and standby traffic server unavailable simultaneously, further promoted operation system stability.
The technical solution of the present embodiment, when main business server can not respond request of data, parent server The request of data is switched into standby traffic server, to ring by standby traffic server to the request of data It answers, improves the stability of operation system processing request of data, and then improve the success rate for obtaining target data.
Embodiment two
Fig. 3 is a kind of flow diagram for data request processing method that the embodiment of the present disclosure two provides.The present embodiment with It is embodied based on each optinal plan in above-described embodiment, provides optional data request processing method.Specifically The data request processing method is applied in Feed request scene, the Feed requests scene are as follows: user passes through client Video refresh request is sent, when parent server corresponding with client receives the video refresh request, by the video Refresh requests are sent to corresponding service server, with the Service Instance by service server according to the client user's Hobby calculates and searches the interested recommendation video of the client user, and it is emerging finally to return to user's sense to the client The recommendation video of interest.Currently, there are many applications clients to recommend entertaining video exclusively for user, ideally cater to each The hobby of user, so that user's brush gets up to be so fond that will not let out of one's hand.In this way, causing Feed pages of client to need to carry huge day Live data, the service pressure of service server corresponding with client be also it is growing day by day, in order to improve the stabilization of operation system Property, propose the data request processing scheme of the present embodiment.Referring specifically to shown in Fig. 3, the data request processing method includes Following steps:
Step 310, when receiving video refresh request, judge corresponding with video refresh request main business service Whether device works normally, if so, 320 are thened follow the steps, it is no to then follow the steps 330.
The video refresh request is forwarded to main business server by step 320, to be held by the main business server The first preset service in the Feed Service Instance of load obtains video ID, based on the second default clothes in the Feed Service Instance Business obtains the corresponding video information of the video ID.
Include two steps the step of most critical in Feed service business system: the first step is to obtain the interested recommendation of user Video ID;Second step is based on the corresponding video information of recommendation video ID acquisition got, and the video information that will acquire It returns to client and is shown with the refreshing for realizing video.Any one in above-mentioned two step, which goes wrong, all cannot achieve visitor The video refresh function at family end can not carry out video display in client, user cannot then watch entertaining video.It is based on This obtains video ID by the first preset service in Feed Service Instance, based on described when receiving video refresh request The second preset service in Feed Service Instance obtains the corresponding video information of the video ID.Wherein, the video information is The corresponding video content information of the video ID, specifically include: video title information, the background music information of video, video Code rate, frame per second information and author information of video etc..
Specifically, obtaining video ID by the first preset service in Feed Service Instance, comprising: pre- by described first If service, video ID is obtained according to the interest characteristics of the video refresh request sender.Wherein, the video refresh request hair The interest characteristics for the side of sending can click behavior based on gender, age, occupation, history viewing video type or the history for sending user Etc. being calculated.By will send user interest characteristics and each video ID represent video type be based on preset rules into Row matching, and is ranked up each video ID according to matching degree, and the preceding a certain number of video ID that will finally sort are as pushing away Recommend video ID.
Further, if video ID failure is obtained based on first preset service, based on institute in Feed Service Instance The backup services for stating the first preset service obtain video ID.
Wherein, the case where obtaining video ID failure based on first preset service includes: the first preset service needle Error message or first preset service is returned to the video refresh request setting for the video refresh request Not return information in duration.The backup services of first preset service are different from the service logic of first preset service, The service logic of the backup services is simpler, and the service logic of first preset service is more complex, pre- by described first If the recommendation video ID that service acquisition arrives is that video refresh request sends the interested video ID of user, pass through the first default clothes The recommendation video ID that business is got can send user to video refresh request and bring preferable user experience;And pass through the backup Service acquisition to video ID be only high fever video ID, do not account for the hobby of user, therefore, taken by the backup The be engaged in video ID that gets can guarantee the basic experience of user, preferable experience can not be brought to user, improve system with this Stability.
It is understood that if the backup services of first preset service are identical as the first preset service setting Service logic then need the corresponding considerable business of configuration that is, both for obtaining interested the recommendations video ID of user Server carries the service logic, certainly will so will lead to operation system higher cost, therefore, usually pre- by described first If the service logic setting of the backup services of service is relatively simple, it is only used for realizing that basic service function is basic to guarantee User experience.
If obtaining video ID success based on first preset service, the backup clothes of first preset service are not enabled Business, and the second preset service being directly based upon in the Feed Service Instance obtains the corresponding video information of the video ID.
Further, if obtaining the corresponding video information failure of the video ID, base based on second preset service The backup services of the second preset service described in Feed Service Instance obtain the corresponding video information of the video ID, to improve The stability of system.
In order to further increase the stability of Feed service business system, the method also includes: if the Feed is serviced Example can not work normally, then reads number of targets from the local file for the main business server for carrying the Feed Service Instance According to;Wherein, when successfully getting video information by second preset service every time, the video information that will acquire is based on Set the local file of regular backup to the main business server.It includes: institute that the Feed Service Instance, which can not work normally, State in Feed Service Instance for obtain video ID the first preset service and its corresponding backup services can not normal work In the case where making or the Feed Service Instance for obtain the corresponding video information of video ID the second preset service and The case where its backup services can not work normally.
The video refresh request is forwarded to standby traffic server by step 330, to be held by standby traffic server The Feedbackup Service Instance of load reads video information from presetting database.
Wherein, the service logic of the Feedbackup Service Instance of standby traffic server carrying is simple as far as possible, with master The service logic of the Service Instance of service server carrying is different, is only used for guaranteeing the steady of most basic user experience and system It is qualitative.The Feedbackup Service Instance is particularly used for reading the business logic codes of target data from presetting database, Have the characteristics that it is simple, reliable, for guaranteeing most basic user experience.The target data of the presetting database is to be based on dividing Cloth distribution subscription message kafka service is obtained and is written from the local file of the main business server.Specifically, every Secondary when successfully getting video information by second preset service, the video information that will acquire backs up to the main business When the local file of server, the video information of the local file is synchronized to the presetting database by the kafka service. The presetting database typically can be Redis, Redis be being write using ANSI C language an of open source, support network, It is memory-based also can persistence log type, Key-Value database.It is obtained compared to based on preset service or backup services Target data is taken, target data is directly read from Redis does not need server and carry out logical operation process again, is greatly reduced The pressure of server, it is ensured that the success rate of request of data.
The technical solution of the present embodiment is asked when parent server receives video refreshing on the basis of the above embodiments When asking, the video refresh request is sent to the main business server for carrying Feed Service Instance, if the main business takes Business device failure can not be handled the video refresh request, then the video refresh request is switched to standby traffic Server is handled the video refresh request with the simple services logic carried by standby traffic server, is improved The stability of Feed service system, ensure that basic user experience.
Embodiment three
Fig. 4 is a kind of structural schematic diagram for data request processing device that the embodiment of the present disclosure three provides.The device is integrated In the parent server of service server, refering to what is shown in Fig. 4, the data request processing device includes: judgment module 410, One processing module 420 and Second processing module 430;
Wherein, judgment module 410, for when a request for data is received, judging main business corresponding with the request of data Whether business server works normally;First processing module 420 will be described if working normally for the main business server Request of data is forwarded to the main business server, with the Service Instance that is carried by the main business server to the data Request is handled, and target data is obtained;Second processing module 430, if can not work normally for the main business server, The request of data is then forwarded to standby traffic server, is obtained with the Service Instance carried by the standby traffic server Take target data;Wherein, the Service Instance is the Service Instance for carrying all preset services of current business server.
Further, judgment module 410 is specifically used for: being returned based on the main business server for the request of data Response identification determine whether the main business server works normally.
Further, when the request of data is video refresh request, first processing module 420 includes: the first video ID acquiring unit and the first acquiring video information unit;Wherein, the video ID acquiring unit is used to take based on the main business Be engaged in the first preset service acquisition video ID in the Feed Service Instance of device carrying;The acquiring video information unit is used to be based on institute It states the second preset service in the Feed Service Instance of main business server carrying and obtains the corresponding video information of the video ID.
Further, first processing module 420 further include: the second video ID acquiring unit and the second acquiring video information list Member, if the second video ID acquiring unit is used for based on the first preset service for being used to obtain video ID in Feed Service Instance Video ID failure is obtained, then the backup services based on the first preset service described in Feed Service Instance obtain video ID;It is described If the second acquiring video information unit is used to obtain based on the second preset service for being used to obtain video information in Feed Service Instance Take the corresponding video information failure of the video ID, the then backup services based on the second preset service described in Feed Service Instance Obtain the corresponding video information of the video ID.
Further, first processing module 430 further include: reading unit, if can not be just for the Feed Service Instance Often work then reads target data from the local file for the main business server for carrying the Feed Service Instance;Wherein, every The secondary video information that when successfully getting video information by second preset service, will acquire is based on setting regular backup To the local file of the main business server.
Further, Second processing module 430 is specifically used for: being taken by the Feedbackup that standby traffic server carries Pragmatic example reads target data from presetting database;Wherein, the target data of the presetting database is based on distributed post Subscribe to what message kafka service was obtained and was written from the local file of the main business server.
Further, the main business server and the standby traffic server are arranged in different regions.
The technical solution of the present embodiment, when main business server can not respond request of data, parent server The request of data is switched into standby traffic server, to ring by standby traffic server to the request of data It answers, improves the stability of operation system processing request of data, and then improve the success rate for obtaining target data.
Method provided by disclosure any embodiment can be performed in the said goods, has the corresponding functional module of execution method And beneficial effect.
Example IV
Below with reference to Fig. 5, it illustrates the structural representations for the terminal device 400 for being suitable for being used to realize the embodiment of the present disclosure Figure.Terminal device in the embodiment of the present disclosure can include but is not limited to such as mobile phone, laptop, digital broadcasting and connect Receive device, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), car-mounted terminal (such as vehicle Carry navigation terminal) etc. mobile terminal and such as number TV, desktop computer etc. fixed terminal.End shown in Fig. 5 End equipment is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 5, terminal device 400 may include processing unit (such as central processing unit, graphics processor etc.) 401, random access can be loaded into according to the program being stored in read-only memory (ROM) 402 or from storage device 408 Program in memory (RAM) 403 and execute various movements appropriate and processing.In RAM 403, it is also stored with terminal device Various programs and data needed for 400 operations.Processing unit 401, ROM 402 and RAM 403 pass through the phase each other of bus 404 Even.Input/output (I/O) interface 405 is also connected to bus 404.
In general, following device can connect to I/O interface 405: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 406 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 407 of dynamic device etc.;Storage device 408 including such as tape, hard disk etc.;And communication device 409.Communication device 409, which can permit terminal device 400, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 5 shows tool There is the terminal device 400 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 409, or from storage device 408 It is mounted, or is mounted from ROM 402.When the computer program is executed by processing unit 401, the embodiment of the present disclosure is executed Method in the above-mentioned function that limits.
It should be noted that the above-mentioned computer-readable medium of the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In open, computer-readable signal media may include in a base band or as the data-signal that carrier wave a part is propagated, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable and deposit Any computer-readable medium other than storage media, the computer-readable signal media can send, propagate or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. are above-mentioned Any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned terminal device;It is also possible to individualism, and not It is fitted into the terminal device.
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by the end When end equipment executes, so that the terminal device: when a request for data is received, judging main business corresponding with the request of data Whether server works normally;If the main business server works normally, the request of data is forwarded to the main business Business server, is handled the request of data with the Service Instance carried by the main business server, obtains target Data;If the main business server can not work normally, the request of data is forwarded to standby traffic server, with logical The Service Instance for crossing the standby traffic server carrying obtains target data;Wherein, the Service Instance is to carry current industry The Service Instance of all preset services of business server.
The calculating of the operation for executing the disclosure can be write with one or more programming languages or combinations thereof Machine program code, above procedure design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or holds on remote computer or service server completely on the user computer for part Row.In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize internet Service provider is connected by internet).
Flow chart and block diagram in attached drawing, illustrate the method and computer program product according to the various embodiments of the disclosure Architecture, function and operation in the cards.In this regard, each box in flowchart or block diagram can represent one A part of module, program segment or code, a part of the module, program segment or code include it is one or more for realizing The executable instruction of defined logic function.It should also be noted that in some implementations as replacements, function marked in the box It can also can occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated can actually base Originally it is performed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that It is the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, can uses and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.Being described in module or unit involved in the embodiment of the present disclosure can be realized by way of software, can also It is realized in a manner of through hardware.Wherein, module or the title of unit are not constituted under certain conditions to the module or list The restriction of member itself.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.
Note that above are only the preferred embodiment and institute's application technology principle of the disclosure.It will be appreciated by those skilled in the art that The present disclosure is not limited to specific embodiments described here, be able to carry out for a person skilled in the art it is various it is apparent variation, The protection scope readjusted and substituted without departing from the disclosure.Therefore, although being carried out by above embodiments to the disclosure It is described in further detail, but the disclosure is not limited only to above embodiments, in the case where not departing from disclosure design, also It may include more other equivalent embodiments, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims (10)

1. a kind of data request processing method, the parent server applied to service server, which is characterized in that the method packet It includes:
When a request for data is received, judge whether main business server corresponding with the request of data works normally;
If the main business server works normally, the request of data is forwarded to the main business server, to pass through The Service Instance of the main business server carrying handles the request of data, obtains target data;
If the main business server can not work normally, the request of data is forwarded to standby traffic server, with logical The Service Instance for crossing the standby traffic server carrying obtains target data;
Wherein, the Service Instance is the Service Instance for carrying all preset services of current business server.
2. the method according to claim 1, wherein judgement main business server corresponding with the request of data Whether work normally, comprising:
The response identification returned based on the main business server for the request of data determines that the main business server is No normal work.
3. the method according to claim 1, wherein passing through when the request of data is video refresh request The Service Instance of the main business server carrying handles the request of data, obtains target data, comprising:
The first preset service obtains video ID in Feed Service Instance based on main business server carrying;
It is corresponding to obtain the video ID for the second preset service in Feed Service Instance based on main business server carrying Video information.
4. according to the method described in claim 3, it is characterized by further comprising: if based on being used to obtain in Feed Service Instance The first preset service of video ID obtains video ID failure, the then backup based on the first preset service described in Feed Service Instance Service acquisition video ID;
If based on the corresponding view of the video ID is obtained for obtaining the second preset service of video information in Feed Service Instance The failure of frequency information, then it is corresponding to obtain the video ID for the backup services based on the second preset service described in Feed Service Instance Video information.
5. according to the method described in claim 3, it is characterized by further comprising: if the Feed Service Instance can not normal work Make, then reads target data from the local file for the main business server for carrying the Feed Service Instance;
Wherein, when successfully getting video information by second preset service every time, the video information base that will acquire In the local file of setting regular backup to the main business server.
6. according to the method described in claim 5, it is characterized in that, being incited somebody to action if the main business server can not work normally The request of data is forwarded to standby traffic server, obtains mesh with the Service Instance carried by the standby traffic server Mark data, comprising:
Target data is read from presetting database by the Feedbackup Service Instance that standby traffic server carries;
Wherein, the target data of the presetting database is that message kafka service is subscribed to based on distributed post from the main business The local file of business server is obtained and is written.
7. method according to claim 1-5, which is characterized in that the main business server and the spare industry Server setting be engaged in different regions.
8. a kind of data request processing device, is integrated in the parent server of service server characterized by comprising
Judgment module, for when a request for data is received, whether judging main business server corresponding with the request of data It works normally;
The request of data is forwarded to the master if working normally for the main business server by first processing module Service server is handled the request of data with the Service Instance carried by the main business server, obtains mesh Mark data;
The request of data is forwarded to standby by Second processing module if can not work normally for the main business server With service server, target data is obtained with the Service Instance carried by the standby traffic server;
Wherein, the Service Instance is the Service Instance for carrying all preset services of current business server.
9. a kind of terminal device, which is characterized in that the equipment includes:
One or more processing units;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processing units, so that one or more of processing fill Set the data request processing method realized as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that program dress processed Set the data request processing method realized as described in any in claim 1-7 when execution.
CN201910612130.3A 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium Pending CN110347467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910612130.3A CN110347467A (en) 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910612130.3A CN110347467A (en) 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN110347467A true CN110347467A (en) 2019-10-18

Family

ID=68178462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910612130.3A Pending CN110347467A (en) 2019-07-08 2019-07-08 A kind of data request processing method, apparatus, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN110347467A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360307A (en) * 2021-05-31 2021-09-07 珠海大横琴科技发展有限公司 Data processing method and device
CN114338360A (en) * 2022-01-14 2022-04-12 百果园技术(新加坡)有限公司 Live list service processing method and system, electronic device and storage medium
CN116155700A (en) * 2023-02-27 2023-05-23 北京奇艺世纪科技有限公司 Data calling method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001346181A (en) * 2000-06-01 2001-12-14 Matsushita Electric Ind Co Ltd Data storage unit sharing device and program recording medium
CN101068339A (en) * 2007-06-01 2007-11-07 华为技术有限公司 Method, server and user end for realizing video frequency requested program broadcasting-like services
WO2011103837A2 (en) * 2011-04-19 2011-09-01 华为技术有限公司 Method for processing packet when server fails and router thereof
CN105049503A (en) * 2015-07-07 2015-11-11 深信服网络科技(深圳)有限公司 Server dispatching method and load balancing device
CN109600672A (en) * 2018-10-19 2019-04-09 北京微播视界科技有限公司 Video content method for pushing and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001346181A (en) * 2000-06-01 2001-12-14 Matsushita Electric Ind Co Ltd Data storage unit sharing device and program recording medium
CN101068339A (en) * 2007-06-01 2007-11-07 华为技术有限公司 Method, server and user end for realizing video frequency requested program broadcasting-like services
WO2011103837A2 (en) * 2011-04-19 2011-09-01 华为技术有限公司 Method for processing packet when server fails and router thereof
CN105049503A (en) * 2015-07-07 2015-11-11 深信服网络科技(深圳)有限公司 Server dispatching method and load balancing device
CN109600672A (en) * 2018-10-19 2019-04-09 北京微播视界科技有限公司 Video content method for pushing and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360307A (en) * 2021-05-31 2021-09-07 珠海大横琴科技发展有限公司 Data processing method and device
CN113360307B (en) * 2021-05-31 2022-09-20 珠海大横琴科技发展有限公司 Data processing method and device
CN114338360A (en) * 2022-01-14 2022-04-12 百果园技术(新加坡)有限公司 Live list service processing method and system, electronic device and storage medium
CN116155700A (en) * 2023-02-27 2023-05-23 北京奇艺世纪科技有限公司 Data calling method and device, electronic equipment and storage medium
CN116155700B (en) * 2023-02-27 2024-08-23 北京奇艺世纪科技有限公司 Data calling method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10242336B1 (en) Inventory and delivery management
US20220366124A1 (en) Display method and apparatus, and electronic device
US8548442B2 (en) Syndication of multiple service instances
US20180047038A1 (en) Leveraging hashtags to dynamically scope a target audience for a social network message
CN107861982A (en) It is dynamically determined method, terminal, server and the system of application program page layout
CN110334246A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN108965389A (en) Method for showing information
CN107908637A (en) The entity update method and system in a kind of knowledge based storehouse
CN113569089A (en) Information processing method, device, server, equipment, system and storage medium
CN110347467A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN110351581B (en) Data request processing method and device, terminal equipment and storage medium
CN110516984B (en) Method and apparatus for generating delivery path information
WO2022022619A1 (en) Document editing method and apparatus, and electronic device
CN114707472A (en) Method and device for field merging and electronic equipment
CN120047207A (en) Page interaction method and device, electronic equipment and storage medium
CN120512476A (en) Message broadcasting method and device, equipment and medium thereof
CN119854531A (en) Page interaction method, device, equipment, medium and product
CN110266813A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN114071382A (en) Message sending method and device
CN111798251A (en) Verification method and device of house source data and electronic equipment
CN110347951A (en) A kind of data request processing method, apparatus, terminal device and storage medium
CN109271224A (en) Method and apparatus for determining position
CN114648363A (en) Display content determining method and device, readable medium and electronic equipment
CN115187364A (en) Method and device for monitoring margin risk in bank distributed scenario
CN111723312A (en) Data calling method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination