[go: up one dir, main page]

CN111490997A - Task processing method, agent system, service system and electronic equipment - Google Patents

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

Info

Publication number
CN111490997A
CN111490997A CN201910072788.XA CN201910072788A CN111490997A CN 111490997 A CN111490997 A CN 111490997A CN 201910072788 A CN201910072788 A CN 201910072788A CN 111490997 A CN111490997 A CN 111490997A
Authority
CN
China
Prior art keywords
data
identification information
proxy
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.)
Granted
Application number
CN201910072788.XA
Other languages
Chinese (zh)
Other versions
CN111490997B (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 task processing method comprises the steps of respectively establishing connection with a terminal device and a service system, 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 the task based on the data under the condition of receiving the task corresponding to the identification information sent by the terminal device, 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, agent 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 from a front-end page to a front-end server, then the front-end server calls a service processing service of a back-end server, the back-end server processes the service and operates a database and then returns a result to the front-end server, and the front-end server correspondingly displays the result. The user requests the front-end servers through http requests, if the request amount is large and the request amount is high, cluster deployment is carried out on the services, and equipment or software such as load balancing is added in the middle, so that the http requests are distributed to all the front-end servers in a balanced mode.
The user requests 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 users are in a waiting state in the process from the initiation of the request to the receipt of the response, and the waiting feeling perceived by the users is more obvious when the concurrency is large; on the other hand, when the user has a large request amount, a large amount of connections are established and disconnected, the connection maintenance causes large consumption of server resources, 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 for 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, the method including establishing connections with a terminal device and a service system, respectively, wherein 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 based on the data, 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, in a case where the task corresponding to the identification information sent by the terminal device is received.
According to the embodiment of the disclosure, the agent system communicates with the terminal device through a local area network connection, and the agent system communicates with the service system through a public network connection.
According to the embodiment of the present disclosure, the proxy system includes a proxy server and a front gateway server, the service system includes a backend gateway server and a service server, and the proxy system and the service system establish a long connection includes sending a connection request to the backend gateway server through the front gateway server, receiving a proxy credential returned by the backend gateway server, the front gateway server sending the proxy credential to the proxy server, and completing establishment of the long connection between the proxy system and the service system when the proxy server verifies that the proxy credential is successful.
According to the embodiment of the disclosure, before asynchronously uploading the updated data to the service system, the method further includes, in response to receiving notification information sent by the service system and indicating that the data corresponding to the identification information is changed, requesting the service system to synchronize the data.
According to the embodiment of the present disclosure, in a case where a task corresponding to the identification information and 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 checking whether the proxy system stores data corresponding to the identification information in response to receiving the task corresponding to the identification information and transmitted by the terminal device. And if the proxy system stores 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 if the agent system does not find the data corresponding to the identification information, acquiring the data corresponding to the identification information from the service system, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data.
Another aspect of the present disclosure provides a method for processing a task, which is applied to a service system, the method including establishing a long connection with a proxy system, transmitting data corresponding to identification information to the proxy system if the data corresponding to the identification information is not occupied when receiving a data request including the identification information transmitted by the proxy system, causing 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, 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 backend gateway server and a service server, wherein the backend gateway server communicates with the service server through a distributed calling service.
According to the embodiment of the present disclosure, the establishing of the long connection with the proxy system includes that the backend 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 backend gateway server under the condition that the service server verifies that the connection request is successful, so as to complete the establishing of the long connection with the proxy system.
According to the embodiment of the present disclosure, after the long connection is established with the proxy system, the method further includes recording identification information of a backend gateway server connected with the proxy system, and the sending of the data to the proxy system includes the service server sending the data to the backend gateway server corresponding to the identification information, and the backend gateway server sending the data to the proxy system.
According to the embodiment of the present disclosure, the method further includes, when the data corresponding to the identification information is occupied by a proxy system, sending notification information to the proxy system if the data corresponding to the identification information changes.
Another aspect of the present disclosure provides an agent system including a first connection module, a first obtaining module, a second obtaining module, a task processing module, and an uploading module. 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. A first obtaining module, configured to obtain identification information from the terminal device. A second obtaining module to obtain 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, generating a processing result, returning the processing result to the terminal equipment and updating the data under the condition of receiving the task corresponding to the identification information and sent by the terminal equipment. And the uploading module is used for asynchronously uploading the updated data to the service system.
According to the embodiment of the disclosure, the agent system communicates with the terminal device through a local area network connection, and the agent 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-end gateway server and a service server, and the proxy system establishes long connection with the service system comprises sending a connection request to the back-end gateway server through the front gateway server. And receiving the proxy credential returned by the back-end gateway server. The front gateway server sends the proxy credential to the proxy server. And under the condition that the proxy server successfully verifies the proxy credential, completing the establishment of the long connection between the proxy system and the service system.
According to the embodiment of the present disclosure, the agent 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 the embodiment of the disclosure, the task processing module is configured to check whether the agent system stores data corresponding to the identification information in response to receiving the task corresponding to the identification information sent by the terminal device. And if the proxy system stores 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 if the agent system does not find the data corresponding to the identification information, acquiring the data corresponding to the identification information from the service system, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating 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 agent system if the data corresponding to the identification information is not occupied under the condition of receiving a data request containing the identification information and sent by the agent system, so that the agent 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 agent system and removing the occupation state of the data corresponding to the identification information.
According to the embodiment of the disclosure, the service system comprises a backend gateway server and a service server, wherein the backend gateway server communicates with the service server through a distributed calling service.
According to the embodiment of the present disclosure, the establishing of the 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 an agent credential to the agent system through the backend gateway server so as to complete the establishment of the long connection with the agent system.
According to the embodiment of the present disclosure, the service system further includes a recording module, configured to record identification information of a backend gateway server connected to the proxy system, where sending the data to the proxy system includes the service server sending the data to the backend gateway server corresponding to the identification information. And the back-end gateway server sends the data to the proxy system.
According to the embodiment of the present disclosure, the service system further includes a notification module, configured to send notification information to the proxy system if 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 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 for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
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 high performance and processing capacity under a high concurrency scene.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically shows a system architecture of a task processing method according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow chart of a task processing method according to an embodiment of the present disclosure;
FIG. 3 schematically shows 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 establishing a long connection with a serving system according to an embodiment of the 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 disclosure;
FIG. 6 schematically illustrates a block diagram of a brokering system according to an embodiment of the present disclosure;
FIG. 7 schematically shows 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 brokering system or 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 illustrative only 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 disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not 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 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 is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have 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 convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have 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 applied to a proxy system, wherein the method comprises the steps of respectively establishing connection with a terminal device and a service system, 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 of receiving the task corresponding to the identification information sent by the terminal device, 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 shows a system architecture of a task processing method according to an embodiment of the present disclosure. It should be noted that fig. 1 is 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 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, the 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 for providing a communication link between the proxy system 104 and the service system 106. Network 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the broker system 104 over the network to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The broker system 104 interacts with the service system 106 through the network 105 to receive or send messages, etc. The agent system 104, as an agent of the service system 106, may synchronize the user data to the local, so that the agent system 104 directly performs business interaction with the terminal devices 101, 102, and 103, and asynchronously reports the result to the service system 106.
The service system 106 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the agent 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 shows 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, and includes operations S210 to S250.
In operation S210, connections are established with a terminal device and a 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 the task corresponding to the identification information sent by the terminal device, the task is processed based on the data, a processing result is generated, and the processing result is returned to the terminal device and the data is updated.
In operation S250, the updated data is asynchronously uploaded to the service system.
According to the embodiment of the present disclosure, for one service system, there may be a plurality of proxy systems that proxy it, and for one proxy system, a plurality of terminal devices may be provided with services.
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, and 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 high performance and processing capacity under a high concurrency scene.
The method comprises the steps that a user accesses a traditional web project, service is requested through an http protocol in a public network, communication is in a synchronous mode, the user initiates an http request, the request finally reaches a server through the public network, the server finishes processing 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 from the initiation of the request to the receipt of the response. The perceived wait feeling of the user becomes more obvious when the amount of concurrency is large. Taking a self-service internet bar as an example, if a user is on the computer according to a traditional architecture, the user needs to send an http request to a server by a terminal device, and the user can be on the computer only after the request returns a successful result, and the same is true when the user is off the computer. 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 connections with the terminal device and the service system respectively, wherein a long connection is established with the service system 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 also be established, which is not limited in this disclosure.
According to the embodiment of the disclosure, the agent system communicates with the terminal device through a local area network connection, and the agent 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 may be set up, the agent system may be connected to a terminal device through a local area network, and a higher information transmission speed may be obtained, and the agent system may be connected to a remote service system 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 present disclosure is not limited to the self-service internet bar, and any other service may set the proxy system according to the method of the embodiment of the present disclosure if necessary, or even set the proxy system in the local area network, so as to improve the service processing efficiency.
According to the embodiment of the present disclosure, in a case where a task corresponding to the identification information and 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 checking whether the proxy system stores data corresponding to the identification information in response to receiving the task corresponding to the identification information and transmitted by the terminal device. And if the proxy system stores 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 if the agent system does not find the data corresponding to the identification information, acquiring the data corresponding to the identification information from the service system, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data.
According to the embodiment of the present disclosure, for example, when the task corresponding to the identification information is received for the first time, the data corresponding to the identification information may be obtained from the service system, and then when the task corresponding to the identification information is obtained again, the data may be directly processed based on the obtained data and the result may be asynchronously reported without requesting the data from the service system again.
Operation S220 of the embodiment of the present disclosure to obtain the identification information from the terminal device may include, in response to receiving a task transmitted by the terminal device, obtaining the identification information from the task. In operation S230, data corresponding to the identification information is requested from the service system based on the identification information obtained from the task, and in operation S240, after receiving the data corresponding to the identification information, the task is processed, 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, at operation S250, the updated data may be asynchronously uploaded to the service system periodically or when certain conditions are met.
Alternatively, the operation 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 obtaining the task for the first time. 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, at operation S250, the updated data may be asynchronously uploaded to the service system periodically or when certain conditions are met.
The service system side of the embodiment of the present disclosure is explained below with reference to fig. 3.
Fig. 3 schematically shows a flowchart 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, and includes operations S310 to S330.
In operation S310, a long connection is established with the proxy system.
In operation S320, when a data request including identification information sent by the proxy system is received, if data corresponding to the identification information is not occupied, the data is sent to the proxy system, so that the proxy system processes a 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 present disclosure, in the service process, since the transmission of information is performed in an asynchronous manner, in order to achieve data consistency, the service server provides a synchronous interface, and the interface returns information, which may include: user name, login name, password, account amount, membership grade and the like, and corresponding key attribute fields can be added according to specific services.
The synchronous interface is required to be called when the user interacts with the service for the first time, the member account information (counted as t1) is inquired to the proxy server, the relevant calculation on the proxy server is based on t1, and the 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, the synchronization interface may be invoked sporadically according to actual situations in the operation process of the whole service of the user, so as to ensure the consistency of data.
Still taking the self-service internet bar as an example, the first operation of the user self-service internet surfing is 'activation', so that before activation, the proxy server calls a 'inquiry member account information' synchronous interface to store the member account information to the proxy server end of the internet bar, then the calculation of the internet surfing cost and the like of the user is calculated by taking the result of the synchronous interface as a reference, and when the user finishes the operation of the whole service (namely, the user leaves the internet), the proxy server of the internet bar asynchronously sends the calculation result to the service server.
If the method is applied to other logged-on services, the synchronous interface can be called when a user logs in, and the method is determined according to specific services.
If the service system finds that the user data of the user requested to log in by a certain agent system is occupied, the request is forbidden to log in, data is not sent to the agent system, and the uploaded data is not accepted.
The method ensures that only one agent system can operate the data at the same time through the occupation and the occupation removal of the data, thereby ensuring the consistency of the data.
According to the embodiment of the present disclosure, the method further includes, when the data corresponding to the identification information is occupied by a proxy system, if the data corresponding to the identification information changes, the service system sending notification information to the proxy system.
According to the embodiment of the disclosure, before the proxy system asynchronously uploads the updated data to the service system, the method further includes, in response to receiving notification information sent by the service system and indicating that the data corresponding to the identification information changes, the proxy system requests the service system to synchronize the data.
Still take the self-service internet bar as an example, because the user can recharge his own account at any time and any place, the recharging operation of the user is directly communicated with the service system and is not completed through the agent system. When the user is on the computer, if the balance is not much, the service system processes the recharging operation to obtain a recharging record, and at the moment, the agent system does not obtain the recharging record. In order to realize data consistency, after recharging, the user account changes, and then the agent system can be immediately notified, so that the agent system calls the synchronization interface to realize data synchronization.
Fig. 4 schematically illustrates a timing diagram for a proxy system establishing a long connection with a serving system according to an embodiment of the disclosure.
According to the embodiment of the present disclosure, the proxy system includes a proxy server and a front gateway server, the service system includes a backend gateway server and a service server, and the proxy system and the service system establish a long connection includes sending a connection request to the backend gateway server through the front gateway server, receiving a proxy credential returned by the backend gateway server, the front gateway server sending the proxy credential to the proxy server, and completing establishment of the long connection between the proxy system and the service system when the proxy server verifies that the proxy credential is successful.
According to the embodiment of the present disclosure, the establishing of the long connection between the service system and the proxy system includes that the backend 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 backend gateway server under the condition that the service server verifies that the connection request is successful, so as to complete the establishing of the long connection with the proxy system.
According to the embodiment of the disclosure, the front gateway server may be deployed in a machine room where the proxy server is located, and is responsible for asynchronous communication with the proxy server through long TCP connection. The prepositive gateway server and the proxy server can adopt a proprietary protocol and an encryption mode. Meanwhile, the front gateway server is responsible for asynchronous communication with a back gateway server in the core service machine room through long TCP connection, and a private protocol and an encryption mode can be adopted between the front gateway server and the back gateway server. The front gateway server is responsible for maintaining TCP connection, converting protocols and encrypting and decrypting data on 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 long connection of the TCP, and is responsible for unpacking, packaging, encryption and decryption, encoding, synchronous and asynchronous processing and the like of communication information. The back-end gateway server and the service server can communicate through distributed calling, for example, an RPC service framework can be adopted, and the back-end gateway server provides RPC service for calling by the service server. 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. Thus, the communication between the back-end gateway server and the service server is realized by the mutual calling of the RPC service.
As shown in fig. 4, when the front gateway server is started, a long connection, such as a TCP long connection, is first established with the back gateway server, the front gateway server serves as a client of the back gateway server, and the back gateway server serves as a server of the front gateway server. At this point, the front gateway server sends the encrypted trust credentials to the back-end gateway server.
The back-end gateway server analyzes the transmitted information through decoding, decryption and the like, and transmits the trust document to the service server through a distributed calling mode.
After the business server passes the verification of the trust credential, the proxy credential of the proxy server logged in by the front gateway server is returned; if the verification fails, an error message is returned.
The back-end gateway server encrypts information codes such as proxy certificates and the like, and then sends the encrypted information codes 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 established successfully, and a heartbeat and disconnection reconnection mechanism is kept.
The front gateway server again acts as a client and proxy server to establish a long connection and send the received proxy credentials. After the proxy server passes the verification, the TCP connection between the front gateway server and the proxy server is completed, and the heartbeat and disconnection reconnection mechanism are kept.
Through the operation, a connection channel is established between the proxy server and the service server, and subsequent information transmission is based on the established long connection. Information transfer between system architectures of embodiments of the present disclosure is described below in conjunction with fig. 5.
Fig. 5 schematically shows a schematic diagram of data transmission between a proxy system and a service system according to an embodiment of the present disclosure.
Firstly, the proxy server sends data to the service server
As shown in fig. 5, after the proxy server records the user operation and calculates it, it sends the corresponding information to the service server through the following steps:
the proxy server sends the data to the preposed gateway server through the TCP connection;
the preposed gateway server transmits the data to the back-end gateway server through TCP connection by converting and encrypting and decrypting the protocol;
and the back-end gateway server calls the distributed calling service of the service server to send the data to the service server. Namely, the service system includes a backend gateway server and a service server, and the backend gateway server communicates with the service server through a distributed invocation service.
And the service server generates corresponding tasks to be put in storage (and then calls other threads to run corresponding tasks) after receiving the data and immediately returns a receiving success response.
Secondly, the service server sends data to the proxy server
The service server assembles the data into corresponding request parameters, and then calls the distributed calling service of the back-end gateway server to send the data to the back-end gateway server, wherein the service server calls the distributed calling service of a specific back-end gateway server according to the mapping relation between the distributed calling 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 prepositive gateway server returns the data to the proxy server through protocol conversion, encryption and decryption.
According to the embodiment of the disclosure, the distributed calling services of the backend gateway servers are distinguished by adopting groups, each backend gateway server can distribute a unique group, each service server is configured with calls of the distributed calling services of all the backend gateway servers, and the service servers call the distributed calling services on different backend gateway servers according to different groups. That is, after the long connection is established with the proxy system, the method further includes recording identification information of a backend 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 backend gateway server corresponding to the identification information, and the backend gateway server sending the data to the proxy system.
For example, in the architecture shown in fig. 5, 4 backend gateway servers are deployed, and the backend gateway server 1, the backend gateway server 2, the backend gateway server 3, and the backend gateway server 4 are grouped into jsf1, jsf2, jsf3, and jsf4 corresponding to distributed calls. Two proxy servers, each proxy server has a unique proxy server id for distinguishing different proxy servers, for example, the proxy server id of proxy server 1 is agent1, and the proxy server id of proxy server 2 is agent 2.
Each request message sent by the proxy server to the service server is accompanied by the unique proxy server identifier, the proxy server 1 and the backend gateway server 1 establish a TCP long connection, the proxy server 2 and the backend gateway server 4 establish a TCP long connection, and when a connection is established, the proxy server 1 and the backend gateway server 1 are accompanied by the unique proxy server identifier, a table (table 2) of the service records the relevant attributes of each proxy server, and when a connection is established, the relationship between the proxy server identifier and the distributed call packet is recorded, that is, the proxy server and which backend gateway server established the TCP long connection, for example, the correspondence relationship is agent1 after the TCP connection is successfully established in this embodiment: jsf1, agent 2: jsf4 are provided.
Meanwhile, each piece of data in the database has a proxy server identifier (refer to table 1), which identifies which proxy server the piece of data is, that is, the data is logically partitioned according to the proxy server identifier, and of course, according to a specific service, the data can also be physically partitioned.
After processing different data, the service server finds out the corresponding distributed calling group according to the proxy server identification, thereby calling the correct distributed calling service of the back-end gateway server.
For example, the proxy server of a certain piece of data is identified as agent1, it can be known that the service server needs to call the distributed call service with the distributed call packet jsf1 by referring to table 2, the service server sends the processing result to the backend gateway server 1 by calling the distributed call service with the packet jsf1, the backend gateway server 1 and the proxy server 1 maintain a TCP connection, and thus the backend gateway server 1 can send the processing result information to the proxy server 1 for processing. Through the above operation, 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 connected to only one backend gateway server, the mapping relationship between the TCP long connection and the distributed call service of the backend gateway server allows the information of one proxy server to be distributed to a plurality of backend servers for distributed processing, and the plurality of backend servers can accurately transmit the response information to the backend gateway server having the TCP connection after processing, thereby allowing the services to have the capability of distributed processing.
The service request and response of the embodiment of the present disclosure adopt an asynchronous manner, and the request or response information may be lost due to the unreliability of the network or some other abnormal problems, which can be solved by adopting the following two mechanisms:
(1) for the case of data loss of the service server sending request or response information to the backend gateway server
If a network problem or other problems (database or server, etc.) occur in the process of calling the distributed calling service by the service server to send a request or response information to the backend gateway server, which causes failure in sending the information, the request or response information is lost.
Before the service server calls the distributed calling service of the back-end gateway server, a piece of task data of a corresponding type is generated in a task table, such as 'inquiry on-machine task' and 'inquiry off-machine task' in 'self-service internet bar project'. Each task has a task state, which may include, for example, "waiting to process," "lock," "complete," and the like. The scheduling system may invoke a data run in a "wait for processing" state. The task is initially in a 'waiting processing' state, the corresponding scheduling logic is in a 'locking' state in the running process, and the scheduling logic is in a 'completing' state after the running is completed.
If the information is not sent out due to the occurrence of an abnormality in the process of dispatching and initiating the distributed calling request to the back-end gateway server by the dispatching system, the data state in the task table is still 'waiting for processing', and the dispatching system can initiate calling again in next dispatching until the information is sent out successfully or exceeds a certain calling number to send out alarm information.
(2) For the condition 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
In order To solve the problem of data loss in such a situation, the method of the embodiment of the present disclosure may design two sets To-B-map and To-a-map as the cache of the data To be sent in each backend gateway server. The To-B-map is used To deposit a set of key-values To be sent To the data on the service server side. The To-A-map is used To deposit a set of key-values of data To be sent To the proxy server side. The key is a data unique identifier, and may be used to identify a correspondence between the request and the response, for example, if the message unique identifier of the request is 1, the message unique identifier of the response is also 1, and the message unique identifiers of different requests may not be the same; value is the specific information to be transmitted.
The back-end gateway server adds the data To the To-B-map when sending the data To the business server side every time, calls the distributed calling service of the business server To send the data, and deletes the data from the To-B-map if the sending is successful; if the data is sent abnormally or wrongly, the back-end gateway server resends the data according to a specific strategy (for example, every 3 seconds, which can be adjusted according to specific conditions) until the data is sent successfully or alarm information is sent out after a certain calling number is exceeded.
Similarly, each time the back-end gateway server sends data To the proxy server side, the data is added To the To-A-map, the data is sent To the front-end gateway server through the TCP connection, and if a corresponding response is received within a certain time (for example, 10s, which can be adjusted according To specific conditions), the data is deleted from the To-A-map; if the corresponding response data is not received or the transmission is abnormal, the back-end gateway server resends the data according to a specific strategy (for example, every 3 seconds, which can be adjusted according to specific conditions) until the data is successfully transmitted or alarm information is sent out after a certain number of times of calling.
Fig. 6 schematically illustrates a block diagram of a brokering system 600 according to an embodiment of the present disclosure.
As shown in fig. 6, the agent system 600 includes a first connection module 610, a first obtaining module 620, a second obtaining module 630, a task processing module 640, and an uploading module 650.
The first connection module 610, for example performing operation S210 described above with reference to fig. 2, is configured to establish a connection with the terminal device and a service system, respectively, wherein a long connection is established with the service system.
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, and is configured to, when receiving the task corresponding to the identification information sent by the terminal device, process the task based on the data, generate a processing result, return the processing result to the terminal device, and update 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 agent system communicates with the terminal device through a local area network connection, and the agent 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-end gateway server and a service server, and the proxy system establishes long connection with the service system comprises sending a connection request to the back-end gateway server through the front gateway server. And receiving the proxy credential returned by the back-end gateway server. The front gateway server sends the proxy credential to the proxy server. And under the condition that the proxy server successfully verifies the proxy credential, completing the establishment of the long connection between the proxy system and the service system.
According to the embodiment of the present disclosure, the agent 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 the embodiment of the disclosure, the task processing module is configured to check whether the agent system stores data corresponding to the identification information in response to receiving the task corresponding to the identification information sent by the terminal device. And if the proxy system stores 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 if the agent system does not find the data corresponding to the identification information, acquiring the data corresponding to the identification information from the service system, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data.
Fig. 7 schematically shows a block diagram of a service system 700 according to an embodiment of the present 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 agent system, send the data to the agent system if the data corresponding to the identification information is not occupied, enable the agent 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 the operation S330 described above with reference to fig. 3, and is configured to receive the updated data from the agent system and release the occupied state of the data corresponding to the identification information.
According to the embodiment of the disclosure, the service system comprises a backend gateway server and a service server, wherein the backend gateway server communicates with the service server through a distributed calling service.
According to the embodiment of the present disclosure, the establishing of the 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 an agent credential to the agent system through the backend gateway server so as to complete the establishment of the long connection with the agent system.
According to the embodiment of the present disclosure, the service system further includes a recording module, configured to record identification information of a backend gateway server connected to the proxy system, where sending the data to the proxy system includes the service server sending the data to the backend gateway server corresponding to the identification information. And the back-end gateway server sends the data to the proxy system.
According to the embodiment of the present disclosure, the service system further includes a notification module, configured to send notification information to the proxy system if data corresponding to the identification information changes when the data corresponding to the identification information is occupied by the proxy system.
Any one or more of the modules, sub-modules, units, sub-units, or sub-units according to embodiments of the present disclosure may be implemented at least in part as hardware circuitry, e.g., a Field Programmable Gate Array (FPGA), a programmable logic array (P L a), 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 circuitry, or in any one of or a suitable combination of software, hardware, and firmware.
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 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 combined and implemented in one module, or any one of them may be split into a plurality of modules, or at least part of the functions of one or more of these modules may be combined with at least part of the functions of the other modules and implemented in one module according to an embodiment 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 in part as a hardware gate array circuit, such as a Field Programmable Gate Array (FPGA), a programmable logic array (P L a), a system on chip, a system on substrate, a system on package, integrated circuit (or an ASIC), or a computer may be implemented in any suitable manner when the first connection module 610, the first obtaining module, the first connection module, the second obtaining module, the second connection module, the uploading module 650, the synchronization module, the second connection module, the data providing module, the synchronization module, the second connection module, the synchronization module, the data providing module, the synchronization module, the system on the system, the system on the substrate, the system on the substrate.
FIG. 8 schematically illustrates a block diagram of a computer system 800 suitable for implementing a brokering system or service system according to an embodiment of the present disclosure. The computer system illustrated in FIG. 8 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the 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 associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flows according to embodiments of the present disclosure.
In the RAM 803, various programs and data necessary 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 flows according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or RAM 803. Note that the programs may also be stored in one or more memories other than the ROM 802 and RAM 803. The processor 801 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to AN embodiment of the present disclosure, the system 800 may further 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 further include one or more of AN input section 806 including a keyboard, a mouse, and the like, AN output section 807 including a Cathode Ray Tube (CRT), a liquid crystal display (L CD), and the like, a speaker, and the like, a storage section 807 including a hard disk, and the like, and a communication section 809 including a network interface card such as a L AN card, a modem, and the like, the communication section 809 performs communication processing via a network such as the Internet, a drive 810 is also connected to the I/O interface 805 as necessary, a removable medium 811 such as a magnetic disk, AN optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 810 as necessary, so that a computer program read therefrom is mounted into the storage section 808 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. 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 containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program, when executed by the processor 801, performs the above-described functions defined in the system of the embodiments of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the 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 present 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, a computer-readable storage medium may include the ROM 802 and/or RAM 803 described above and/or one or more memories other than the ROM 802 and RAM 803.
The flowchart 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 various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been 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 separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (22)

1. A task processing method is applied to a proxy system, and comprises the following steps:
respectively establishing connection with a terminal device 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;
under the condition that a task corresponding to the identification information and sent by the terminal equipment is received, processing the task based on the data to generate a processing result, returning the processing result to the terminal equipment, and updating the data;
and asynchronously uploading the updated data to the service system.
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 front-end gateway server, the service system comprises a backend gateway server and a business server, and the proxy system establishing a long connection with the service system comprises:
sending a connection request to the backend gateway server through the front gateway server;
receiving the proxy credential returned by the backend gateway server;
the front gateway server sending the proxy credential to the proxy server;
and under the condition that the proxy server successfully verifies the proxy credential, completing the establishment of the long connection between the proxy system and the service system.
4. The method of claim 1, wherein prior to asynchronously uploading updated data to the service system, the method further comprises:
and responding to the received 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.
5. The method of claim 1, wherein the processing the task based on the data, generating a processing result, and returning the processing result to the terminal device and updating the data upon receiving the task corresponding to the identification information sent by the terminal device comprises:
in response to receiving a task corresponding to the identification information sent by the terminal device, checking whether the agent system stores data corresponding to the identification information,
if the agent system stores 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
And if the agent system does not find the data corresponding to the identification information, acquiring the data corresponding to the identification information from the service system, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data.
6. A task processing method is applied to a service system, and comprises the following steps:
establishing a long connection with the agent system;
under the condition that a data request containing identification information and sent by the agent system is received, if the data corresponding to the identification information is not occupied, sending the data to the agent system, enabling the agent 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
and receiving the updated data from the agent system, and releasing the occupation state of the data corresponding to the identification information.
7. The method of claim 6, wherein the service system comprises a backend gateway server and a business server, the backend gateway server communicating with the business server through a distributed invocation service.
8. The method of claim 7, wherein the establishing a long connection with a broker 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 an agent credential to the agent system through the backend gateway server so as to complete the establishment of the long connection with the agent system.
9. The method of claim 7, wherein after said establishing a long connection with a broker system, the method further comprises:
recording identification information of a backend gateway server connected to the proxy system,
the sending the data to the agent system comprises:
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.
10. The method of claim 6, further comprising:
and if the data corresponding to the identification information changes, sending notification information to the agent system when the data corresponding to the identification information is occupied by the agent system.
11. A proxy system, comprising:
the first connection module is used for respectively establishing long connection with the terminal equipment and the service system;
a first obtaining module, configured to obtain identification information from the terminal device;
a second obtaining module for obtaining data corresponding to the identification information from the service system;
the task processing module is used for processing the task based on the data to generate a processing result, returning the processing result to the terminal equipment and updating the data under the condition of receiving the task corresponding to the identification information and sent by the terminal equipment;
and the uploading module is used for asynchronously uploading the updated data to the service system.
12. The brokering system of claim 11, wherein the brokering system communicates with the terminal device over a local area network connection and the brokering system communicates with the service system over a public network connection.
13. The proxy system of claim 11, wherein the proxy system comprises a proxy server and a front-end gateway server, the service system comprises a backend gateway server and a business server, and the proxy system establishing a long connection with the service system comprises:
sending a connection request to the backend gateway server through the front gateway server;
receiving the proxy credential returned by the backend gateway server;
the front gateway server sending the proxy credential to the proxy server;
and under the condition that the proxy server successfully verifies the proxy credential, completing the establishment of the long connection between the proxy system and the service system.
14. The brokering system of claim 11, further comprising:
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.
15. The brokering system of claim 11, wherein the task processing module is to:
in response to receiving a task corresponding to the identification information sent by the terminal device, checking whether the agent system stores data corresponding to the identification information,
if the agent system stores 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
And if the agent system does not find the data corresponding to the identification information, acquiring the data corresponding to the identification information from the service system, processing the task based on the data, generating a processing result, returning the processing result to the terminal equipment, and updating the data.
16. A service system, comprising:
the second connection module is used for establishing long connection with the agent system;
the data providing module is used for sending the data to the agent system if the data corresponding to the identification information is not occupied under the condition of receiving a data request containing the identification information sent by the agent system, so that the agent 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
and the data receiving module is used for receiving the updated data from the agent system and removing the occupation state of the data corresponding to the identification information.
17. The service system of claim 16, wherein the service system comprises a backend gateway server and a business server, the backend gateway server communicating with the business server through a distributed invocation service.
18. The service system of claim 17, wherein the establishing a long connection with a broker 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 an agent credential to the agent system through the backend gateway server so as to complete the establishment of the long connection with the agent system.
19. The service system of claim 17, further comprising:
a recording module for recording the identification information of the back-end gateway server connected with the agent system,
the sending the data to the agent system comprises:
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.
20. The service system of claim 16, further comprising:
and 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.
21. 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 10.
22. A computer readable medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 10.
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 true CN111490997A (en) 2020-08-04
CN111490997B 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)

