CN111490997B - Task processing method, proxy system, service system and electronic equipment - Google Patents

Task processing method, proxy system, service system and electronic equipment Download PDF

Info

Publication number
CN111490997B
CN111490997B CN201910072788.XA CN201910072788A CN111490997B CN 111490997 B CN111490997 B CN 111490997B CN 201910072788 A CN201910072788 A CN 201910072788A CN 111490997 B CN111490997 B CN 111490997B
Authority
CN
China
Prior art keywords
proxy
data
identification information
service
server
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.)
Active
Application number
CN201910072788.XA
Other languages
Chinese (zh)
Other versions
CN111490997A (en
Inventor
王振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910072788.XA priority Critical patent/CN111490997B/en
Publication of CN111490997A publication Critical patent/CN111490997A/en
Application granted granted Critical
Publication of CN111490997B publication Critical patent/CN111490997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The method comprises the steps of establishing connection with a terminal device and a service system respectively, establishing long connection with the service system, obtaining identification information from the terminal device, obtaining data corresponding to the identification information from the service system, processing a task based on the data under the condition that the task corresponding to the identification information sent by the terminal device is received, generating a processing result, returning the processing result to the terminal device, updating the data, and asynchronously uploading the updated data to the service system. The present disclosure also provides a proxy system, a service system, an electronic device, and a computer-readable storage medium.

Description

Task processing method, proxy system, service system and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a task processing method, an agent system, a service system, and an electronic device.
Background
The existing service architecture is usually that a front-end page is used for calling a service processing service of a back-end server from the front-end server, the back-end server processes the service and an operation database and returns a result to the front-end server, and the front-end server displays the result correspondingly. The user requests to the front-end servers are all through http requests, if the request amount is large and high, the service is subjected to cluster deployment, and equipment or software such as load balancing is added in the middle, so that the http requests are distributed to the front-end servers in an equalizing mode.
The user requests the service through the http protocol, the request finally reaches the server through the public network, the server processes the request and returns response information, and the user receives the response information and then carries out the next processing. The user is in a waiting state in the process from the initiation of the request to the receipt of the response, and the more obvious the waiting feel is perceived by the user when the concurrency is large; on the other hand, when the user multi-request amount is large, a large number of connections are established and disconnected, the server resource is greatly consumed due to the maintenance of the connections, and the performance and throughput of the server are obviously reduced.
Therefore, the existing service architecture is suitable for the traditional access service, but cannot meet the requirements of some services with high real-time requirements.
Disclosure of Invention
In view of the above, the present disclosure provides a task processing method, a proxy system, a service system, and an electronic device.
One aspect of the present disclosure provides a task processing method applied to a proxy system, where the method includes establishing a connection with a terminal device and a service system, respectively, where a long connection is established with the service system, obtaining identification information from the terminal device, obtaining data corresponding to the identification information from the service system, processing a task corresponding to the identification information sent by the terminal device based on the data when the task is received, generating a processing result, returning the processing result to the terminal device, updating the data, and asynchronously uploading the updated data to the service system.
According to the embodiment of the disclosure, the proxy system communicates with the terminal device through a local area network connection, and the proxy system communicates with the service system through a public network connection.
According to the embodiment of the disclosure, the proxy system comprises a proxy server and a front gateway server, the service system comprises a back gateway server and a service server, the proxy system establishes long connection with the service system, the front gateway server sends a connection request to the back gateway server and receives proxy credentials returned by the back gateway server, the front gateway server sends the proxy credentials to the proxy server, and the establishment of the long connection between the proxy system and the service system is completed under the condition that the proxy server verifies that the proxy credentials are successful.
According to an embodiment of the present disclosure, before asynchronously uploading updated data to the service system, the method further includes, in response to receiving notification information sent by the service system to indicate that data corresponding to the identification information changes, requesting synchronization of the data from the service system.
According to an embodiment of the disclosure, when receiving a task corresponding to the identification information sent by the terminal device, processing the task based on the data, generating a processing result, and returning the processing result to the terminal device, and updating the data includes, in response to receiving the task corresponding to the identification information sent by the terminal device, checking whether the proxy system stores data corresponding to the identification information. And if the proxy system stores the data corresponding to the identification information, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data. If the agent system does not find the data corresponding to the identification information, the agent system obtains the data corresponding to the identification information from the service system, processes the task based on the data, generates a processing result, returns the processing result to the terminal equipment, and updates the data.
Another aspect of the present disclosure provides a task processing method applied to a service system, the method including, in a case where a long connection is established with a proxy system, receiving a data request including identification information sent by the proxy system, if data corresponding to the identification information is not occupied, sending the data to the proxy system, enabling the proxy system to process a task corresponding to the identification information based on the data, and marking that the data corresponding to the identification information is in an occupied state, and receiving updated data from the proxy system, and releasing the occupied state of the data corresponding to the identification information.
According to the embodiment of the disclosure, the service system comprises a back-end gateway server and a service server, wherein the back-end gateway server communicates with the service server through a distributed calling service.
According to an embodiment of the disclosure, the establishing the long connection with the proxy system includes that the back-end gateway server receives a connection request sent by the proxy system, and in a case that the service server verifies that the connection request is successful, the service server sends a proxy credential to the proxy system through the back-end gateway server so as to complete the establishment of the long connection with the proxy system.
According to an embodiment of the present disclosure, after the long connection is established with the proxy system, the method further includes recording identification information of a back-end gateway server connected with the proxy system, and the sending the data to the proxy system includes the service server sending the data to the back-end gateway server corresponding to the identification information, and the back-end gateway server sending the data to the proxy system.
According to an embodiment of the disclosure, the method further includes, if the data corresponding to the identification information is changed in a case where the data corresponding to the identification information is occupied by the proxy system, sending notification information to the proxy system.
Another aspect of the present disclosure provides a proxy system including a first connection module, a first acquisition module, a second acquisition module, a task processing module, and an upload module. And the first connection module is used for respectively establishing connection with the terminal equipment and the service system, wherein long connection is established with the service system. And the first obtaining module is used for obtaining the identification information from the terminal equipment. And the second obtaining module is used for obtaining data corresponding to the identification information from the service system. And the task processing module is used for processing the task based on the data under the condition that the task corresponding to the identification information sent by the terminal equipment is received, generating a processing result, returning the processing result to the terminal equipment and updating the data. And the uploading module is used for asynchronously uploading the updated data to the service system.
According to the embodiment of the disclosure, the proxy system communicates with the terminal device through a local area network connection, and the proxy system communicates with the service system through a public network connection.
According to an embodiment of the disclosure, the proxy system includes a proxy server and a front-end gateway server, the service system includes a back-end gateway server and a service server, and the proxy system establishes a long connection with the service system includes sending a connection request to the back-end gateway server through the front-end gateway server. And receiving the proxy certificate returned by the back-end gateway server. The pre-gateway server sends the proxy credential to the proxy server. And under the condition that the proxy server verifies the proxy certificate successfully, completing the establishment of the long connection between the proxy system and the service system.
According to an embodiment of the disclosure, the proxy system further includes a synchronization module, configured to request the service system to synchronize the data in response to receiving notification information sent by the service system and indicating that the data corresponding to the identification information changes.
According to an embodiment of the disclosure, the task processing module is configured to check, in response to receiving a task corresponding to the identification information sent by the terminal device, whether the proxy system stores data corresponding to the identification information. And if the proxy system stores the data corresponding to the identification information, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data. If the agent system does not find the data corresponding to the identification information, the agent system obtains the data corresponding to the identification information from the service system, processes the task based on the data, generates a processing result, returns the processing result to the terminal equipment, and updates the data.
Another aspect of the present disclosure provides a service system including a second connection module, a data providing module, and a data receiving module. And the second connection module is used for establishing long connection with the proxy system. And the data providing module is used for sending the data to the proxy system if the data corresponding to the identification information is unoccupied under the condition that the data request containing the identification information sent by the proxy system is received, so that the proxy system processes the task corresponding to the identification information based on the data and marks that the data corresponding to the identification information is in an occupied state. And the data receiving module is used for receiving the updated data from the proxy system and releasing the occupied state of the data corresponding to the identification information.
According to the embodiment of the disclosure, the service system comprises a back-end gateway server and a service server, wherein the back-end gateway server communicates with the service server through a distributed calling service.
According to an embodiment of the disclosure, the establishing a long connection with the proxy system includes the backend gateway server receiving a connection request sent by the proxy system. And under the condition that the service server verifies that the connection request is successful, the service server sends a proxy certificate to the proxy system through the back-end gateway server so as to complete the establishment of long connection with the proxy system.
According to an embodiment of the disclosure, the service system further includes a recording module, configured to record identification information of a back-end gateway server connected to the proxy system, and the sending the data to the proxy system includes the service server sending the data to the back-end gateway server corresponding to the identification information. And the back-end gateway server sends the data to the proxy system.
According to an embodiment of the disclosure, the service system further includes a notification module, configured to send notification information to the proxy system if the data corresponding to the identification information changes when the data corresponding to the identification information is occupied by the proxy system.
Another aspect of the disclosure provides an electronic device comprising at least one processor and at least one memory for storing one or more computer-readable instructions, wherein the one or more computer-readable instructions, when executed by the at least one processor, cause the processor to perform the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which when executed are for implementing a method as described above.
The method processes tasks through the proxy system and asynchronously uploads the tasks to the service system, so that the pressure of the service system can be reduced, the response speed is improved, and meanwhile, the establishment and disconnection of a large number of connections are avoided through the long connection between the proxy system and the service system, so that the server still has higher performance and processing capacity under a high concurrency situation.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates a system architecture of a task processing method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a task processing method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a task processing method according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a timing diagram for a proxy system to establish a long connection with a service system in accordance with an embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of transferring data between a proxy system and a service system according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of a proxy system according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a block diagram of a service system according to an embodiment of the disclosure; and
fig. 8 schematically illustrates a block diagram of a computer system suitable for implementing a proxy system or a service system, in accordance with an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides a task processing method, which is applied to a proxy system, and comprises the steps of establishing connection with a terminal device and a service system respectively, establishing long connection with the service system, obtaining identification information from the terminal device, obtaining data corresponding to the identification information from the service system, processing a task based on the data under the condition that the task corresponding to the identification information sent by the terminal device is received, generating a processing result, returning the processing result to the terminal device, updating the data, and asynchronously uploading the updated data to the service system.
Fig. 1 schematically illustrates a system architecture of a task processing method according to an embodiment of the present disclosure. It should be noted that fig. 1 illustrates only an example of an application scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a proxy system 104, a network 105, and a service system 106. The network 105 serves as a medium to provide a communication link between the proxy system 104 and the service system 106. The network 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the proxy system 104 via a network using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The proxy system 104 interacts with the service system 106 through the network 105 to receive or send messages, etc. The proxy system 104 acts as a proxy for the service system 106 and can synchronize the user data locally so that the proxy system 104 interacts business directly with the terminal devices 101, 102, 103 and asynchronously reports the results to the service system 106.
The service system 106 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the proxy system or the terminal device.
It should be understood that the number of terminal devices, proxy systems, networks and service systems in fig. 1 is merely illustrative. There may be any number of terminal devices, proxy systems, networks, and service systems, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a task processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method is applied to a proxy system, including operations S210 to S250.
In operation S210, a connection is established with the terminal device and the service system, respectively, wherein a long connection is established with the service system.
In operation S220, identification information is obtained from the terminal device.
In operation S230, data corresponding to the identification information is obtained from the service system.
In operation S240, in the case of receiving a task corresponding to the identification information transmitted from the terminal device, processing the task based on the data, generating a processing result, and returning the processing result to the terminal device and updating the data.
The updated data is asynchronously uploaded to the service system in operation S250.
According to the embodiment of the disclosure, for one service system, there may be a plurality of proxy systems for proxy thereof, and for one proxy system, services may be provided to a plurality of terminal devices.
According to the embodiment of the present disclosure, the identification information is identification information of a certain object, such as identification information of a user/tenant, identification information of an item, or the like.
The method processes tasks through the proxy system and asynchronously uploads the tasks to the service system, so that the pressure of the service system can be reduced, the response speed is improved, and meanwhile, the establishment and disconnection of a large number of connections are avoided through the long connection between the proxy system and the service system, so that the server still has higher performance and processing capacity under a high concurrency situation.
The user accesses the traditional web project, requests service in the public network through an http protocol, the communication is synchronous, the user initiates an http request, the request finally reaches a server through the public network, the server processes the request and returns response information, and the user receives the response information and then carries out the next processing. The user is in a waiting state in the process from the initiation of the request to the receipt of the response. The more pronounced the user perceived wait is when the concurrency is high. Taking a self-service internet bar as an example, if a user needs to send an http request to a server according to a traditional architecture when getting on the machine, the user can get on the machine after waiting for a successful result returned by the request, and the same is true when getting off the machine. The method of the embodiment of the disclosure can reduce the waiting time of the user and improve the user experience.
According to the embodiment of the disclosure, the proxy system establishes connection with the terminal equipment and the service system respectively, wherein long connection is established with the service system so as to improve response speed. Of course, a short connection may be established between the proxy system and the terminal device, or a long connection may be established, which is not limited by the embodiments of the present disclosure.
According to the embodiment of the disclosure, the proxy system communicates with the terminal device through a local area network connection, and the proxy system communicates with the service system through a public network connection.
For example, in a machine room of a self-service internet bar, an agent system can be set up, the agent system and the terminal device are connected through a local area network, so that a higher information transmission speed can be obtained, and the agent system and a remote service system are connected through a public network. The service processing is directly completed by the proxy system, and the response speed is obviously improved for the user.
Of course, the method of the embodiment of the disclosure is not limited to the self-service internet bar, and any other service may set a proxy system according to the method of the embodiment of the disclosure, even set a proxy system in the local area network, if necessary, so as to improve service processing efficiency.
According to an embodiment of the disclosure, when receiving a task corresponding to the identification information sent by the terminal device, processing the task based on the data, generating a processing result, and returning the processing result to the terminal device, and updating the data includes, in response to receiving the task corresponding to the identification information sent by the terminal device, checking whether the proxy system stores data corresponding to the identification information. And if the proxy system stores the data corresponding to the identification information, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data. If the agent system does not find the data corresponding to the identification information, the agent system obtains the data corresponding to the identification information from the service system, processes the task based on the data, generates a processing result, returns the processing result to the terminal equipment, and updates the data.
According to the embodiment of the disclosure, for example, when a task corresponding to the identification information is received for the first time, data corresponding to the identification information is obtained from the service system, and then when the task corresponding to the identification information is obtained again, the obtained data can be directly processed and asynchronously reported, and the data is not required to be requested again from the service system.
Operation S220 of the embodiment of the present disclosure may include, in response to receiving a task transmitted by a terminal device, obtaining identification information from the task. In operation S230, data corresponding to the identification information is requested to a service system based on the identification information obtained from the task, in operation S240, the task is processed after the data corresponding to the identification information is received, a processing result is generated, and the processing result is returned to the terminal device and the data is updated. When the task corresponding to the identification information is received again, operation S240 is repeatedly performed. Finally, in operation S250, the updated data may be asynchronously uploaded to the service system periodically or when a certain condition is satisfied.
Alternatively, the step S220 of the embodiment of the present disclosure of obtaining the identification information from the terminal device may include obtaining the identification information from the terminal device before the first obtaining of the task. In operation S230, data corresponding to the identification information is obtained from the service system. In the following operation S240, each time a task is obtained, processing is performed based on the obtained data without requiring each request. Finally, in operation S250, the updated data may be asynchronously uploaded to the service system periodically or when a certain condition is satisfied.
The service system side of the embodiment of the present disclosure will be described with reference to fig. 3.
Fig. 3 schematically illustrates a flow chart of a task processing method according to another embodiment of the present disclosure.
As shown in fig. 3, the method is applied to a service system, including operations S310 to S330.
In operation S310, a long connection is established with the proxy system.
In operation S320, if the data request including the identification information transmitted by the proxy system is received, if the data corresponding to the identification information is not occupied, the data is transmitted to the proxy system, the proxy system processes the task corresponding to the identification information based on the data, and marks that the data corresponding to the identification information is in an occupied state.
In operation S330, updated data is received from the agent system, and the occupied state of the data corresponding to the identification information is released.
According to the embodiment of the disclosure, in the service process, since the transmission of the information is performed in an asynchronous manner, in order to achieve the consistency of the data, the service server provides a synchronous interface, and the interface returns the information, for example, may include: user name, login name, password, account amount, membership level, etc., corresponding key attribute fields may be added according to a specific service.
The synchronous interface is required to be called when the first service interaction of the user is performed, member account information (counted as t 1) is queried to the proxy server, related calculation on the proxy server is based on t1, and subsequent operation of the user is calculated on the basis of t1, so that the consistency of the data of the proxy server and the data of the remote service server is ensured; of course, according to different services, in the whole operation process of the user service, the synchronous interface can be invoked at random according to actual conditions so as to ensure the consistency of data.
Still taking a self-service internet bar as an example, the first operation of self-service internet surfing of a user is 'activation', so that before activation, a proxy server needs to call a synchronous interface for inquiring member account information, the member account information is stored in a proxy server end of the internet bar, then calculation of internet surfing expense and the like of the user is calculated based on the result of the synchronous interface, and when the user finishes the operation (namely, off-machine) of the whole service, the proxy server of the internet bar asynchronously sends the calculation result to a service server.
If the method is applied to other business with login, the synchronous interface can be called when the user logs in, and the synchronous interface is determined according to specific business.
If the service system finds that the user data of the user requesting login by a certain proxy system is occupied, the request login is forbidden, the data is not sent to the proxy system, and the uploading data is not accepted.
According to the method, through occupation and unoccupied data, only one agent system can operate the data at the same time, and the consistency of the data is ensured.
According to an embodiment of the disclosure, the method further includes, if the data corresponding to the identification information is changed in a case where the data corresponding to the identification information is occupied by the proxy system, the service system transmitting notification information to the proxy system.
According to an embodiment of the disclosure, before asynchronously uploading updated data to the service system, the proxy system further includes requesting, by the proxy system, synchronization of the data from the service system in response to receiving notification information sent by the service system to indicate that the data corresponding to the identification information changes.
Still take self-service internet cafe as an example, because the user can recharge his own account anytime and anywhere, the recharging operation of the user is directly communicated with the service system and is not passed through the proxy system. When the user gets on the machine, if the balance is found not to be more, and the service system processes the recharging operation to obtain a recharging record when recharging is carried out on the account, and at the moment, the agency system does not obtain the recharging record. In order to realize data consistency, after recharging, the user account is changed, the proxy system can be immediately notified, and the proxy system can call the synchronous interface so as to realize data synchronization.
Fig. 4 schematically illustrates a timing diagram for a proxy system to establish a long connection with a service system according to an embodiment of the present disclosure.
According to the embodiment of the disclosure, the proxy system comprises a proxy server and a front gateway server, the service system comprises a back gateway server and a service server, the proxy system establishes long connection with the service system, the front gateway server sends a connection request to the back gateway server and receives proxy credentials returned by the back gateway server, the front gateway server sends the proxy credentials to the proxy server, and the establishment of the long connection between the proxy system and the service system is completed under the condition that the proxy server verifies that the proxy credentials are successful.
According to an embodiment of the disclosure, the service system and the proxy system establish a long connection, which includes that the back-end gateway server receives a connection request sent by the proxy system, and the service server sends a proxy credential to the proxy system through the back-end gateway server when the service server verifies that the connection request is successful, so as to complete the establishment of the long connection with the proxy system.
According to the embodiment of the disclosure, the pre-gateway server can be deployed in a machine room where the proxy server is located and is responsible for asynchronous communication with the proxy server through a TCP long connection. Proprietary protocols and encryption modes can be adopted between the pre-gateway server and the proxy server. Meanwhile, the front gateway server is responsible for asynchronous communication with a back-end gateway server in a core service room through TCP long connection, and a private protocol and an encryption mode can be adopted between the front gateway server and the back-end gateway server. The front gateway server is responsible for maintaining TCP connection, converting protocol and encrypting and decrypting data at two sides between the agent server and the back gateway server.
According to the embodiment of the disclosure, the back-end gateway server can be deployed in a machine room where the service server is located, and is in communication with the front-end gateway server through TCP long connection, and is responsible for unpacking and packaging, encrypting and decrypting, encoding, synchronous and asynchronous processing and the like of communication information. The back-end gateway server and the business service can communicate through distributed calling, for example, an RPC service framework can be adopted, and the back-end gateway server provides RPC service for the business server to call. The service server also provides RPC service, and the back-end gateway server calls the RPC service provided by the service server to send a request. In this way, communication between the back-end gateway server and the traffic server is achieved through the inter-call of the RPC service.
As shown in fig. 4, when the front-end gateway server starts, a long connection, such as a TCP long connection, is established with the back-end gateway server, where the front-end gateway server serves as a client of the back-end gateway server, and the back-end gateway server serves as a server of the front-end gateway server. At this point, the pre-gateway server sends the encrypted credentials to the backend gateway server.
The back-end gateway server analyzes the transmitted information through decoding, decryption and the like, and transmits the trust credentials to the service server in a distributed calling mode.
After passing the verification of the trust credentials, the service server returns the proxy credentials of the front gateway server logging in the proxy server; if the verification is not passed, an error message is returned.
The back-end gateway server encodes and encrypts the information such as the proxy certificate and the like, and then sends the information to the front-end gateway server through long connection, so that TCP connection between the front-end gateway server and the back-end gateway server is successfully established, and a heartbeat and disconnection reconnection mechanism is maintained.
The pre-gateway server again establishes a long connection as a client and proxy server and sends the received proxy credentials. After the proxy server passes the verification, the TCP connection between the pre-gateway server and the proxy server is completed, and a heartbeat and disconnection reconnection mechanism is maintained.
By the above operation, a connection channel is established between the proxy server and the service server, and subsequent information transmission is based on the long connection established above. Information transfer between system architectures of embodiments of the present disclosure is described below in conjunction with fig. 5.
Fig. 5 schematically illustrates a schematic diagram of transferring data between a proxy system and a service system according to an embodiment of the present disclosure.
1. Proxy server sends data to service server
As shown in fig. 5, after the proxy server records and calculates the operation of the user, the proxy server sends the corresponding information to the service server through the following steps:
the proxy server sends the data to the front gateway server through TCP connection;
the front gateway server transmits data to the back gateway server through TCP connection through protocol conversion and encryption and decryption operation;
the back-end gateway server calls the distributed calling service of the service server to send the data to the service server. That is, the service system includes a back-end gateway server and a service server, and the back-end gateway server communicates with the service server through a distributed call service.
The service server receives the data, generates a corresponding task warehouse (then calls other threads to run the corresponding tasks) and immediately returns a successful receiving response.
2. Service server sends data to proxy server
The service server assembles the data into corresponding request parameters, and then invokes the distributed invoking service of the back-end gateway server to send the data to the back-end gateway server, wherein the service server invokes the distributed invoking service of a specific back-end gateway server according to the mapping relation between the distributed invoking service of the back-end gateway server and the TCP connection;
the back-end gateway server returns the data to the front-end gateway server through TCP connection;
the pre-gateway server returns the data to the proxy server through protocol conversion and encryption and decryption.
According to the embodiment of the disclosure, the distributed calling services of the back-end gateway servers are distinguished by using packets, each back-end gateway server is allocated with a unique packet, and each business server is configured with a call to the distributed calling service of all the back-end gateway servers, and the business servers call the distributed calling services on different back-end gateway servers according to different packets. That is, after the long connection is established with the proxy system, the method further includes recording identification information of a back-end gateway server connected with the proxy system, and the sending the data to the proxy system includes the service server sending the data to the back-end gateway server corresponding to the identification information, and the back-end gateway server sending the data to the proxy system.
For example, in the architecture shown in fig. 5, 4 back-end gateway servers are deployed, and the back-end gateway servers 1, 2, 3, and 4 correspond to the distributed call packets jsf, jsf2, jsf3, and jsf4. Two proxy servers, each proxy server has a unique proxy server identification for distinguishing between different proxy servers, e.g. proxy server 1 is identified as agent1, and proxy server 2 is identified as agent2.
Each time the proxy server sends a request message to the service server, the unique proxy server identifier is carried on the request message, the proxy server 1 establishes a long TCP connection with the back-end gateway server 1, the proxy server 2 establishes a long TCP connection with the back-end gateway server 4, when the connection is established, the unique proxy server identifier is carried on the proxy server, a table (table 2) of the service records the relevant attribute of each proxy server, and when the connection is established, the relationship between the proxy server identifier and the distributed call packet is recorded, namely, the proxy server and which back-end gateway server establish the long TCP connection, for example, the corresponding relationship after the TCP connection in the embodiment is established is agent1: jsf1, agent2: jsf4.
Meanwhile, each piece of data in the database is provided with a proxy server identifier (refer to table 1), and the data is the data of which proxy server, namely the data is logically partitioned according to the proxy server identifier, and can be physically partitioned according to specific services.
After processing different data, the service server can find out the corresponding distributed calling packet according to the proxy server identification, so as to call the distributed calling service of the correct back-end gateway server.
For example, the proxy server of a certain piece of data is identified as agent1, by looking up table 2, it can be known that the service server needs to call the distributed call service of which the distributed call packet is jsf1, and the service server sends the processing result to the back-end gateway server 1 by calling the distributed call service of which the packet is jsf1, and the back-end gateway server 1 and the proxy server 1 maintain TCP connection, so that the back-end gateway server 1 can send the processing result information to the proxy server 1 for processing. Through the above operations, the service server accurately transmits information to the proxy server 1 server instead of other servers.
In this way, although the TCP long connection of one proxy server is only connected to one back-end gateway server, the information of one proxy server can be distributed to a plurality of servers of the back-end for distributed processing through the mapping relation between the distributed calling service of the back-end gateway server and the TCP long connection, and the plurality of servers of the back-end can accurately send response information to the back-end gateway server with the TCP connection after the processing is finished, so that the service has the capability of distributed processing.
The service request and response of the embodiment of the disclosure adopt an asynchronous mode, and the request or response information is lost due to the unreliability of the network or other abnormal problems, and the embodiment of the disclosure can be solved by adopting the following two mechanisms:
(1) For the case of data loss in which the service server sends a request or response message to the back-end gateway server
If a service server calls a distributed call service to send a request or response message to a back-end gateway server, a network problem or other problems (such as database or server problems) occur in the process of sending the message, and the request or response message is lost.
Before the service server calls the distributed call service of the back-end gateway server, a piece of task data of a corresponding type is generated in the task table, such as 'inquiring and loading tasks', 'inquiring and unloading tasks' in the self-service internet bar project. Each task has a task state, which may include, for example, "wait for process," "lock," "complete," etc. The scheduling system will invoke the data run in the "wait for process" state. The task is initially in a 'waiting processing' state, corresponding scheduling logic is in a 'locking' state in the running process, and the scheduling logic is in a 'finishing' state after running.
If the information is not sent out due to the occurrence of abnormality in the process of scheduling and initiating the distributed call request to the back-end gateway server by the scheduling system, the data state in the task table is still waiting for processing, and the scheduling system can initiate the call again in the next scheduling until the information is successfully sent or the alarm information is sent out beyond a certain calling number.
(2) For the case that the back-end gateway server sends information to the proxy server side and the back-end gateway server sends information to the service server side
To address the loss of data in this case, the method of the embodiments of the present disclosure may design two sets To-B-map and To-a-map as caches for data To be sent in each back-end gateway server. The To-B-map is used To store a key-value (key-value pair) set of data To be transmitted To the service server side. The To-a-map is used To store a key-value set of data To be transmitted To the proxy server side. Wherein, the key is a unique data identifier, for example, the key can be used for identifying the correspondence between the request and the response, if the unique request message identifier is 1, the unique response message identifier is also 1, and the unique request message identifiers of different requests are not identical; value is specific information to be transmitted.
The back-end gateway server adds data To the To-B-map when the back-end gateway server transmits the data To the service server side every time, and the distributed calling service of the service server is called To transmit the data, and the data is deleted from the To-B-map when the transmission is successful; if the transmission is abnormal or wrong, the back-end gateway server resends the data according to a specific strategy (for example, every 3 seconds, which is adjustable according to specific conditions) until the data is successfully transmitted or alarm information is sent out beyond a certain calling number.
Similarly, the back-end gateway server adds data To the To-A-map every time when the back-end gateway server needs To send the data To the proxy server side, sends the data To the front-end gateway server through a TCP connection, and deletes the data from the To-A-map if the corresponding response is received at a certain time (for example, 10s, which is adjustable according To the specific situation); if the corresponding response data is not received or the transmission is abnormal, the back-end gateway server can resend the data according to a specific strategy (for example, every 3 seconds, and can be adjusted according to specific conditions) until the data is successfully transmitted or alarm information is sent out after a certain calling number.
Fig. 6 schematically illustrates a block diagram of a proxy system 600 according to an embodiment of the disclosure.
As shown in fig. 6, the proxy system 600 includes a first connection module 610, a first acquisition module 620, a second acquisition module 630, a task processing module 640, and an upload module 650.
The first connection module 610, for example, performs operation S210 described above with reference to fig. 2, for establishing a connection with a terminal device and a service system, respectively, with which a long connection is established.
The first obtaining module 620, for example, performs operation S220 described above with reference to fig. 2, for obtaining the identification information from the terminal device.
The second obtaining module 630, for example, performs operation S230 described above with reference to fig. 2, for obtaining data corresponding to the identification information from the service system.
The task processing module 640, for example, performs operation S240 described above with reference to fig. 2, for processing the task based on the data in the case of receiving the task corresponding to the identification information transmitted by the terminal device, generating a processing result, and returning the processing result to the terminal device and updating the data.
The upload module 650, for example, performs operation S250 described above with reference to fig. 2, for asynchronously uploading updated data to the service system.
According to the embodiment of the disclosure, the proxy system communicates with the terminal device through a local area network connection, and the proxy system communicates with the service system through a public network connection.
According to an embodiment of the disclosure, the proxy system includes a proxy server and a front-end gateway server, the service system includes a back-end gateway server and a service server, and the proxy system establishes a long connection with the service system includes sending a connection request to the back-end gateway server through the front-end gateway server. And receiving the proxy certificate returned by the back-end gateway server. The pre-gateway server sends the proxy credential to the proxy server. And under the condition that the proxy server verifies the proxy certificate successfully, completing the establishment of the long connection between the proxy system and the service system.
According to an embodiment of the disclosure, the proxy system further includes a synchronization module, configured to request the service system to synchronize the data in response to receiving notification information sent by the service system and indicating that the data corresponding to the identification information changes.
According to an embodiment of the disclosure, the task processing module is configured to check, in response to receiving a task corresponding to the identification information sent by the terminal device, whether the proxy system stores data corresponding to the identification information. And if the proxy system stores the data corresponding to the identification information, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data. If the agent system does not find the data corresponding to the identification information, the agent system obtains the data corresponding to the identification information from the service system, processes the task based on the data, generates a processing result, returns the processing result to the terminal equipment, and updates the data.
Fig. 7 schematically illustrates a block diagram of a service system 700 according to an embodiment of the disclosure.
As shown in fig. 7, the service system 700 includes a second connection module 710, a data providing module 720, and a data receiving module 730.
The second connection module 710, for example, performs operation S310 described above with reference to fig. 3, for establishing a long connection with the proxy system.
The data providing module 720, for example, performs operation S320 described above with reference to fig. 3, and is configured to, when receiving a data request including identification information sent by the proxy system, send the data corresponding to the identification information to the proxy system if the data is unoccupied, enable the proxy system to process a task corresponding to the identification information based on the data, and mark that the data corresponding to the identification information is in an occupied state.
The data receiving module 730, for example, performs operation S330 described above with reference to fig. 3, is configured to receive updated data from the proxy system and remove the occupied state of the data corresponding to the identification information.
According to the embodiment of the disclosure, the service system comprises a back-end gateway server and a service server, wherein the back-end gateway server communicates with the service server through a distributed calling service.
According to an embodiment of the disclosure, the establishing a long connection with the proxy system includes the backend gateway server receiving a connection request sent by the proxy system. And under the condition that the service server verifies that the connection request is successful, the service server sends a proxy certificate to the proxy system through the back-end gateway server so as to complete the establishment of long connection with the proxy system.
According to an embodiment of the disclosure, the service system further includes a recording module, configured to record identification information of a back-end gateway server connected to the proxy system, and the sending the data to the proxy system includes the service server sending the data to the back-end gateway server corresponding to the identification information. And the back-end gateway server sends the data to the proxy system.
According to an embodiment of the disclosure, the service system further includes a notification module, configured to send notification information to the proxy system if the data corresponding to the identification information changes when the data corresponding to the identification information is occupied by the proxy system.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the first connection module 610, the first obtaining module 620, the second obtaining module 630, the task processing module 640, the uploading module 650, the synchronizing module, the second connection module 710, the data providing module 720, the data receiving module 730, the recording module, and the notifying module may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first connection module 610, the first obtaining module 620, the second obtaining module 630, the task processing module 640, the uploading module 650, the synchronization module, the second connection module 710, the data providing module 720, the data receiving module 730, the recording module, and the notification module may be implemented at least partially as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or any other reasonable manner of integrating or packaging the circuitry, or any other hardware or firmware, or any one of or any suitable combination of the three. Alternatively, at least one of the first connection module 610, the first obtaining module 620, the second obtaining module 630, the task processing module 640, the uploading module 650, the synchronizing module, the second connection module 710, the data providing module 720, the data receiving module 730, the recording module, and the notifying module may be at least partially implemented as a computer program module, which may perform corresponding functions when being executed.
Fig. 8 schematically illustrates a block diagram of a computer system 800 suitable for implementing a proxy system or a service system, in accordance with an embodiment of the present disclosure. The computer system illustrated in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 8, a computer system 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 803, various programs and data required for the operation of the system 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 806. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to embodiments of the present disclosure, the system 800 may also include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 806. The system 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 802 and/or RAM 803 and/or one or more memories other than ROM 802 and RAM 803 described above.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (18)

1. A task processing method applied to a proxy system, the method comprising:
respectively establishing connection with terminal equipment and a service system, wherein long connection is established with the service system;
obtaining identification information from the terminal device;
obtaining data corresponding to the identification information from the service system, wherein the data corresponding to the identification information is in an occupied state, and the occupied state characterizes that the data corresponding to the identification information cannot be operated by other agent systems except the agent system;
processing the task based on the data under the condition that the task corresponding to the identification information sent by the terminal equipment is received, generating a processing result, returning the processing result to the terminal equipment, and updating the data;
Asynchronously uploading the updated data to the service system;
wherein prior to asynchronously uploading the updated data to the service system, the method further comprises:
and responding to receiving notification information sent by the service system and used for indicating that the data corresponding to the identification information changes, and requesting the service system to synchronize the data.
2. The method of claim 1, wherein the proxy system communicates with the terminal device over a local area network connection and the proxy system communicates with the service system over a public network connection.
3. The method of claim 1, wherein the proxy system comprises a proxy server and a pre-gateway server, the service system comprises a back-end gateway server and a traffic server, and the proxy system establishing a long connection with the service system comprises:
sending a connection request to the back-end gateway server through the front-end gateway server;
receiving a proxy certificate returned by the back-end gateway server;
the pre-gateway server sends the proxy certificate to the proxy server;
and under the condition that the proxy server verifies the proxy certificate successfully, completing the establishment of the long connection between the proxy system and the service system.
4. The method of claim 1, wherein, in a case where a task corresponding to the identification information transmitted by the terminal device is received, processing the task based on the data, generating a processing result, and returning the processing result to the terminal device, and updating the data includes:
in response to receiving a task corresponding to the identification information transmitted by the terminal device, checking whether the proxy system stores data corresponding to the identification information,
if the agent system stores the data corresponding to the identification information, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data; and/or
If the agent system does not find the data corresponding to the identification information, the agent system obtains the data corresponding to the identification information from the service system, processes the task based on the data, generates a processing result, returns the processing result to the terminal equipment, and updates the data.
5. A task processing method applied to a service system, the method comprising:
Establishing a long connection with the proxy system;
if the data corresponding to the identification information is unoccupied, the data is sent to the proxy system under the condition that the data request containing the identification information sent by the proxy system is received, so that the proxy system processes the task corresponding to the identification information based on the data and marks that the data corresponding to the identification information is in an occupied state, and the occupied state indicates that the data corresponding to the identification information cannot be operated by other proxy systems except the proxy system;
receiving updated data from the proxy system and releasing the occupied state of the data corresponding to the identification information;
if the data corresponding to the identification information is changed under the condition that the data corresponding to the identification information is occupied by the proxy system, sending notification information to the proxy system;
and the proxy system is suitable for requesting the service system to synchronize the data according to the notification information.
6. The method of claim 5, wherein the service system comprises a back-end gateway server and a traffic server, the back-end gateway server in communication with the traffic server through a distributed invocation service.
7. The method of claim 6, wherein the establishing a long connection with a proxy system comprises:
the back-end gateway server receives a connection request sent by the proxy system;
and under the condition that the service server verifies that the connection request is successful, the service server sends a proxy certificate to the proxy system through the back-end gateway server so as to complete the establishment of long connection with the proxy system.
8. The method of claim 6, wherein after the establishing a long connection with a proxy system, the method further comprises:
recording the identification information of a back-end gateway server connected with the proxy system,
the sending the data to the proxy system includes:
the service server sends the data to a back-end gateway server corresponding to the identification information;
and the back-end gateway server sends the data to the proxy system.
9. A proxy system, comprising:
the first connection module is used for respectively establishing long connection with the terminal equipment and the service system;
the first obtaining module is used for obtaining the identification information from the terminal equipment;
a second obtaining module, configured to obtain data corresponding to the identification information from the service system, where the data corresponding to the identification information is in an occupied state, and the occupied state characterizes that the data corresponding to the identification information is prohibited from being operated by other proxy systems except the proxy system;
The task processing module is used for processing the task based on the data under the condition that the task corresponding to the identification information sent by the terminal equipment is received, generating a processing result, returning the processing result to the terminal equipment and updating the data;
the uploading module is used for asynchronously uploading the updated data to the service system;
and the synchronization module is used for responding to the received notification information which is sent by the service system and used for indicating that the data corresponding to the identification information changes, and requesting the service system to synchronize the data.
10. The proxy system of claim 9, wherein the proxy system communicates with the terminal device over a local area network connection and the proxy system communicates with the service system over a public network connection.
11. The proxy system of claim 9, wherein the proxy system comprises a proxy server and a pre-gateway server, the service system comprises a back-end gateway server and a traffic server, the proxy system establishing a long connection with the service system comprises:
sending a connection request to the back-end gateway server through the front-end gateway server;
Receiving a proxy certificate returned by the back-end gateway server;
the pre-gateway server sends the proxy certificate to the proxy server;
and under the condition that the proxy server verifies the proxy certificate successfully, completing the establishment of the long connection between the proxy system and the service system.
12. The proxy system of claim 9, wherein the task processing module is to:
in response to receiving a task corresponding to the identification information transmitted by the terminal device, checking whether the proxy system stores data corresponding to the identification information,
if the agent system stores the data corresponding to the identification information, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data; and/or
If the agent system does not find the data corresponding to the identification information, the agent system obtains the data corresponding to the identification information from the service system, processes the task based on the data, generates a processing result, returns the processing result to the terminal equipment, and updates the data.
13. A service system, comprising:
the second connection module is used for establishing long connection with the proxy system;
the data providing module is used for sending the data to the proxy system if the data corresponding to the identification information is unoccupied under the condition that the data request containing the identification information sent by the proxy system is received, enabling the proxy system to process tasks corresponding to the identification information based on the data, and marking the data corresponding to the identification information to be in an occupied state, wherein the occupied state represents that the data corresponding to the identification information is forbidden to be operated by other proxy systems except the proxy system;
the data receiving module is used for receiving updated data from the proxy system and relieving the occupied state of the data corresponding to the identification information;
the notification module is used for sending notification information to the proxy system if the data corresponding to the identification information changes under the condition that the data corresponding to the identification information is occupied by the proxy system;
and the proxy system is suitable for requesting the service system to synchronize the data according to the notification information.
14. The service system of claim 13, wherein the service system comprises a back-end gateway server and a traffic server, the back-end gateway server in communication with the traffic server through a distributed invocation service.
15. The service system of claim 14, wherein the establishing a long connection with a proxy system comprises:
the back-end gateway server receives a connection request sent by the proxy system;
and under the condition that the service server verifies that the connection request is successful, the service server sends a proxy certificate to the proxy system through the back-end gateway server so as to complete the establishment of long connection with the proxy system.
16. The service system of claim 14, further comprising:
a recording module for recording the identification information of the back-end gateway server connected with the proxy system,
the sending the data to the proxy system includes:
the service server sends the data to a back-end gateway server corresponding to the identification information;
and the back-end gateway server sends the data to the proxy system.
17. An electronic device, comprising:
One or more processors;
a memory for storing one or more computer programs,
wherein the one or more computer programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 8.
18. A computer readable medium having stored thereon executable instructions which, when executed by a processor, cause the processor to implement the method of any of claims 1 to 8.
CN201910072788.XA 2019-01-25 2019-01-25 Task processing method, proxy system, service system and electronic equipment Active CN111490997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910072788.XA CN111490997B (en) 2019-01-25 2019-01-25 Task processing method, proxy system, service system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910072788.XA CN111490997B (en) 2019-01-25 2019-01-25 Task processing method, proxy system, service system and electronic equipment

Publications (2)

Publication Number Publication Date
CN111490997A CN111490997A (en) 2020-08-04
CN111490997B true CN111490997B (en) 2023-05-12

Family

ID=71796153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910072788.XA Active CN111490997B (en) 2019-01-25 2019-01-25 Task processing method, proxy system, service system and electronic equipment

Country Status (1)

Country Link
CN (1) CN111490997B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115865886B (en) * 2022-11-28 2023-07-18 灵犀科技有限公司 HTTP-based cross-network data interaction method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799636A (en) * 2012-06-26 2012-11-28 北京奇虎科技有限公司 Method and system for displaying webpage by mobile terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001125823A (en) * 1999-10-29 2001-05-11 Fujitsu Ltd Push service system and push service processing method
CN100413248C (en) * 2005-03-31 2008-08-20 杭州华三通信技术有限公司 Improved method and system for carrying out charging based on flow
CN102055730B (en) * 2009-11-02 2013-09-11 华为终端有限公司 Cloud processing system, cloud processing method and cloud computing agent device
CN107562842A (en) * 2017-08-25 2018-01-09 北京市天元网络技术股份有限公司 The guard method of resource data and equipment
CN109257392B (en) * 2018-11-30 2021-09-17 广州市百果园信息技术有限公司 Command processing method, device, server and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799636A (en) * 2012-06-26 2012-11-28 北京奇虎科技有限公司 Method and system for displaying webpage by mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐寅等.Internet防火墙透明代理技术的研究与实现.计算机科学.(第04期),全文. *

Also Published As

Publication number Publication date
CN111490997A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
US10965772B2 (en) Interface invocation method and apparatus for hybrid cloud
WO2020057163A1 (en) Mec platform deployment method and device
CN110278187B (en) Multi-terminal single sign-on method, system, synchronous server and medium
US8955084B2 (en) Timestamp-based token revocation
US8856906B2 (en) Authentication processing method and system
US8769100B2 (en) Method and apparatus for cluster data processing
CN107528891B (en) Websocket-based automatic clustering method and system
CN104754009A (en) Service acquisition and invocation method, device, client-side and server
CN112866385B (en) Interface calling method and device, electronic equipment and storage medium
CN111478974A (en) Network connection method and device, electronic equipment and readable storage medium
CN111651747A (en) Login bill synchronization system and method and related equipment
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN111490997B (en) Task processing method, proxy system, service system and electronic equipment
CN114338682A (en) Flow identity mark transmission method and device, electronic equipment and storage medium
CN113765774B (en) Method, device, electronic equipment and medium for synchronizing messages in real time
WO2023241331A1 (en) Internet of things system, authentication and communication method therefor, and related device
CN112653716B (en) Service binding method and device
WO2015027931A1 (en) Method and system for realizing cross-domain remote command
CN111917810B (en) Cloud communication method and device, user equipment and network equipment
CN111787048A (en) Terminal device connection method, scheduling server and Internet of things system
WO2019201111A1 (en) Information processing method, apparatus and device, and computer-readable storage medium
CN114257632B (en) Method and device for reconnecting broken wire, electronic equipment and readable storage medium
CN110191203A (en) Realize the method and electronic equipment of server dynamic access
CN112929453A (en) Method and device for sharing session data
CN113542324A (en) Message pushing method and device

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
GR01 Patent grant
GR01 Patent grant