TW201521844A - Method and system for requesting information and computer-readable storage medium - Google Patents
Method and system for requesting information and computer-readable storage medium Download PDFInfo
- Publication number
- TW201521844A TW201521844A TW103139536A TW103139536A TW201521844A TW 201521844 A TW201521844 A TW 201521844A TW 103139536 A TW103139536 A TW 103139536A TW 103139536 A TW103139536 A TW 103139536A TW 201521844 A TW201521844 A TW 201521844A
- Authority
- TW
- Taiwan
- Prior art keywords
- server
- information
- request
- user
- reissue
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/131—Protocols for games, networked simulations or virtual reality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/40—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
本發明關於通信領域,特別是關於一種資訊請求方法和系統。 The present invention relates to the field of communications, and more particularly to an information request method and system.
現有的線上遊戲中,遊戲道具是豐富遊戲內容、提高使用者體驗的重要元素,其中對遊戲道具進行領取的過程通常涉及對多個資料庫的訪問以及多個伺服器之間的通信。一般而言,為方便集中管理遊戲道具與分配的使用者,遊戲道具的領取頁面通常設置在官網伺服器上,而具體的遊戲道具的發放方法是與遊戲內容相關聯的,因此該方法通常會設置在遊戲伺服器。具體而言,現有的遊戲道具的領取方法通常可以採用如第1圖所示的流程,該流程可以概括如下:步驟S102:使用者向官網伺服器發送領取道具的請求;步驟S104:官網伺服器檢查發送請求的使用者的權限;步驟S106:若發送請求的使用者具備領取權限,則官網伺服器向遊戲伺服器發送道具發放請求,並跳到步驟S110;步驟S108:若發送請求消息的使用者不具備領取權限,則向使用者回傳不具備領取權限的指示;步驟S110:若遊戲伺服器在接到該道具發放請求後,成功發放了對應的遊戲道具,則向使用者回傳道具領取成功的指示;步驟S112:若遊戲伺服器在接到該道具發放請求後,未成功發放對應的遊戲道具,則回復使用者的領取權限;以及步驟S114:若未成功,進一步向使用者回傳道具領取失敗的指示。 In the existing online games, the game props are important elements for enriching the game content and improving the user experience. The process of collecting the game props usually involves accessing multiple databases and communication between multiple servers. In general, in order to facilitate centralized management of game props and assigned users, the game props collection page is usually set on the official website server, and the specific game props are issued in association with the game content, so the method usually Set in the game server. Specifically, the method for collecting the existing game props can generally adopt the flow as shown in FIG. 1. The flow can be summarized as follows: Step S102: The user sends a request for collecting the props to the official website server; Step S104: The official web server Checking the authority of the user who sent the request; Step S106: If the user who sent the request has the receiving right, the official network server sends a props issuance request to the game server, and the process goes to step S110; Step S108: If the request message is used If the user does not have the right to receive the right, the user is returned with the instruction that the user does not have the right to receive the right. Step S110: If the game server successfully issues the corresponding game item after receiving the item issuance request, the item is returned to the user. Receiving an indication of success; step S112: if the game server fails to issue the corresponding game item after receiving the item issuance request, replying the user's receiving authority; and step S114: if not successful, further returning to the user Pass the props to receive instructions for failure.
由此可知,在現有的線上遊戲中,不論遊戲道具發放成功與 否,整個領取方法都將結束。而在道具發放失敗的情形下,使用者接收到道具領取失敗的指示後,通常會再次請求領取該遊戲道具,進而官網伺服器需要再次對該請求進行回應,並再次執行檢查該使用者的領取權限的查詢及處理操作。由於線上遊戲具有較為龐大的使用者基數,將明顯增加官網伺服器的負荷以及儲存有使用者權限的資料庫的訪問壓力,在另一方面,道具領取失敗之後執行的回復操作同樣增加資料庫的讀寫壓力,進而對該線上遊戲的運營狀態造成負面影響,以致於影響使用者體驗。針對上述的問題,目前尚未提出有效的解決方案。 It can be seen that in the existing online games, regardless of the success of the game props distribution No, the entire collection method will end. In the case that the item is unsuccessful, the user usually requests the game item again after receiving the instruction that the item is unsuccessfully received, and the official website server needs to respond to the request again, and performs the check of the user again. Query and processing of permissions. Since the online game has a relatively large user base, it will obviously increase the load of the official website server and the access pressure of the database storing the user authority. On the other hand, the reply operation performed after the item collection failure fails also increases the database. The pressure of reading and writing, which in turn adversely affects the operational status of the online game, affects the user experience. In response to the above problems, no effective solution has been proposed yet.
本發明實施例提供了一種資訊請求方法和系統,解決由於現有的遊戲道具的領取方法中對道具發放失敗僅採用簡單的回復處理所造成的伺服器負荷及資料庫讀寫壓力較大的技術問題。 The embodiment of the invention provides an information request method and system, which solves the technical problem that the server load and the database read and write pressure are caused by the simple reply processing in the method for collecting the game props in the existing game props. .
根據本發明實施例的一方面,提供了一種資訊請求方法,包括:一第一伺服器接收一使用者發送的用於獲取一資訊之一請求消息;所述第一伺服器回應於所述請求消息以判斷所述使用者是否具有獲取所述資訊之一權限;若所述使用者具有獲取所述資訊之所述權限,則所述第一伺服器向一第二伺服器請求獲取所述資訊;所述第二伺服器回應所述第一伺服器之獲取請求以發送所述資訊並判斷所述第一伺服器是否成功向所述第二伺服器請求獲取所述資訊;若所述第一伺服器向所述第二伺服器請求獲取所述資訊失敗,則所述第一伺服器向一第三伺服器請求補發所述資訊;所述第三伺服器回應所述第一伺服器之補發請求以發送所述資訊並判斷所述第一伺服器是否成功向所述第三伺服器請求補發所述資訊;以及若所述第一伺服器向所述第三伺服器請求補發所述資訊成功,則所述第一伺服器將從所述第三伺服器中接收到的所述資訊轉發給所述使用者。 According to an aspect of the present invention, a method for requesting information includes: a first server receiving a request message for acquiring a message sent by a user; and the first server responding to the request The message is used to determine whether the user has the right to obtain the information; if the user has the right to obtain the information, the first server requests the second server to obtain the information. The second server responds to the first server's acquisition request to send the information and determines whether the first server successfully requests the second server to obtain the information; When the server fails to request the second server to obtain the information, the first server requests a third server to re-issue the information; the third server responds to the first server Resending the request to send the information and determining whether the first server successfully requests the third server to reissue the information; and if the first server requests a reissue from the third server Said Inquiry is successful, the first server from the third server to forward the received information to the user.
根據本發明實施例的另一方面,還提供了一種資訊請求系 統,包括:一第一伺服器;一第二伺服器;以及一第三伺服器,其中所述第一伺服器包括:一接收單元,用於接收一使用者發送的用於獲取一資訊之一請求消息;一第一判斷單元,用於回應於所述請求消息以判斷所述使用者是否具有獲取所述資訊之一權限;一第一請求單元,用於在所述使用者具有獲取所述資訊之所述權限時,向所述第二伺服器請求獲取所述資訊;一第二請求單元,當所述第二伺服器回應所述第一請求單元之獲取請求以發送所述資訊並判斷所述第一伺服器是否成功向所述第二伺服器請求獲取所述資訊時,所述第二請求單元用於在所述第一伺服器向所述第二伺服器請求獲取所述資訊失敗時,則所述第一伺服器向所述第三伺服器請求補發所述資訊;以及一轉發單元,當所述第三伺服器回應所述第一伺服器之補發請求以發送所述資訊並判斷所述第一伺服器是否成功向所述第三伺服器請求補發所述資訊時,所述轉發單元用於在所述第一伺服器向所述第三伺服器請求補發所述資訊成功時,將從所述第三伺服器中接收到的所述資訊轉發給所述使用者。 According to another aspect of an embodiment of the present invention, an information request system is further provided The system includes: a first server; a second server; and a third server, wherein the first server comprises: a receiving unit, configured to receive a message sent by a user for acquiring a message a request message; a first determining unit, configured to respond to the request message to determine whether the user has permission to obtain the information; and a first requesting unit, configured to: acquire, in the user When the permission of the information is described, requesting the second server to acquire the information; a second requesting unit, when the second server responds to the acquiring request of the first requesting unit to send the information and Determining whether the first server successfully requests the second server to obtain the information, the second requesting unit is configured to request the second server to obtain the information from the first server In case of failure, the first server requests the third server to reissue the information; and a forwarding unit, when the third server responds to the first server resend request to send the location Information and judgment When the first server successfully requests the third server to reissue the information, the forwarding unit is configured to request, at the first server, the third server to reissue the information successfully. The information received from the third server is forwarded to the user.
在本發明實施例中,採用對第二伺服器未成功發放的資訊進行補發的設計,可以在一定程度上達到在第一伺服器對於使用者發送的請求消息的同一次回應中將使用者請求的資訊回傳給使用者的效果,進而避免了資訊發放失敗後的回復操作,以及避免由於資訊發放失敗導致的使用者對該請求消息的再次發送,並且免除了第一伺服器的再次身分驗證,從而實現了降低第一伺服器的負荷以及回復和身分驗證操作所對應的資料庫的訪問壓力的技術效果,解決了由於現有的遊戲道具的領取方法中對道具發放失敗僅採用簡單的回復處理所造成的伺服器負荷及資料庫讀寫壓力較大的技術問題。 In the embodiment of the present invention, the design of resending the information that is not successfully issued by the second server is used, and the user may be reached to the extent that the first server responds to the request message sent by the user. The effect of the requested information is returned to the user, thereby avoiding the reply operation after the information issuance failure, and avoiding the resending of the request message by the user due to the failure of the information distribution, and eliminating the re-identification of the first server. Verification, thereby realizing the technical effect of reducing the load of the first server and the access pressure of the database corresponding to the reply and the identity verification operation, and solving the simple reply of the failure of the item issuance due to the method of collecting the existing game props The technical problem caused by the server load and the database read and write pressure caused by the processing.
70‧‧‧第一伺服器 70‧‧‧First server
80‧‧‧第二伺服器 80‧‧‧Second server
90‧‧‧第三伺服器 90‧‧‧ third server
702‧‧‧接收單元 702‧‧‧ receiving unit
704‧‧‧第一判斷單元 704‧‧‧First Judgment Unit
706‧‧‧第一請求單元 706‧‧‧First request unit
708‧‧‧第二請求單元 708‧‧‧second request unit
710‧‧‧轉發單元 710‧‧‧Forwarding unit
902‧‧‧發送單元 902‧‧‧Send unit
904‧‧‧第二判斷單元 904‧‧‧Second judgment unit
906‧‧‧警告單元 906‧‧‧Warning unit
7102‧‧‧獲取模組 7102‧‧‧Getting module
7104‧‧‧轉發模組 7104‧‧‧ Forwarding module
S102-S114、S202-S210、S302-S304、S402-S406、S502、S602-S616‧‧‧步驟 S102-S114, S202-S210, S302-S304, S402-S406, S502, S602-S616‧‧
第1圖是根據習知技術的一種資訊請求系統的示意圖;第2圖是根據本發明實施例的一種可選的資訊請求方法的示意圖;第3圖是根據本發明實施例的另一種可選的資訊請求方法的示意圖;第4圖是根據本發明實施例的又一種可選的資訊請求方法的示意圖;第5圖是根據本發明實施例的又一種可選的資訊請求方法的示意圖;第6圖是根據本發明實施例的一種資訊請求系統的交互圖;第7圖是根據本發明實施例的另一種資訊請求系統的示意圖;第8圖是根據本發明實施例的又一種資訊請求系統的示意圖;第9圖是根據本發明實施例的又一種資訊請求系統的示意圖;以及第10圖是根據本發明實施例的又一種資訊請求系統的示意圖。 1 is a schematic diagram of an information request system according to a prior art; FIG. 2 is a schematic diagram of an optional information request method according to an embodiment of the present invention; and FIG. 3 is another optional according to an embodiment of the present invention. FIG. 4 is a schematic diagram of still another optional information request method according to an embodiment of the present invention; FIG. 5 is a schematic diagram of still another optional information request method according to an embodiment of the present invention; 6 is an interaction diagram of an information request system according to an embodiment of the present invention; FIG. 7 is a schematic diagram of another information request system according to an embodiment of the present invention; and FIG. 8 is another information request system according to an embodiment of the present invention. FIG. 9 is a schematic diagram of still another information request system according to an embodiment of the present invention; and FIG. 10 is a schematic diagram of still another information request system according to an embodiment of the present invention.
為了使本發明的目的、技術方案及優點更加清楚明白,以下結合附圖及實施例,對本發明進行進一步詳細說明。應當理解,此處所描述的具體實施例僅僅用以解釋本發明,並不用於限定本發明。 The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
需要說明的是,本發明的說明書、申請專利範圍及圖式中的術語“第一”、“第二”等是用於區別類似的物件,而非用於描述特定的順序或先後次序。應該理解如此使用的資料在適當情況下可以互換,以便於此描述的本發明實施例能夠以圖式或於此描述的以外的順序實施。此外,術語“包括”和“具有”以及類似術語係在於覆蓋不排他的包含,例如,包含了一系列步驟或單元的過程、方法、系統、產品或設備不必限於所清楚列出的步驟或單元,而是可包含未列出或對於這些過程、方法、系統、產品或設備所固有的其它步驟或單元。 It should be noted that the terms "first", "second", and the like in the specification, the claims, and the drawings are used to distinguish similar items, and are not intended to describe a particular order or order. It is to be understood that the materials so used are interchangeable, where appropriate, so that the embodiments of the invention described herein can be carried out in a In addition, the terms "comprises" and "comprising", and the like, are intended to cover a non-exclusive inclusive, for example, a process, method, system, product, or device that comprises a Rather, other steps or units not listed or inherent to such processes, systems, products, or devices may be included.
根據本發明實施例,一種資訊請求方法如第2圖所示,該方法包括:步驟S202:第一伺服器接收使用者發送的用於獲取資訊的請求消息。 According to an embodiment of the present invention, an information request method is as shown in FIG. 2, and the method includes: Step S202: The first server receives a request message sent by a user for acquiring information.
步驟S204:第一伺服器回應於請求消息判斷使用者是否具有獲取資訊的權限。 Step S204: The first server determines whether the user has the right to obtain information in response to the request message.
步驟S206:若是使用者具有獲取資訊的權限,則第一伺服器向第二伺服器請求獲取資訊,第二伺服器回應第一伺服器之獲取請求以發送資訊並判斷第一伺服器是否成功向第二伺服器請求獲取資訊。 Step S206: If the user has the right to obtain information, the first server requests the second server to obtain the information, and the second server responds to the first server's acquisition request to send the information and determines whether the first server succeeds. The second server requests to obtain information.
步驟S208:若第一伺服器向第二伺服器請求獲取資訊失敗,則第一伺服器向第三伺服器請求補發資訊,第三伺服器回應第一伺服器之補發請求以發送資訊並判斷第一伺服器是否成功向第三伺服器請求補發所述資訊。 Step S208: If the first server requests the second server to fail to obtain the information, the first server requests the third server to resend the information, and the third server responds to the first server resend request to send the information. Determining whether the first server successfully requests the third server to reissue the information.
步驟S210:若第一伺服器向第三伺服器請求補發資訊成功,則第一伺服器將從第三伺服器中接收到的資訊轉發給使用者。 Step S210: If the first server requests the third server to successfully resend the information, the first server forwards the information received from the third server to the user.
應當明確的是,本發明技術方案所要解決的問題之一是提供一種方法來對使用者發出的獲取某一資訊的請求進行回應,以在判斷出該使用者具備獲取該資訊的權限後,盡可能地促使伺服器在本次對請求的回應過程中將該資訊成功地回傳給該使用者,從而達到減少伺服器對資料庫的操作次數的效果,進而降低伺服器和資料庫的處理和訪問壓力。在本發明的實施例中,上述資訊可以是遊戲道具的相關資訊,例如道具身分識別(IDentification;ID),然而本發明對此不作限定。 It should be clear that one of the problems to be solved by the technical solution of the present invention is to provide a method for responding to a request sent by a user to obtain a certain information, so as to determine that the user has the right to obtain the information, It may cause the server to successfully return the information to the user during the response to the request, thereby reducing the number of times the server operates on the database, thereby reducing the processing of the server and the database. Access pressure. In the embodiment of the present invention, the information may be related information of the game props, such as IDentification (ID), which is not limited by the present invention.
根據本發明實施例提供的資訊請求方法,在步驟S202中,可以利用第一伺服器來接收使用者發送的用於獲取資訊的請求。該獲取資訊的請求可以為超文件傳輸協定(Hypertext Transfer Protocol;http)請求,也可以為檔案傳送協定(File Transfer Protocol;ftp)請求,或者為符合其他可行的文本傳輸格式的請求等,本發明對此不作限定。更具體地,該請求可以為一個消息,例如,對於http請求而言,其所對應的消息可以由請求行、訊息標頭和消息主體組成。可選地,在本發明實施例中,步驟S202中的請求消息可以攜帶能夠為第一伺服器所識別的與該消息所需獲取的資訊對應 的標識項,例如對於作為該資訊的遊戲道具而言,該消息可以攜帶有該遊戲道具的道具ID。 According to the information request method provided by the embodiment of the present invention, in step S202, the first server may be used to receive a request sent by the user for acquiring information. The request for obtaining information may be a Hypertext Transfer Protocol (http) request, a File Transfer Protocol (ftp) request, or a request for conforming to other feasible text transmission formats, etc., the present invention This is not limited. More specifically, the request may be a message, for example, for an http request, the corresponding message may consist of a request line, a message header, and a message body. Optionally, in the embodiment of the present invention, the request message in step S202 may carry information that can be obtained by the first server and is required to be acquired by the message. The identification item, for example, for a game item as the information, the message may carry the item ID of the game item.
一般而言,在本發明實施例中,第一伺服器可以是專用於對此類請求進行處理的伺服器,例如官網伺服器,然而應當理解,這並非是指該官網伺服器或者說第一伺服器不能用於執行其他業務。進一步地,本發明對於實施例中出現的第一、第二、第三伺服器並不作限定。 In general, in the embodiment of the present invention, the first server may be a server dedicated to processing such a request, such as a website server, but it should be understood that this does not refer to the official website server or the first server. The server cannot be used to perform other services. Further, the present invention is not limited to the first, second, and third servers appearing in the embodiment.
根據本發明實施例提供的資訊請求方法,在步驟S204中,第一伺服器可以回應於使用者發送的請求消息,判斷該使用者是否具有獲取資訊的權限,亦即第一伺服器對使用者是否有足夠的權限獲取所述資訊進行身分驗證操作。一般而言,在本發明實施例中,步驟S204的實現方式可以是與習知技術類似的身分驗證方式,最一般地,第一伺服器可以訪問儲存有與該資訊對應的身分驗證資訊的資料庫,並對使用者發送的請求消息中是否攜帶有該身分驗證資訊進行判斷,若是,則判斷通過身分驗證,亦即該使用者具有獲取所述資訊的權限,若否,則判斷未通過身分驗證,亦即該使用者不具有獲取所述資訊的權限。 According to the information request method provided by the embodiment of the present invention, in step S204, the first server may determine whether the user has the right to obtain information, that is, the first server to the user, in response to the request message sent by the user. Is there enough permission to get the information for identity verification? Generally, in the embodiment of the present invention, the implementation manner of step S204 may be an identity verification method similar to the prior art. Most generally, the first server may access the data stored with the identity verification information corresponding to the information. And determining whether the identity verification information is carried in the request message sent by the user, and if yes, determining to pass the identity verification, that is, the user has the right to obtain the information, and if not, determining that the identity is not passed. Verification, that is, the user does not have permission to obtain the information.
進一步地,在本發明實施例中,若透過步驟S204判斷使用者具有獲取所述資訊的權限,則可以進一步在步驟S206中,透過第一伺服器向第二伺服器請求獲取所述資訊。於此情況下,第一伺服器向第二伺服器發出的請求既可以為不同於前述由使用者發出的請求消息且能夠被第二伺服器所識別的一個新的請求,也可以是與使用者發出的請求消息相同的請求,從而也可以視為是由第一伺服器向第二伺服器轉發的請求。 Further, in the embodiment of the present invention, if it is determined in step S204 that the user has the right to obtain the information, the information may be requested to be acquired by the first server to the second server in step S206. In this case, the request sent by the first server to the second server may be a new request different from the foregoing request message sent by the user and can be recognized by the second server, or may be used and used. The same request is sent by the request message, and thus can also be regarded as a request forwarded by the first server to the second server.
對於線上遊戲的應用場景,第二伺服器可以為遊戲伺服器,進而該遊戲伺服器或者說第二伺服器可以根據接收到的請求為使用者配發該資訊,例如發放該請求所對應的遊戲道具。在本發明實施例中,第二伺服器對請求的資訊的發放可以有多種的具體實現方式,對於線上遊戲而言,作為第二伺服器的遊戲伺服器可以直接向遊戲使用者發放所需領取的 遊戲道具,或者說將該遊戲道具的道具ID對應添加到該使用者對應的資料記錄,例如所有物屬性中。然而在本發明的另一實施例中,第二伺服器所回傳的該資訊也可以不直接發送給使用者,而是經由第一伺服器進行轉發,本發明對此不作限定,其對本發明技術方案的實施及其效果不會造成任何影響。 For the application scenario of the online game, the second server may be a game server, and the game server or the second server may distribute the information to the user according to the received request, for example, issue the game corresponding to the request. Props. In the embodiment of the present invention, the second server may issue a plurality of specific implementation manners for the requested information. For the online game, the game server as the second server may directly issue the required collection to the game user. of The game props, or the item ID corresponding to the game props, are added to the data record corresponding to the user, such as the belonging property. However, in another embodiment of the present invention, the information returned by the second server may not be directly sent to the user, but is forwarded through the first server, which is not limited by the present invention. The implementation of the technical solution and its effects will not have any impact.
進一步地,在本發明實施例中,可以在第二伺服器對第一伺服器發出的請求進行回應後,對第二伺服器是否成功地對所需的該資訊進行發放進行判斷。具體地,對於線上遊戲的場景,作為第二伺服器的遊戲伺服器在回應於請求並發放對應的遊戲道具後,該遊戲伺服器自身即可以從儲存在該遊戲伺服器上或者是與該遊戲伺服器相連的協力廠商伺服器的資料庫中,檢測請求該遊戲道具的使用者是否已成功獲取該道具。當然這只是一種示例,在本發明實施例中,還可以有其他的方式對第二伺服器是否成功發放該資訊進行判斷,例如對於前述第二伺服器經由第一伺服器將資訊回傳給使用者的情形,也可以在第一伺服器上對是否接收到和/或發送出該資訊進行判斷,並以判斷結果作為對第二伺服器是否成功發放該資訊的根據。換言之,考慮到第二伺服器發放該資訊的動作的具體表現為第二伺服器對第一伺服器發出的請求進行回應,因此上述判斷結果也可以表示為第一伺服器向第二伺服器請求獲取資訊是成功還是失敗。 Further, in the embodiment of the present invention, after the second server responds to the request sent by the first server, it may be determined whether the second server successfully issues the required information. Specifically, for a scene of an online game, after the game server as the second server responds to the request and issues the corresponding game item, the game server itself can be stored on the game server or the game. In the database of the third-party server connected to the server, it is detected whether the user who requested the game item has successfully obtained the item. Of course, this is only an example. In the embodiment of the present invention, there may be other manners for determining whether the second server successfully issues the information, for example, the second server sends back information to the second server via the first server. In the case of the user, it is also possible to determine whether the information is received and/or sent on the first server, and use the result of the determination as a basis for whether the second server successfully issues the information. In other words, considering that the specific action of the second server to issue the information is that the second server responds to the request sent by the first server, the determination result may also be expressed as the first server requesting the second server. Whether the information is successful or not.
基於上述判斷結果,根據本發明實施例提供的資訊請求方法,在步驟S208中,若第一伺服器向第二伺服器請求獲取資訊失敗,則第一伺服器可以轉而向第三伺服器請求補發該資訊。 Based on the above judgment result, according to the information request method provided by the embodiment of the present invention, in step S208, if the first server requests the second server to obtain the information failure, the first server may instead request the third server. Reissue the information.
本發明實施例與習知技術之差異在於本發明可以利用第三伺服器或者設置在第三伺服器上的補發系統來對未成功發放的資訊進行補發,而非簡單地僅對伺服器及資料庫進行回復並向使用者回傳獲取資訊失敗的指示。最一般地,該補發系統可以與位於第二伺服器上的資訊的發放系統對應,然而本發明對此不作限定,例如在本發明之後的實施例中所示 的更為複雜的補發機制。 The difference between the embodiment of the present invention and the prior art is that the present invention can utilize the third server or the reissue system disposed on the third server to reissue the unsuccessfully issued information, instead of simply serving only the server. And the database responds and returns to the user an indication of failure to obtain the information. Most generally, the reissue system may correspond to a distribution system for information located on the second server, although the invention is not limited thereto, such as shown in the embodiments following the present invention. A more complicated reissue mechanism.
值得注意的是,該第三伺服器僅用於表示進行上述補發系統所在的伺服器,在本發明的一些實施例中,該補發系統也可以直接設置在遊戲伺服器上,從而使得第三伺服器與第二伺服器形成為一體。 It should be noted that the third server is only used to indicate the server where the above-mentioned reissue system is located. In some embodiments of the present invention, the reissue system may also be directly disposed on the game server, thereby making the The three servers are integrated with the second server.
在步驟S210中,若第一伺服器向第三伺服器請求補發資訊成功,則第一伺服器可以將從第三伺服器中接收到的資訊轉發給使用者,具體的轉發方式可以有多種,如第3圖所示,步驟S210可以包括:步驟S302:第一伺服器在第三伺服器設置的第一補發時間內獲取第三伺服器發送的資訊。 In step S210, if the first server requests the third server to successfully resend the information, the first server may forward the information received from the third server to the user, and the specific forwarding manner may be multiple. As shown in FIG. 3, step S210 may include: step S302: the first server acquires information sent by the third server in the first reissue time set by the third server.
步驟S304:第一伺服器將從第三伺服器中接收到的資訊轉發給使用者。 Step S304: The first server forwards the information received from the third server to the user.
在上述場景中,第一伺服器可以作為請求對應的資訊的中繼,先透過步驟S302從第三伺服器獲取該資訊,然後再將獲取到的該資訊發送給使用者。此種實施方式的優勢在於:(1)使用者與第一伺服器的交互、第一伺服器與第二伺服器的交互、以及第一伺服器與第三伺服器的交互邏輯可以是解耦合的,從而簡化了資訊請求系統的維護;(2)可以對向第二伺服器請求資訊是否成功與向第三伺服器請求資訊是否成功進行類似的判斷,而該判斷邏輯可以統一設置在第一伺服器上,從而進一步地簡化了資訊請求系統的維護。 In the above scenario, the first server may serve as a relay for requesting corresponding information, first obtaining the information from the third server through step S302, and then transmitting the obtained information to the user. The advantages of such an embodiment are: (1) the interaction of the user with the first server, the interaction of the first server with the second server, and the interaction logic of the first server and the third server may be decoupled Therefore, the maintenance of the information request system is simplified; (2) a similar judgment can be made as to whether the request to the second server is successful and whether the information is requested to the third server is successful, and the determination logic can be uniformly set in the first On the server, which further simplifies the maintenance of the information request system.
當然,以上只是本發明可行的實施方式之一,並不意味著對本發明構成任何限定,例如類似於前述實施方式中所述第二伺服器對該資訊的發放,在本發明的另一實施例中,也可以直接由第三伺服器向使用者發送該資訊,進而由第三伺服器或者是使用者來判斷補發是否成功。 Of course, the above is only one of the feasible embodiments of the present invention, and is not meant to limit the present invention, for example, similar to the issuance of the information by the second server in the foregoing embodiment, in another embodiment of the present invention. In the middle, the third server may directly send the information to the user, and the third server or the user may determine whether the reissue is successful.
進一步地,在步驟S302中,可以在第三伺服器設置的第一補發時間獲取補發的該資訊,透過該設置,可以在出現資訊發放失敗之後的一段時間再進行上述補發操作,從而一定程度上避免了失敗再次出現。 當然,一般而言,第一補發時間之後的等待時間可以相對較短,以免由於較長的等待時間影響到使用者體驗。 Further, in step S302, the re-issued information may be obtained at the first reissue time set by the third server, and by using the setting, the re-issue operation may be performed after a period of time after the information release failure occurs, thereby To some extent, it avoids the failure to appear again. Of course, in general, the waiting time after the first reissue time can be relatively short, so as not to affect the user experience due to the long waiting time.
更進一步地,如第4圖所示,作為一種可選的方式,在本發明實施例中,步驟S208可以包括:步驟S402:第三伺服器設置第一補發時間,並在第一補發時間內向第一伺服器發送資訊。 Further, as shown in FIG. 4, as an optional manner, in the embodiment of the present invention, step S208 may include: step S402: the third server sets the first reissue time, and in the first reissue Send information to the first server within the time.
步驟S404:若第三伺服器在第一補發時間內向第一伺服器發送資訊失敗,則第三伺服器判斷當前補發資訊的次數是否達到預定臨界值。 Step S404: If the third server fails to send information to the first server within the first reissue time, the third server determines whether the number of times of the current replenishment information reaches a predetermined threshold.
步驟S406:若第三伺服器判斷出當前補發資訊的次數未達到預定臨界值,則第三伺服器設置第二補發時間,並在第二補發時間內向第一伺服器發送資訊。 Step S406: If the third server determines that the number of times of the current reissue information does not reach the predetermined threshold, the third server sets the second reissue time, and sends information to the first server during the second reissue time.
在上述場景下,第三伺服器可以在第一補發時間後滯後一定時間向第一伺服器發送上述資訊,並且可以在補發失敗的情形下,在步驟S406中,在一個設置好的第二補發時間內再次進行補發,其中如步驟S404所述,總體的補發次數可以限定在一個預定臨界值內,以免無限制地延長使用者對獲取該資訊的等待時間,並且避免由於系統漏洞所造成的補發機制的濫用。如第5圖所示,可選地,在本發明實施例中,若第三伺服器判斷出當前補發資訊的次數達到預定臨界值,則步驟S208還可以包括:S502:第三伺服器停止向第一伺服器補發資訊,並向用於管理資訊的管理設備發送警告資訊。 In the above scenario, the third server may send the foregoing information to the first server after a certain time after the first reissue time, and may, in the case that the retransmission fails, in step S406, in a set The reissue is performed again in the second reissue time, wherein the total number of retransmissions may be limited to a predetermined threshold as described in step S404, so as to avoid unrestricted extension of the user's waiting time for acquiring the information, and avoiding the system The abuse of the reissue mechanism caused by the vulnerability. As shown in FIG. 5, optionally, in the embodiment of the present invention, if the third server determines that the number of times of the current replenishment information reaches a predetermined threshold, step S208 may further include: S502: the third server stops. Resend information to the first server and send a warning message to the management device for managing the information.
更具體地,在本發明實施例中,第三伺服器根據以下至少一者來設置第一補發時間和第二補發時間:資訊對應的業務類型、第二伺服器是否停止工作以及第三伺服器的運行負荷,從而第三伺服器可以根據資訊請求系統的運行狀態來合理地設置第一補發時間和第二補發時間,以避免造成過大的額外的運行負荷。 More specifically, in the embodiment of the present invention, the third server sets the first reissue time and the second reissue time according to at least one of the following: the service type corresponding to the information, whether the second server stops working, and the third The running load of the server, so that the third server can reasonably set the first reissue time and the second reissue time according to the running state of the information requesting system, so as to avoid causing excessive extra running load.
透過以上實施例可知,在本發明實施例中,採用對第二伺服器未成功發放的資訊進行補發的設計,可以在一定程度上達到在第一伺服器對於使用者發送的請求消息的同一次回應中將使用者請求的資訊回傳給使用者的效果,進而避免了資訊發放失敗後的回復操作,以及避免由於資訊發放失敗導致的使用者對該請求消息的再次發送,並且免除了第一伺服器再次的身分驗證,從而實現了降低第一伺服器的負荷以及回復和身分驗證操作所對應的資料庫的訪問壓力的技術效果,解決了由於現有的遊戲道具的領取方法中對道具發放失敗僅採用簡單的回復處理所造成的伺服器負荷及資料庫讀寫壓力較大的技術問題。 According to the above embodiment, in the embodiment of the present invention, the design of re-issuing the information that is not successfully issued by the second server may reach the same extent as the request message sent by the first server to the user. In the second response, the information requested by the user is returned to the user, thereby avoiding the reply operation after the information issuance failure, and avoiding the resending of the request message by the user due to the failure of the information distribution, and exempting the first The verification of the identity of the server again realizes the technical effect of reducing the load of the first server and the access pressure of the database corresponding to the reply and the identity verification operation, and solves the problem of the distribution of the props due to the collection method of the existing game props. The failure only uses the simple response processing to cause the server load and the technical problem of large reading and writing pressure of the database.
下面將結合一個具體的實施例來對本發明技術方案進行描述。在該實施例中,上述資訊請求方法可以應用於線上遊戲的場景,使用者請求的資訊可以包括用於指示遊戲程式中的道具的資訊,更具體地,可以包括以下至少一者:遊戲業務名、角色ID、道具ID及道具數量。 The technical solution of the present invention will be described below in conjunction with a specific embodiment. In this embodiment, the information request method may be applied to a scenario of an online game, and the information requested by the user may include information for indicating an item in the game program, and more specifically, may include at least one of the following: a game business name. , role ID, item ID, and number of items.
如第6圖所示,在該實施例中,資訊請求系統可以包括:使用者、作為第一伺服器的官網伺服器、作為第二伺服器的遊戲伺服器以及設置在該第二伺服器或第三伺服器上的補發系統。該資訊請求系統的資訊請求方法的流程可以描述如下:步驟S602:使用者向官網伺服器發送領取道具的請求。 As shown in FIG. 6, in this embodiment, the information request system may include: a user, a website server as a first server, a game server as a second server, and a second server or The reissue system on the third server. The flow of the information requesting method of the information requesting system can be described as follows: Step S602: The user sends a request for collecting the item to the official website server.
步驟S604:官網伺服器檢查發送請求消息的使用者的領取權限。 Step S604: The official network server checks the receiving right of the user who sends the request message.
步驟S606:若發送請求消息的使用者具備領取權限,則官網伺服器向遊戲伺服器發送道具發放請求,並跳到步驟S610。 Step S606: If the user who sends the request message has the receiving right, the official website server sends a props issuance request to the game server, and the process goes to step S610.
步驟S608:若發送請求消息的使用者不具備領取權限,則向使用者回傳不具備權限的指示。 Step S608: If the user who sends the request message does not have the receiving right, the user is returned an instruction that does not have the right.
步驟S610:若遊戲伺服器在接到該道具發放請求後,成功發送了對應的遊戲道具,則向使用者回傳道具領取成功的指示。 Step S610: If the game server successfully sends the corresponding game item after receiving the item issuance request, the game agent returns an indication that the item is successfully received.
步驟S612:若遊戲伺服器在接到該道具發放請求後,未成功發送對應的遊戲道具,則官網伺服器向補發系統發起補發請求。 Step S612: If the game server does not successfully send the corresponding game item after receiving the item issuance request, the official website server initiates a reissue request to the reissue system.
步驟S614:若成功補發遊戲道具,則向使用者回傳道具領取成功的指示。 Step S614: If the game item is successfully reissued, the user is returned an indication that the item is successfully received.
步驟S616:若補發次數達到或超過預定臨界值仍未成功補發遊戲道具,則向使用者回傳道具領取失敗的指示。 Step S616: If the number of reissues reaches or exceeds the predetermined threshold and the game props are not successfully re-issued, the user returns an indication that the item collection failed.
需要說明的是,對於前述的各方法實施例,為了簡單描述,故將其都表述為一系列的動作組合,但是本發明所屬技術領域中具有通常知識者應該知悉本發明並不受所描述的動作順序的限制,因為依據本發明,某些步驟可以採用其他順序或者同時進行。其次,本發明所屬技術領域中具有通常知識者也應該知悉說明書中所描述的實施例均屬於優選實施例,所涉及的動作和模組並不一定是本發明所必須的。 It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those having ordinary knowledge in the technical field of the present invention should be aware that the present invention is not described. The order of the actions is limited, as some steps may be performed in other orders or concurrently in accordance with the present invention. In addition, those skilled in the art to which the present invention pertains should also be aware that the embodiments described in the specification are all preferred embodiments, and the acts and modules involved are not necessarily required by the present invention.
透過以上的實施方式的描述,本發明所屬技術領域中具有通常知識者可以清楚地瞭解到根據上述實施例的方法可借助軟體加必需的通用硬體平台的方式來實現,當然也可以透過硬體,但前者是更佳的實施方式。基於這樣的理解,本發明的技術方案本質上或者說對習知技術做出貢獻的部分可以以軟體產品的形式體現出來,該軟體產品儲存在一個儲存介質,例如唯讀記憶體(ROM,Read-Only Memory)、隨機存取記憶體(RAM,Random Access Memory)、磁碟、光碟,軟體產品包括若干指令以使得一台終端設備例如可以是手機,電腦,伺服器,或者網路設備等可以執行本發明各個實施例所述的方法。 Through the description of the above embodiments, those skilled in the art to which the present invention pertains can clearly understand that the method according to the above embodiment can be implemented by means of a software plus a necessary general hardware platform, and of course, can also be through hardware. But the former is a better implementation. Based on this understanding, the technical solution of the present invention, which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a storage medium such as a read-only memory (ROM, Read). -Only Memory), Random Access Memory (RAM), disk, CD-ROM, software products include a number of instructions such that a terminal device can be, for example, a mobile phone, a computer, a server, or a network device. The methods described in various embodiments of the invention are performed.
根據本發明實施例,一種用於實施上述資訊請求方法的資訊請求系統,該系統包括第一伺服器70、第二伺服器80和第三伺服器90,如第7圖所示,該第一伺服器70包括:接收單元702、第一判斷單元704、第一請求單元706、第二請求單元708及轉發單元710。 According to an embodiment of the present invention, an information request system for implementing the above information request method, the system includes a first server 70, a second server 80, and a third server 90, as shown in FIG. 7, the first The server 70 includes a receiving unit 702, a first determining unit 704, a first requesting unit 706, a second requesting unit 708, and a forwarding unit 710.
接收單元702用於接收使用者發送的用於獲取資訊的請求消息。 The receiving unit 702 is configured to receive a request message sent by the user for acquiring information.
第一判斷單元704用於回應於請求消息判斷使用者是否具有獲取資訊的權限。 The first determining unit 704 is configured to determine, in response to the request message, whether the user has the right to obtain information.
第一請求單元706用於在使用者具有獲取資訊的權限時,向第二伺服器80請求獲取資訊。 The first requesting unit 706 is configured to request the second server 80 to acquire information when the user has the right to obtain information.
當第二伺服器80回應第一請求單元706之獲取請求以發送資訊並判斷第一伺服器70是否成功向第二伺服器80請求獲取資訊時,第二請求單元708用於在第一伺服器70向第二伺服器80請求獲取資訊失敗時,則第一伺服器70向第三伺服器90請求補發資訊。 When the second server 80 responds to the acquisition request of the first request unit 706 to send information and determines whether the first server 70 successfully requests the second server 80 to obtain information, the second request unit 708 is used in the first server. When the request to the second server 80 fails to acquire the information, the first server 70 requests the third server 90 for the reissue information.
當第三伺服器90回應第一伺服器70之補發請求以發送資訊並判斷第一伺服器70是否成功向第三伺服器90請求補發所述資訊時,轉發單元710用於在第一伺服器70向第三伺服器90請求補發資訊成功時,將從第三伺服器90中接收到的資訊轉發給使用者。 When the third server 90 responds to the resend request of the first server 70 to send information and determines whether the first server 70 successfully requests the third server 90 to reissue the information, the forwarding unit 710 is used to When the server 70 requests the third server 90 to succeed the reissue information, the information received from the third server 90 is forwarded to the user.
應當明確的是,本發明技術方案所要解決的問題之一是提供一種資訊請求系統,其對使用者發出的獲取某一資訊的請求進行回應,以在判斷出該使用者具備獲取該資訊的權限後,盡可能地促使伺服器在本次對請求的回應過程中將該資訊成功地回傳給該使用者,從而達到減少伺服器對資料庫的操作次數的效果,進而降低伺服器和資料庫的處理和訪問壓力。在本發明的一些實施例中,上述資訊可以是遊戲道具的相關資訊,例如道具ID,然而本發明對此不作限定。 It should be clear that one of the problems to be solved by the technical solution of the present invention is to provide an information requesting system that responds to a request sent by a user to obtain a certain information, so as to determine that the user has the right to obtain the information. After that, the server is successfully caused to successfully transmit the information back to the user in the response to the request, thereby reducing the number of times the server operates on the database, thereby reducing the server and the database. Processing and access pressure. In some embodiments of the present invention, the information may be related information of a game item, such as an item ID, which is not limited by the present invention.
根據本發明實施例提供的資訊請求系統中,可以利用第一伺服器70來接收使用者發送的用於獲取資訊的請求。該獲取資訊的請求可以為超文件傳輸協定請求,也可以為檔案傳送協定請求,或者為符合其他可行的文本傳輸格式的請求等,本發明對此不作限定。更具體地,該請求可以為一個消息,例如,對於http請求而言,其所對應的消息可以由請求行、 訊息標頭和消息主體組成。可選地,在本發明實施例中,接收單元702中的請求消息可以攜帶能夠為第一伺服器70所識別的與該消息所需獲取的資訊對應的標識項,例如對於作為該資訊的遊戲道具而言,該消息可以攜帶有該遊戲道具的道具ID。 According to the information request system provided by the embodiment of the present invention, the first server 70 can be used to receive a request sent by the user for acquiring information. The request for obtaining the information may be a request for a super-file transfer agreement, a request for a file transfer agreement, or a request for conforming to other feasible text transmission formats, and the like, which is not limited by the present invention. More specifically, the request may be a message, for example, for an http request, the corresponding message may be requested by the request line, The message header and message body are composed. Optionally, in the embodiment of the present invention, the request message in the receiving unit 702 may carry an identifier that can be identified by the first server 70 and corresponding to the information that the message needs to obtain, for example, for the game as the information. For props, the message can carry the item ID of the game item.
一般而言,在本發明實施例中,第一伺服器70可以是專用於對此類請求進行處理的伺服器,例如官網伺服器,然而應當理解,這並非是指該官網伺服器或者說第一伺服器不能用於執行其他業務。進一步地,本發明對於實施例中出現的第一、第二、第三伺服器70、80、90並不作限定。 In general, in the embodiment of the present invention, the first server 70 may be a server dedicated to processing such a request, such as a website server, but it should be understood that this does not refer to the official network server or the first A server cannot be used to perform other services. Further, the present invention is not limited to the first, second, and third servers 70, 80, and 90 appearing in the embodiment.
根據本發明實施例提供的資訊請求系統,第一伺服器70可以回應於使用者發送的請求消息,判斷該使用者是否具有獲取資訊的權限,亦即第一伺服器對使用者是否有足夠的權限獲取所述資訊進行身分驗證操作。一般而言,在本發明實施例中,第一判斷單元704的實現方式可以是與習知技術類似的身分驗證方式,最一般地,第一伺服器70可以訪問儲存有與該資訊對應的身分驗證資訊的資料庫,並對使用者發送的請求消息中是否攜帶有該身分驗證資訊進行判斷,若是,則判斷透過身分驗證,亦即該使用者具有獲取資訊的權限,若否,則判斷未透過身分驗證,亦即該使用者不具有獲取資訊的權限。 According to the information requesting system provided by the embodiment of the present invention, the first server 70 can determine whether the user has the right to obtain information, that is, whether the first server has sufficient information for the user, in response to the request message sent by the user. The authority obtains the information for the identity verification operation. Generally, in the embodiment of the present invention, the implementation manner of the first determining unit 704 may be an identity verification manner similar to the prior art. In most general, the first server 70 may access the identity stored in the information corresponding to the information. Verifying the information database and judging whether the identity verification message is carried in the request message sent by the user, and if so, determining to pass the identity verification, that is, the user has the right to obtain information, and if not, the judgment is not Through identity verification, the user does not have access to information.
進一步地,在本發明實施例中,若透過第一判斷單元704判斷使用者具有獲取資訊的權限,則可以進一步透過第一伺服器70之第一請求單元706向第二伺服器80請求獲取該資訊。於此情況下,第一伺服器70向第二伺服器80發出的請求既可以為不同於前述由使用者發出的請求消息且能夠被第二伺服器80所識別的一個新的請求,也可以是與使用者發出的請求消息相同的請求,從而也可以視為是由第一伺服器70向第二伺服器80轉發的請求。 Further, in the embodiment of the present invention, if the first determining unit 704 determines that the user has the right to obtain information, the first request unit 706 of the first server 70 may further request the second server 80 to obtain the News. In this case, the request sent by the first server 70 to the second server 80 may be a new request different from the foregoing request message sent by the user and recognized by the second server 80, or It is the same request as the request message sent by the user, and thus can also be regarded as a request forwarded by the first server 70 to the second server 80.
對於線上遊戲的應用場景,第二伺服器80可以為遊戲伺服 器,進而該遊戲伺服器或者說第二伺服器80可以根據接收到的該請求為使用者配發該資訊,例如發放該請求對應的遊戲道具。在本發明實施例中,第二伺服器80對請求的資訊的發放可以有多種的具體實現方式,對於線上遊戲而言,作為第二伺服器80的遊戲伺服器可以直接向遊戲使用者發放所需領取的遊戲道具,或者說將該遊戲道具的道具ID對應添加到該使用者對應的資料記錄,例如所有物屬性中,然而在本發明的另一實施例中,第二伺服器80所回傳的該資訊也可以不直接發送給使用者,而是經由第一伺服器70進行轉發,本發明對此不作限定,其對本發明技術方案的實施及其效果不會造成任何影響。 For an online game application scenario, the second server 80 can be a game servo And the game server or the second server 80 may distribute the information to the user according to the received request, for example, issue the game item corresponding to the request. In the embodiment of the present invention, the second server 80 can issue the requested information in various specific implementation manners. For the online game, the game server as the second server 80 can directly issue the game to the game user. The game item to be received, or the item ID corresponding to the game item is added to the data record corresponding to the user, such as the belonging attribute, but in another embodiment of the present invention, the second server 80 returns The information transmitted may not be directly sent to the user, but may be forwarded via the first server 70. The present invention does not limit this, and does not affect the implementation of the technical solution of the present invention and its effects.
進一步地,在本發明實施例中,可以在第二伺服器80對第一伺服器70發出的請求進行回應後,對第二伺服器80是否成功地對所需的該資訊進行發放進行判斷。具體地,對於線上遊戲的場景,作為第二伺服器80的遊戲伺服器在回應於請求並發放對應的遊戲道具後,該遊戲伺服器自身即可以從儲存在該遊戲伺服器上或者是與該遊戲伺服器相連的協力廠商伺服器上的資料庫中,檢測請求該遊戲道具的使用者是否已成功獲取該道具。當然這只是一種示例,在本發明實施例中,還可以有其他的方式對第二伺服器80是否成功發放該資訊進行判斷,例如對於第二伺服器80經由第一伺服器70將資訊回傳給使用者的情形,也可以在第一伺服器70上對是否接收到和/或發送出該資訊進行判斷,並以判斷結果作為對第二伺服器80是否成功發放該資訊的根據。換言之,考慮到第二伺服器80發放該資訊的動作的具體表現為第二伺服器80對第一伺服器70發出的請求所進行的回應,因此上述判斷結果也可以表示為第一伺服器70向第二伺服器80請求獲取資訊是成功還是失敗。 Further, in the embodiment of the present invention, after the second server 80 responds to the request sent by the first server 70, it may be determined whether the second server 80 successfully issues the required information. Specifically, for the scene of the online game, after the game server as the second server 80 responds to the request and issues the corresponding game item, the game server itself can be stored on the game server or In the database on the server of the third-party server connected to the game server, it is detected whether the user who requested the game item has successfully obtained the item. Of course, this is only an example. In the embodiment of the present invention, there may be other manners for determining whether the second server 80 successfully issues the information, for example, the second server 80 returns the information via the first server 70. In the case of the user, the first server 70 may also determine whether the information is received and/or sent, and use the result of the determination as a basis for the second server 80 to successfully issue the information. In other words, considering that the specific action of the second server 80 to issue the information is a response of the second server 80 to the request sent by the first server 70, the determination result may also be represented as the first server 70. The second server 80 is requested to obtain whether the information is successful or not.
基於上述判斷結果,根據本發明實施例提供的資訊請求系統,若第一伺服器70向第二伺服器80請求獲取資訊失敗,則第一伺服器70之第二請求單元708可以轉而向第三伺服器90請求補發該資訊。 Based on the above judgment result, according to the information request system provided by the embodiment of the present invention, if the first server 70 requests the second server 80 to obtain the information failure, the second request unit 708 of the first server 70 can turn to the second The three server 90 requests to reissue the information.
本發明實施例與習知技術之差異在於本發明可以利用第三伺服器90或者說設置在第三伺服器90上的補發系統來對未成功發放的資訊進行補發,而非簡單地對伺服器及資料庫進行回復並向使用者回傳獲取資訊失敗的指示。最一般地,該補發系統可以與位於第二伺服器80上的資訊的發放系統對應,然而本發明對此不作限定,例如在本發明之後的實施例中所示的更為複雜的補發機制。 The difference between the embodiment of the present invention and the prior art is that the third server 90 or the reissue system disposed on the third server 90 can be used to reissue information that is not successfully issued, instead of simply The server and the database respond and return an indication of failure of the information to the user. Most generally, the reissue system may correspond to a distribution system for information located on the second server 80, although the invention is not limited thereto, such as the more complex reissue shown in the embodiments subsequent to the present invention. mechanism.
值得注意的是,該第三伺服器90僅用於表示進行上述補發系統所在的伺服器,在本發明的一些實施例中,該補發系統也可以直接設置在遊戲伺服器上,從而使得第三伺服器90與第二伺服器80形成為一體。 It should be noted that the third server 90 is only used to indicate the server where the above-mentioned reissue system is located. In some embodiments of the present invention, the reissue system may also be directly disposed on the game server, thereby making The third server 90 is formed integrally with the second server 80.
若第一伺服器70向第三伺服器90請求補發資訊成功,則第一伺服器70之轉發單元710可以將從第三伺服器90中接收到的資訊轉發給使用者,具體的轉發方式可以有多種,如第8圖所示,轉發單元710可以包括:獲取模組7102及轉發模組7104。 If the first server 70 requests the third server 90 to successfully resend the information, the forwarding unit 710 of the first server 70 may forward the information received from the third server 90 to the user, and the specific forwarding manner. There may be multiple types. As shown in FIG. 8, the forwarding unit 710 may include: an obtaining module 7102 and a forwarding module 7104.
獲取模組7102用於在第一伺服器70向第三伺服器90請求獲取資訊成功時,在第三伺服器90設置的第一補發時間內獲取第三伺服器90發送的資訊。 The obtaining module 7102 is configured to acquire the information sent by the third server 90 in the first reissue time set by the third server 90 when the first server 70 requests the third server 90 to obtain the information successfully.
轉發模組7104用於將從第三伺服器90中接收到的資訊轉發給使用者。 The forwarding module 7104 is configured to forward the information received from the third server 90 to the user.
在上述場景中,第一伺服器70可以作為請求對應的資訊的中繼,先透過獲取模組7102從第三伺服器90獲取該資訊,然後再將獲取到的該資訊發送給使用者。此種實施方式的優勢在於:(1)使用者與第一伺服器70的交互、第一伺服器70與第二伺服器80的交互、以及第一伺服器70與第三伺服器90的交互邏輯可以是解耦合的,從而簡化了資訊請求系統的維護;(2)可以對向第二伺服器80請求資訊是否成功與向第三伺服器90請求資訊是否成功進行類似的判斷,而該判斷邏輯可以統一設置在第一伺服器70上,從而進一步地簡化了資訊請求系統的維護。 In the above scenario, the first server 70 may serve as a relay for requesting corresponding information, first acquiring the information from the third server 90 through the obtaining module 7102, and then transmitting the obtained information to the user. The advantages of such an embodiment are: (1) interaction of the user with the first server 70, interaction of the first server 70 with the second server 80, and interaction of the first server 70 with the third server 90 The logic may be decoupled to simplify maintenance of the information request system; (2) a similar decision may be made as to whether the request to the second server 80 is successful and whether the request to the third server 90 is successful, and the determination is made. The logic can be uniformly disposed on the first server 70, thereby further simplifying the maintenance of the information request system.
當然,以上只是本發明可行的實施方式之一,並不意味著對本發明構成任何限定,例如類似於前述實施方式中所述的第二伺服器80對該資訊的發放,在本發明的另一實施例中,也可以直接由第三伺服器90向使用者發送該資訊,進而由第三伺服器90或者是使用者來判斷補發是否成功。 Of course, the above is only one of the feasible embodiments of the present invention, and is not meant to constitute any limitation to the present invention, for example, similar to the issuance of the information by the second server 80 described in the foregoing embodiment, another in the present invention. In the embodiment, the third server 90 may directly send the information to the user, and the third server 90 or the user may determine whether the reissue is successful.
進一步地,獲取模組7102可以在第三伺服器90設置的第一補發時間內獲取補發的該資訊,透過該設置,可以在出現資訊發放失敗之後的一段時間再進行上述補發操作,從而一定程度上避免了失敗再次出現。當然,一般而言,第一補發時間的等待時間可以相對較短,以免由於較長的等待時間影響到使用者體驗。 Further, the obtaining module 7102 may obtain the re-issued information in the first reissue time set by the third server 90. Through the setting, the re-issuing operation may be performed after a period of time after the information issuance failure occurs. This avoids the failure to appear again to some extent. Of course, in general, the waiting time of the first reissue time can be relatively short, so as not to affect the user experience due to the long waiting time.
更進一步地,如第9圖所示,作為一種可選的方式,在本發明實施例中,第三伺服器90可以包括:發送單元902及第二判斷單元904。 Further, as shown in FIG. 9, as an optional manner, in the embodiment of the present invention, the third server 90 may include: a sending unit 902 and a second determining unit 904.
發送單元902用於設置第一補發時間,並在第一補發時間內向第一伺服器70發送資訊。 The sending unit 902 is configured to set a first reissue time, and send information to the first server 70 during the first reissue time.
第二判斷單元904用於在發送單元902在第一補發時間內向第一伺服器70發送資訊失敗時,判斷當前補發資訊的次數是否達到預定臨界值。 The second determining unit 904 is configured to determine, when the sending unit 902 fails to send information to the first server 70 in the first reissue time, whether the number of times of the current replenishment information reaches a predetermined threshold.
發送單元902還用於在第三伺服器90判斷出當前補發資訊的次數未達到預定臨界值時設置第二補發時間,並在第二補發時間內向第一伺服器70發送資訊。 The sending unit 902 is further configured to set a second reissue time when the third server 90 determines that the number of times of the current replenishment information does not reach a predetermined threshold, and send information to the first server 70 during the second reissue time.
在上述場景下,第三伺服器90可以在第一補發時間後滯後一定時間向第一伺服器70發送上述資訊,並且可以在補發失敗的情形下,由送單元902在一個設置好的第二補發時間內再次進行補發,其中第二判斷單元904之總體的補發次數可以限定在一個預定臨界值內,以免無限制地延長使用者對獲取該資訊的等待時間,並且避免由於系統漏洞所造成的補發機制的濫用。如第10圖所示,可選地,在本發明實施例中,若第三伺服器90 判斷出當前補發資訊的次數達到預定臨界值,則第三伺服器90還可以包括警告單元906。 In the above scenario, the third server 90 may send the above information to the first server 70 after a certain time delay after the first reissue time, and may be set by the sending unit 902 in the case that the reissue fails. The reissue is performed again in the second reissue time, wherein the total number of reissues of the second judging unit 904 can be limited to a predetermined threshold value, so as to avoid unrestricted extension of the waiting time for the user to obtain the information, and avoid Abuse of the reissue mechanism caused by system vulnerabilities. As shown in FIG. 10, optionally, in the embodiment of the present invention, if the third server 90 The third server 90 may further include a warning unit 906, when it is determined that the number of times of the current reissue information reaches a predetermined threshold.
警告單元906用於在第二判斷單元904判斷出當前補發資訊的次數達到預定臨界值時,停止向第一伺服器70補發資訊,並向用於管理資訊的管理設備發送警告資訊。 The warning unit 906 is configured to stop resending the information to the first server 70 when the second determining unit 904 determines that the number of times of the current replenishment information reaches a predetermined threshold, and send the warning information to the management device for managing the information.
更具體地,在本發明實施例中,發送單元902可以根據以下至少一者來設置第一補發時間和第二補發時間:資訊對應的業務類型、第二伺服器80是否停止工作以及第三伺服器90的運行負荷,從而第三伺服器90可以根據資訊請求系統的運行狀態來合理地設置第一補發時間和第二補發時間,以避免造成過大的額外的運行負荷。 More specifically, in the embodiment of the present invention, the sending unit 902 may set the first reissue time and the second reissue time according to at least one of the following: the service type corresponding to the information, whether the second server 80 stops working, and the The operating load of the three servers 90, so that the third server 90 can reasonably set the first reissue time and the second reissue time according to the operating state of the information requesting system to avoid causing an excessive additional operating load.
透過以上實施例可知,在本發明實施例中,採用對第二伺服器80未成功發放的資訊進行補發的設計,可以在一定程度上達到在第一伺服器70對於使用者發送的請求消息的同一次回應中將使用者請求的資訊回傳給使用者的效果,進而避免了資訊發放失敗後的回復操作,以及避免由於資訊發放失敗導致的使用者對該請求消息的再次發送,並且免除了第一伺服器70的再次身分驗證,從而實現了降低第一伺服器70的負荷以及回復和身分驗證操作所對應的資料庫的訪問壓力的技術效果,解決了由於現有的遊戲道具的領取方法中對道具發放失敗僅採用簡單的回復處理所造成的伺服器負荷及資料庫讀寫壓力較大的問題。 According to the above embodiment, in the embodiment of the present invention, the resending of the information that is not successfully issued by the second server 80 is used, and the request message sent by the first server 70 to the user may be reached to some extent. In the same response, the information requested by the user is returned to the user, thereby avoiding the reply operation after the information issuance failure, and avoiding the resending of the request message by the user due to the failure of the information distribution, and exempting The re-identification verification of the first server 70 realizes the technical effect of reducing the load of the first server 70 and the access pressure of the database corresponding to the reply and the identity verification operation, and solves the method for collecting the existing game props. In the case of failure to issue props, only the server response caused by simple reply processing and the pressure of reading and writing of the database are large.
下面將結合一個具體的實施例來對本發明技術方案進行描述。在該實施例中,上述資訊請求系統可以應用於線上遊戲的場景,使用者請求的資訊可以包括用於指示遊戲程式中的道具的資訊,更具體地,可以包括以下至少之一:遊戲業務名、角色ID、道具ID及道具數量。 The technical solution of the present invention will be described below in conjunction with a specific embodiment. In this embodiment, the information requesting system may be applied to a scenario of an online game, and the information requested by the user may include information for indicating an item in the game program, and more specifically, may include at least one of the following: a game business name. , role ID, item ID, and number of items.
如第6圖所示,在該實施例中,資訊請求系統可以包括:使用者、作為第一伺服器的官網伺服器、作為第二伺服器的遊戲伺服器以及設置在該第二伺服器或第三伺服器上的補發系統。該資訊請求系統的資訊 請求方法的流程可以描述如下:步驟S602:使用者向官網伺服器發送領取道具的請求。 As shown in FIG. 6, in this embodiment, the information request system may include: a user, a website server as a first server, a game server as a second server, and a second server or The reissue system on the third server. Information request system information The flow of the request method can be described as follows: Step S602: The user sends a request for receiving the item to the official website server.
步驟S604:官網伺服器檢查發送請求消息的使用者的領取權限。 Step S604: The official network server checks the receiving right of the user who sends the request message.
步驟S606:若發送請求消息的使用者具備領取權限,則官網伺服器向遊戲伺服器發送道具發放請求,並跳到步驟S610。 Step S606: If the user who sends the request message has the receiving right, the official website server sends a props issuance request to the game server, and the process goes to step S610.
步驟S608:若發送請求消息的使用者不具備領取權限,則向使用者回傳不具備權限的指示。 Step S608: If the user who sends the request message does not have the receiving right, the user is returned an instruction that does not have the right.
步驟S610:若遊戲伺服器在接到該道具發放請求後,成功發送了對應的遊戲道具,則向使用者回傳道具領取成功的指示。 Step S610: If the game server successfully sends the corresponding game item after receiving the item issuance request, the game agent returns an indication that the item is successfully received.
步驟S612:若遊戲伺服器在接到該道具發放請求後,未成功發送對應的遊戲道具,則官網伺服器向補發系統發起補發請求。 Step S612: If the game server does not successfully send the corresponding game item after receiving the item issuance request, the official website server initiates a reissue request to the reissue system.
步驟S614:若成功補發遊戲道具,則向使用者回傳道具領取成功的指示。 Step S614: If the game item is successfully reissued, the user is returned an indication that the item is successfully received.
步驟S616:若補發次數達到或超過預定臨界值仍未成功補發遊戲道具,則向使用者回傳道具領取失敗的指示。 Step S616: If the number of reissues reaches or exceeds the predetermined threshold and the game props are not successfully re-issued, the user returns an indication that the item collection failed.
上述本發明實施例序號僅僅為了描述,不代表實施例的優劣。 The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
在本發明的上述實施例中,對各個實施例的描述都各有重點,某個實施例中沒有詳述的部分,可以參見其他實施例的相關描述。 In the above-mentioned embodiments of the present invention, the descriptions of the various embodiments are all focused, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
在本發明所提供的幾個實施例中,應該理解到,所揭露的系統可透過其它的方式實現。以上所描述的裝置實施例僅僅是示意性的,例如所述單元的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式,例如多個單元或元件可以結合或者可以整合到另一個系統,或一些特徵可以忽略或不執行。另一方面,所顯示或討論的相互之間的耦合或直接耦合或通信連接可以是透過一些介面、單元或模組的間接耦合或通 信連接,也可以是電性或其它的形式。 In the several embodiments provided by the present invention, it should be understood that the disclosed system can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or may be integrated into another. A system, or some features can be ignored or not executed. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication through some interfaces, units or modules. The letter connection can also be electrical or other form.
所述作為分離部件說明的單元可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部單元來實現本實施例方案的目的。 The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本發明各個實施例中的各功能單元可以整合在一個處理單元中,也可以是各個單元單獨物理存在,也可以兩個或兩個以上單元集成在一個單元中。上述整合的單元既可以採用硬體的形式實現,也可以採用軟體功能單元的形式實現。 In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of a hardware or a software functional unit.
所述整合的單元如果以軟體功能單元的形式實現並作為獨立的產品銷售或使用時,可以儲存在一個電腦可讀取儲存介質中。基於這樣的理解,本發明的技術方案本質上或者說對習知技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在電腦可讀取儲存介質中,包括若干指令集合用以使得一台電腦設備(可為個人電腦、伺服器或者網路設備等)執行本發明各個實施例所述方法的全部或部分步驟。前述電腦可讀取儲存介質包括:U盤、唯讀記憶體(Read Only Memory;ROM)、隨機存取記憶體(Random Access Memory;RAM)、行動硬碟、磁碟或者光碟等各種可以儲存程式碼的介質。 The integrated unit can be stored in a computer readable storage medium if it is implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product in the form of a software product in essence or in the form of a contribution to the prior art, and the computer software product may be stored in a computer readable form. The storage medium includes a plurality of sets of instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present invention. The foregoing computer readable storage medium includes: a USB flash drive, a read only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or a compact disk. The medium of the code.
雖然本發明已用較佳實施例揭露如上,然其並非用以限定本發明,本發明所屬技術領域中具有通常知識者在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the invention has been described above by way of a preferred embodiment, the invention is not intended to be limited thereto, and the invention may be modified and modified without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.
S202-S210‧‧‧步驟 S202-S210‧‧‧Steps
Claims (15)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310662372.6A CN104702647B (en) | 2013-12-09 | 2013-12-09 | Information requesting method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
TW201521844A true TW201521844A (en) | 2015-06-16 |
Family
ID=53349412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW103139536A TW201521844A (en) | 2013-12-09 | 2014-11-14 | Method and system for requesting information and computer-readable storage medium |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN104702647B (en) |
TW (1) | TW201521844A (en) |
WO (1) | WO2015085735A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105939360B (en) * | 2016-06-24 | 2019-07-09 | 北京奇虎科技有限公司 | The outfit method and device of game article |
CN106708661B (en) * | 2016-12-09 | 2020-05-19 | 浙江宇视科技有限公司 | Data backup method and device in wide area network environment |
CN110876852B (en) * | 2018-09-06 | 2023-09-26 | 深圳市贰陆陆科技有限公司 | Network game data processing method and system for micro-service |
CN110507988A (en) * | 2019-08-12 | 2019-11-29 | 广州小丑鱼信息科技有限公司 | A kind of game broken string Auto-reconnect method and system |
CN111082901B (en) * | 2019-11-21 | 2022-05-13 | 深圳前海环融联易信息科技服务有限公司 | Intelligent message sending method and device, computer equipment and storage medium |
CN117692098A (en) * | 2023-07-13 | 2024-03-12 | 荣耀终端有限公司 | Method for processing frame synchronization packet loss in game and related device |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201126371A (en) * | 2010-01-27 | 2011-08-01 | Hui Lin | Online gaming authentication framework and method |
TW201209626A (en) * | 2010-05-03 | 2012-03-01 | Gsimedia Corp | Authentication method and system for online gaming |
CN102164174A (en) * | 2011-03-09 | 2011-08-24 | 南京恩瑞特实业有限公司 | Internal memory transferring method for high-capacity data |
CN102710535B (en) * | 2011-03-28 | 2016-04-27 | 腾讯科技(深圳)有限公司 | A kind of data capture method and equipment |
CN102752324B (en) * | 2011-04-18 | 2015-06-24 | 阿里巴巴集团控股有限公司 | Network communication system and method |
CN103037357A (en) * | 2011-10-10 | 2013-04-10 | 昆达电脑科技(昆山)有限公司 | Navigation information downloading method using microblog |
CN103297462B (en) * | 2012-02-28 | 2017-12-29 | 阿里巴巴集团控股有限公司 | The verification method and device of a kind of business object |
CN102594912A (en) * | 2012-03-15 | 2012-07-18 | 北京昆仑万维科技股份有限公司 | Data processing method under server architecture, server and server architecture |
CN103427953A (en) * | 2013-08-15 | 2013-12-04 | 中国船舶重工集团公司第七一五研究所 | Beidou communication method for efficient transmission of buoy data |
-
2013
- 2013-12-09 CN CN201310662372.6A patent/CN104702647B/en active Active
-
2014
- 2014-06-11 WO PCT/CN2014/079648 patent/WO2015085735A1/en active Application Filing
- 2014-11-14 TW TW103139536A patent/TW201521844A/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2015085735A1 (en) | 2015-06-18 |
CN104702647B (en) | 2018-06-12 |
CN104702647A (en) | 2015-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TW201521844A (en) | Method and system for requesting information and computer-readable storage medium | |
CN105530175B (en) | Message processing method, device and system | |
CN104917749B (en) | account registration method and device | |
KR102167613B1 (en) | Message push method and device | |
US10476833B2 (en) | Warning method and apparatus, and processing server | |
CN106878309B (en) | Safety early warning method and device applied to network payment | |
JP6935406B2 (en) | Service implementation method and equipment | |
CN104519018A (en) | Method, device and system for preventing malicious requests for server | |
CN107347049B (en) | Account authentication method and server | |
CN109639719B (en) | Identity verification method and device based on temporary identifier | |
RU2012104365A (en) | METHOD AND SERVER FOR INSTANT EXCHANGE OF MESSAGES | |
EP3206422A1 (en) | Method and device for creating subscription resource | |
CN105165035B (en) | Have both the multimedia message transmission of text message transmission | |
US20160234291A1 (en) | File sharing method and file sharing system utilizing the same | |
CN104348613B (en) | User verification method, apparatus and system | |
CN111476640B (en) | Authentication method, system, storage medium and big data authentication platform | |
KR20140109565A (en) | push service system and method | |
CN113179282A (en) | Method and device for merging account numbers and server | |
CN108009406B (en) | Account freezing method, account unfreezing method and server | |
CN114554251B (en) | Multimedia data requesting method and device, storage medium and electronic device | |
US10749850B2 (en) | Method for checking a parameter indicating a confidence level associated with a user account of an online service | |
US8818432B2 (en) | Method and integrated routing device for controlling remote systems via short messages | |
CN112953951B (en) | User login verification and security detection method and system based on domestic CPU | |
CN102984148A (en) | Method, device and system for content access control | |
CN109948362B (en) | Data access processing method and system |