Cited By (1)

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

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6999991B1 (en) * 1999-10-29 2006-02-14 Fujitsu Limited Push service system and push service processing method
CN1842011A (en) * 2005-03-31 2006-10-04 杭州华为三康技术有限公司 An improved method and system for billing based on traffic
CN102055730A (en) * 2009-11-02 2011-05-11 华为终端有限公司 Cloud processing system, cloud processing method and cloud computing agent device
CN102799636A (en) * 2012-06-26 2012-11-28 北京奇虎科技有限公司 Method and system for displaying webpage by mobile terminal
CN107562842A (en) * 2017-08-25 2018-01-09 北京市天元网络技术股份有限公司 The guard method of resource data and equipment
CN109257392A (en) * 2018-11-30 2019-01-22 广州市百果园信息技术有限公司 A kind of command handling method, device, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6999991B1 (en) * 1999-10-29 2006-02-14 Fujitsu Limited Push service system and push service processing method
CN1842011A (en) * 2005-03-31 2006-10-04 杭州华为三康技术有限公司 An improved method and system for billing based on traffic
CN102055730A (en) * 2009-11-02 2011-05-11 华为终端有限公司 Cloud processing system, cloud processing method and cloud computing agent device
CN102799636A (en) * 2012-06-26 2012-11-28 北京奇虎科技有限公司 Method and system for displaying webpage by mobile terminal
CN107562842A (en) * 2017-08-25 2018-01-09 北京市天元网络技术股份有限公司 The guard method of resource data and equipment
CN109257392A (en) * 2018-11-30 2019-01-22 广州市百果园信息技术有限公司 A kind of command handling method, device, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐寅等: "Internet防火墙透明代理技术的研究与实现" *

Cited By (2)

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

Also Published As

Publication number Publication date
CN111490997B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN110311983B (en) Service request processing method, device and system, electronic equipment and storage medium
KR102262093B1 (en) Gateway apparatus, and control method thereof
US8769100B2 (en) Method and apparatus for cluster data processing
CN111885093B (en) Event request transmission method and device, storage medium and electronic equipment
CN107528891B (en) Websocket-based automatic clustering method and system
TW200404439A (en) Remote dynamic configuration of a web server to facilitate capacity on demand
CN103547339B (en) File uploading method, client side and server side
CN114268667B (en) Data forwarding method, device, computer equipment and storage medium
CN116915827A (en) Data transmission method, device, electronic equipment and media for Internet of Things edge gateway
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN113765774B (en) Method, device, electronic equipment and medium for synchronizing messages in real time
CN111669315B (en) Message push method, device, system, electronic device and readable storage medium
CN113765871A (en) Fortress management method and device
CN111427703A (en) Industrial data real-time display method and system
CN113347234B (en) Network information acquisition method, device, system, computer equipment and storage medium
CN111490997B (en) Task processing method, proxy system, service system and electronic equipment
CN114979144A (en) Cloud edge communication method and device and electronic equipment
CN116962547B (en) MQ-based dynamic data gateway communication method
CN112929453A (en) Method and device for sharing session data
CN114363204B (en) Request monitoring method, network device and storage medium
CN115883200B (en) Log security management method, device, platform and medium
CN113542324A (en) Message pushing method and device
CN115297066B (en) Resource dynamic cooperation method, device, server and medium
CN115412555B (en) Cloud edge communication method, cloud edge communication device, cloud edge communication equipment and computer readable storage medium
CN114172946A (en) Request result sending method and device, electronic equipment and computer readable medium

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