CN114139093A - Data communication method, equipment and medium - Google Patents

Data communication method, equipment and medium Download PDF

Info

Publication number
CN114139093A
CN114139093A CN202111454063.0A CN202111454063A CN114139093A CN 114139093 A CN114139093 A CN 114139093A CN 202111454063 A CN202111454063 A CN 202111454063A CN 114139093 A CN114139093 A CN 114139093A
Authority
CN
China
Prior art keywords
service
client
session
data
session information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111454063.0A
Other languages
Chinese (zh)
Inventor
高祥炎
张壮
张立珠
邵华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Genersoft Information Technology Co Ltd
Original Assignee
Shandong Inspur Genersoft 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 Shandong Inspur Genersoft Information Technology Co Ltd filed Critical Shandong Inspur Genersoft Information Technology Co Ltd
Priority to CN202111454063.0A priority Critical patent/CN114139093A/en
Publication of CN114139093A publication Critical patent/CN114139093A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data communication method, equipment and a medium, wherein the method comprises the following steps: the server acquires a registration request of a client, a service front end URL and a user ID of a login client through a data push service; establishing a long connection session between the data push service and the client according to the registration request; generating a session ID unique to a session in a data push service, binding a service front end URL, a user ID and the session ID, and determining session information of a client; and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client. According to the embodiment of the application, by stripping data transmission and service logic, only the data transmission specification of the service end needs to be concerned, and long connection session can be established with the client through the data push service under various application scenes, so that the requirements of various functions are met, and the code utilization rate is improved. And a more flexible and universal solution is provided for application scenes such as real-time data push, interaction and the like.

Description

Data communication method, equipment and medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data communication method, device, and medium.
Background
At present, a plurality of data real-time interaction technology frameworks are provided, functions with higher data real-time requirements are generally personalized development on the basis of an open-source data transmission assembly, different functions are developed in a mode of binding with a service in the aspect of use of the data transmission assembly due to differences in service logic, namely personalized data transmission functions are customized for different functions, and data transmission general codes are fused with a large number of service logic codes.
Based on this, the code is redundant and difficult to maintain when the real-time interactive data function is customized and developed for different business scenes in the system.
Disclosure of Invention
The embodiment of the application provides a data communication method, equipment and a medium, which are used for solving the problems of code redundancy and difficult maintenance when a real-time data interaction function is customized and developed for different service scenes in a system.
The embodiment of the application adopts the following technical scheme:
in one aspect, an embodiment of the present application provides a data communication method, where the method includes: the server acquires a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID for logging in the client through a data push service; according to the registration request, establishing a long connection session between the data push service and the client; generating a session ID unique to the session in the data push service, binding the service front end URL, the user ID and the session ID, and determining session information of the client; and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
In one example, the performing data communication between the service backend and the service frontend according to the session information, the data push service, and the client specifically includes: in the service back end, acquiring a plurality of service front end URLs in the session information; identifying self service data through a plurality of service front end URLs, and determining the service front end URL corresponding to the service data; filtering out a service front end URL to be pushed from the corresponding service front end URL; assembling the front-end URL of the service to be pushed, the service data and the user ID into a first parameter list; and calling the data push service, and pushing the first parameter list to the client through the data push service so as to carry out data communication with the service front end through the client.
In one example, the transmitting the first parameter list to the client through the data push service to perform data communication with the service front end through the client specifically includes: analyzing each group of parameters in the first parameter list through the data pushing service, and determining the front-end URL of the service to be pushed, the service data and the user ID of each group of parameters; if the user ID is empty, acquiring a session ID matched with the front-end URL of the service to be pushed from the session information; if the user ID is not null, acquiring a session ID matched with the front-end URL of the service to be pushed and the user ID from the session information; and pushing the first parameter list to the client based on the matched session ID so as to carry out data communication with the service front end through the client.
In one example, the performing data communication with the service front end through the client specifically includes: carrying out data communication with the service front end through a transmission method in the client; after receiving the first parameter list, the client analyzes the first parameter list through the transmission method, and transmits the analyzed service data to the service front end through a service logic layer, so that the service front end executes service operation according to the service data.
In one example, after determining the session information of the client, the method further includes: determining a pre-constructed client registration information management module and a client registration session list; judging whether the session ID exists in the client registration session list or not through the client registration information management module; if so, updating the session information in the client registration session list based on the session information; and if not, storing the session ID as a main key, the service front end and the URL user ID as main information to the client registration session list.
In one example, after the service backend and the service frontend are in data communication, the method further includes: acquiring a session information deletion request of the client through a data push service; judging whether the session information to be deleted exists in the client registration session list or not through the client registration information management module according to the session ID of the session information to be deleted in the session information deletion request; and if so, deleting the session information to be deleted.
In one example, after the service backend and the service frontend are in data communication, the method further includes: when the data push service detects that the client is disconnected, the client registration information management module is called; and deleting the session information corresponding to the session ID disconnected from the client registration session list through a client registration information management module.
In one example, the performing data communication between the service backend and the service frontend according to the session information, the data push service, and the client specifically includes: acquiring a second parameter list transmitted by a client through the data push service; and analyzing the second parameter list, analyzing each group of parameters in the second parameter list through the data pushing service, and pushing the analyzed parameters to the service back end.
On the other hand, an embodiment of the present application provides a data communication device, which is applied to a server, and includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to: acquiring a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID for logging in the client through a data push service; according to the registration request, establishing a long connection session between the data push service and the client; generating a session ID unique to the session in the data push service, binding the service front end URL, the user ID and the session ID, and determining session information of the client; and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
In another aspect, an embodiment of the present application provides a data communication non-volatile computer storage medium, storing computer-executable instructions, and applying to a server, where the computer-executable instructions are configured to: acquiring a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID for logging in the client through a data push service; according to the registration request, establishing a long connection session between the data push service and the client; generating a session ID unique to the session in the data push service, binding the service front end URL, the user ID and the session ID, and determining session information of the client; and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
according to the embodiment of the application, data transmission and service logic are stripped, only the data transmission standard of a service end needs to be concerned, long connection sessions can be established between the data push service and the client side under various application scenes, the requirements of various functions are met, data transmission is carried out according to unified standards, the data push service can be quickly integrated with various service functions, data communication is carried out between the service rear end and the service front end, the coding amount is effectively reduced, the development cost is reduced, the code utilization rate is improved, and a more flexible and universal solution is provided for application scenes such as real-time data push, interaction and the like.
Drawings
In order to more clearly explain the technical solutions of the present application, some embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of a data communication system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data communication method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data communication device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following embodiments and accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of a data communication system according to an embodiment of the present disclosure.
As shown in the figure, the data communication system at least comprises a service back end, a real-time data push component and a service front end.
The service front end and the service back end carry out data communication through the real-time pushing assembly. The real-time data pushing component comprises a data pushing service, a client registration information management module, a client registration session list and a plurality of clients, wherein the clients comprise a client A, a client B and the like. The session information is cached in the client registration session list, and the client registration information module manages the session information in the client registration session list.
It should be noted that the data push service, the client registration information management module, and the client registration session list are disposed in the server, that is, a data push component belonging to the server. That is to say, the real-time data pushing component is respectively arranged at the server and the client, so that data transmission between the client and the server can be realized.
Specifically, the client serves as a dockee with each service front end, and the main responsible content of the client includes determining client registration information and initiating registration, and interfacing with service logic layer data. For example, the client a performs data interfacing with the service logic a in the service logic layer, and the client B performs data interfacing with the service logic B in the service logic layer.
When the client initiates registration, because the service front end needs to refer to a universal client program, when the service front end is loaded for the first time, the client acquires the URL of the current service front end, the user ID of the current login client and a registration request, and then sends the URL, the user ID and the registration request to the data push service for registration, so that a long connection session is established with the data push service, and after the registration is completed, the client can transmit data to the data push service and also can receive the data pushed by the data push service.
When the client is in data butt joint with the service logic layer, the client provides a uniform method for the service logic layer to call, and the access parameters including the URI of the receiver service front end, the user ID to be sent and the assembled service data are transmitted according to the uniform specification. After the method of the client is called, the URI and the user ID of the current service front end are automatically assembled and are assembled with the service data transmitted by the service back end, the finally assembled data comprise the information of a sender and a receiver and the service data, the data push service is actively called, and the assembled data are transmitted.
It should be noted that, the delivery of the sender and receiver information mainly allows the data push service to specify the data source and the data sending object, and provides support for forwarding data.
The client can receive data actively pushed by the data pushing service, the transmitted data is mainly business data, the client actively calls a set transmission method to transmit the corresponding business data to the business front end, and the business front end needs to realize the transmission method called by the client, analyze the business data and perform business operation.
Further, after the client establishes a long connection session with the data push service, the data push service generates a session ID unique to the session, and binds the service front end URL, the user ID, and the session ID to generate session information of the client. Therefore, the client registration information management module is used to manage session information of all currently alive clients. Including the addition, storage, querying, and deletion of client session information.
Specifically, when the client registration information management module performs incremental storage on session information, first, a session ID, a service front-end URI, and a user ID are received, and then, whether the current session ID already exists is determined, and if so, the session information in the session ID needs to be updated.
If not, storing the session information according to the specification, taking the session ID as a main key, and taking the service front end URI and the user ID as main information.
It should be noted that the storage of the session information is mainly provided for the data push service, and the data push service calls the session information after the registration of the client is completed. Because the session information has timeliness, only the session successfully establishing connection with the data push service needs to be stored, so the session information is cached.
In addition, when the client registration information management module queries the session information, the client registration information management module mainly queries all session information lists and acquires the session information lists meeting the conditions according to the user ID and the service front end URI.
The method comprises the steps of querying all session information lists, mainly providing the session information lists for a service end to be called, analyzing and judging services such as pushing objects and authorities by the service end, determining the objects to be pushed, and then assembling service data to call a data pushing service to push data.
For obtaining the session information list through the user ID and the service front end URI, the session information list is mainly provided for the data push service to call, and when the data push service receives a push request, the corresponding session handle, that is, the session ID, needs to be obtained according to the user ID and the service URI that need to be pushed. The data push service then implements the data push.
It should be noted that, if the user ID may be null, the session information list is obtained only by using the service URI as the filter condition.
In addition, when the client registration information management module deletes the session information, the session information is deleted for the data push service, and the session information corresponding to the client which does not need data transmission any more is mainly deleted.
After receiving the request for deleting the session information, the client registration information module needs to judge whether the current session information exists according to the session ID, and if so, the client registration information module deletes the session information.
Furthermore, the data push service is used as a link for interaction between the service back end and the client, and is mainly responsible for content such as connection with the service back end, management of the client, data push and the like, so that service data of the service back end is pushed to the specified client, registration, logout and data transmission management of the client are realized, and the requirements of real-time data transmission and directional data push are effectively met.
Specifically, when the data push service registers the client, the client sends a registration request and transmits parameters such as a URI of a current service front end and a current login user ID, after receiving the registration request, the data push service establishes a long connection session with the client, generates a session object, assigns a unique ID to the session, sets the transmitted parameters in the session object, and invokes the client registration information management module to store session information of the client, thereby completing registration of the client.
In addition, when the data push service logs off the client, and the client is disconnected from the data push service due to the fact that the client is closed or the network is disconnected, the data push service acquires the disconnected session ID, calls the client registration information management module, deletes the session information, and does not perform data transmission with the client any more.
In addition, when the data push service is in butt joint with a service back end, the service back end needs to unify data butt joint specifications, service data are assembled according to service requirements, the internal structure of the service data can be customized, the service back end acquires all session information from a client registration information management module, analyzes which services and users need to be transmitted according to the service requirements, finally assembles a first parameter list, and for each item, the service front end URI, the user ID and the service data are included, then the data push service is called, and the first parameter list is transmitted.
For example, the parameter list assembly specification is as follows: the sender's service front end URI and sender user ID, may be null; multiple groups of receiver information can exist if the information needs to be pushed to multiple objects, the service front end URI and the receiver user ID of the receiver cannot be null, and the data structure is customized according to service requirements.
In addition, when data pushing is performed, the data pushing service supports receiving a first parameter list assembled by a service backend and pushing after analyzing, and also supports receiving a second parameter list transmitted by a client and pushing after analyzing, the parameters are assembled according to a unified specification, a service front end URI and a user ID which need to be pushed need to be indicated in the parameters, and the data pushing service is enabled to specify a data pushing object.
After receiving the parameter list, the data push service analyzes a service front end URI and a user ID of a receiver aiming at each group of parameters, if the user ID is empty, a session list matched with the service front end URI is obtained through the client registration information management module, if the user ID is not empty, the session list matched with the service front end URI and the user ID is obtained through the client registration information management module, namely, a corresponding session ID is obtained according to an object required to be pushed by the service rear end, and the parameter list is pushed to a specified client through the session ID, so that accurate push of data is completed.
Through the system of the figure 1, only the data transmission specification of the service end needs to be concerned by stripping data transmission and service logic, the component can be shared under various application scenes through the real-time data pushing component, the functional requirements are met, data transmission is carried out according to the unified specification, the data pushing component can be quickly integrated with various service functions, the coding amount is effectively reduced, and the development cost is reduced. And the code utilization rate is improved. And a more flexible and universal solution is provided for application scenes such as real-time data push, interaction and the like.
Based on the above description, the embodiment of the present application further provides a flow diagram of a data communication method, which is applied to the data communication system in fig. 1, as shown in fig. 2, and the method can be applied to different business fields, such as the internet financial business field, the e-commerce business field, the instant messaging business field, the game business field, the public business field, and the like. The process may be performed by computing devices in the respective domains, with certain input parameters or intermediate results in the process allowing for manual intervention adjustments to help improve accuracy. For convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
It should be noted that the server may be a single device, or may be a system composed of multiple devices, that is, a distributed server, which is not specifically limited in this application.
The flow in fig. 2 may include the following steps:
s201: and the server acquires the registration request of the client, the URL of the service front end and the user ID of the login client through the data push service.
S202: and according to the registration request, establishing a long connection session between the data push service and the client.
S203: in the data push service, a session ID unique to a session is generated, a service front end URL, a user ID and the session ID are bound, and session information of a client is determined.
In some embodiments of the present application, after the server generates the session ID through the data push service, the client registration information management module determines whether the session ID exists in the client registration session list, if so, the session information in the client registration information management module is updated based on the session information, and if not, the session ID is used as a main key, and the service front end URL and the user ID are used as main information and stored in the client registration session list.
S204: and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
In some embodiments of the present application, when the service backend performs data communication with the service front end, the service backend determines a service front end URL corresponding to its own service data in advance.
Specifically, the server acquires a plurality of service front end URLs in session information in a service back end, then identifies service data of the server through the service front end URLs, determines the service front end URLs corresponding to the service data, filters out service front end URLs to be pushed from the corresponding service front end URLs, assembles the service front end URLs to be pushed, the service data and the user ID into a first parameter list, calls a data pushing service, and pushes the first parameter list to a client through the data pushing service so as to perform data communication with the service front end through the client.
Further, when the server pushes the first parameter list to the client through the data pushing service, each group of parameters in the first parameter list is firstly analyzed through the data pushing service, and a to-be-pushed service front end URL, service data and a user ID of each group of parameters are determined.
If the user ID is null, the session ID matched with the front-end URL of the service to be pushed is obtained from the session information, and if the user ID is not null, the session ID matched with the front-end URL of the service to be pushed and the user ID is obtained from the session information. And finally, based on the matched session ID, pushing the first parameter list to the client so as to carry out data communication with the service front end through the client.
Further, when the server performs data communication with the service front end through the client, the server performs data communication with the service front end through a transmission method in the client.
Specifically, after receiving the first parameter list, the client parses the first parameter list through a transmission method, and transmits parsed service data to the service front end through the service logic layer, so that the service front end executes service operation according to the service data.
In some embodiments of the present application, the client has a disconnection condition with the data push service, and therefore, when the data push service acquires a session information deletion request of the client, it is determined whether the session information to be deleted exists in a client registration session list according to a session ID of the session information to be deleted in the session information deletion request, and if so, the session information to be deleted is deleted.
In addition, when the client is disconnected from the data push service due to the conditions of client closing or network disconnection and the like, and the data push service detects that the client is disconnected, the client registration information management module is called, and the session information corresponding to the session ID disconnected from the client registration session list is deleted through the client registration information management module.
In some embodiments of the present application, the data push service may also receive service data transmitted by the client and deliver the service data to the service backend.
Specifically, a second parameter list transmitted by the client is obtained through the data pushing service, the second parameter list is analyzed, each group of parameters in the second parameter list is analyzed through the data pushing service, and the analyzed parameters are pushed to the service back end.
It should be noted that, although the embodiment of the present application describes steps S201 to S204 in sequence with reference to fig. 2, this does not mean that steps S201 to S204 must be executed in strict order. The embodiment of the present application is described by sequentially describing step S201 to step S204 according to the sequence shown in fig. 2, so as to facilitate those skilled in the art to understand the technical solutions of the embodiment of the present application. In other words, in the embodiment of the present application, the sequence between step S201 and step S204 may be appropriately adjusted according to actual needs.
By the method of fig. 2, only the data transmission specification of the service end needs to be concerned by stripping data transmission and service logic, long connection sessions can be established with the client end through data push services in various application scenes to meet the requirements of various functions, data transmission is performed according to unified specifications, the data transmission can be quickly integrated with various service functions, data communication is performed between the service back end and the service front end, the coding amount is effectively reduced, the development cost is reduced, the code utilization rate is improved, and a more flexible and universal solution is provided for application scenes such as real-time data push, interaction and the like.
Based on the same idea, some embodiments of the present application further provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 3 is a schematic structural diagram of a data communication device according to an embodiment of the present application, which is applied to a server and includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID of a login client through a data push service;
establishing a long connection session between the data push service and the client according to the registration request;
generating a session ID unique to a session in a data push service, binding a service front end URL, a user ID and the session ID, and determining session information of a client;
and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
Some embodiments of the present application provide a data communication non-volatile computer storage medium, storing computer-executable instructions, for application to a server, the computer-executable instructions configured to:
acquiring a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID of a login client through a data push service;
establishing a long connection session between the data push service and the client according to the registration request;
generating a session ID unique to a session in a data push service, binding a service front end URL, a user ID and the session ID, and determining session information of a client;
and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one to one, so the device and the medium also have the similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so the beneficial technical effects of the device and the medium are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the technical principle of the present application shall fall within the protection scope of the present application.

Claims (10)

1. A method for communicating data, the method comprising:
the server acquires a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID for logging in the client through a data push service;
according to the registration request, establishing a long connection session between the data push service and the client;
generating a session ID unique to the session in the data push service, binding the service front end URL, the user ID and the session ID, and determining session information of the client;
and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
2. The method according to claim 1, wherein the performing data communication between the service backend and the service frontend according to the session information, the data push service, and the client specifically includes:
in the service back end, acquiring a plurality of service front end URLs in the session information;
identifying self service data through a plurality of service front end URLs, and determining the service front end URL corresponding to the service data;
filtering out a service front end URL to be pushed from the corresponding service front end URL;
assembling the front-end URL of the service to be pushed, the service data and the user ID into a first parameter list;
and calling the data push service, and pushing the first parameter list to the client through the data push service so as to carry out data communication with the service front end through the client.
3. The method of claim 2, wherein the transmitting the first parameter list to the client via the data push service for data communication with the business front end via the client comprises:
analyzing each group of parameters in the first parameter list through the data pushing service, and determining the front-end URL of the service to be pushed, the service data and the user ID of each group of parameters;
if the user ID is empty, acquiring a session ID matched with the front-end URL of the service to be pushed from the session information;
if the user ID is not null, acquiring a session ID matched with the front-end URL of the service to be pushed and the user ID from the session information;
and pushing the first parameter list to the client based on the matched session ID so as to carry out data communication with the service front end through the client.
4. The method according to claim 3, wherein the performing data communication with the service front-end through the client specifically includes:
carrying out data communication with the service front end through a transmission method in the client; after receiving the first parameter list, the client analyzes the first parameter list through the transmission method, and transmits the analyzed service data to the service front end through a service logic layer, so that the service front end executes service operation according to the service data.
5. The method of claim 1, wherein after determining the session information of the client, the method further comprises:
determining a pre-constructed client registration information management module and a client registration session list;
judging whether the session ID exists in the client registration session list or not through the client registration information management module;
if so, updating the session information in the client registration session list based on the session information;
and if not, storing the session ID as a main key, the service front end and the URL user ID as main information to the client registration session list.
6. The method of claim 5, wherein after the data communication between the service backend and the service frontend, the method further comprises:
acquiring a session information deletion request of the client through a data push service;
judging whether the session information to be deleted exists in the client registration session list or not through the client registration information management module according to the session ID of the session information to be deleted in the session information deletion request;
and if so, deleting the session information to be deleted.
7. The method of claim 5, wherein after the data communication between the service backend and the service frontend, the method further comprises:
when the data push service detects that the client is disconnected, the client registration information management module is called;
and deleting the session information corresponding to the session ID disconnected from the client registration session list through a client registration information management module.
8. The method according to claim 1, wherein the performing data communication between the service backend and the service frontend according to the session information, the data push service, and the client specifically includes:
acquiring a second parameter list transmitted by a client through the data push service;
and analyzing the second parameter list, analyzing each group of parameters in the second parameter list through the data pushing service, and pushing the analyzed parameters to the service back end.
9. A data communication device, applied to a server, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID for logging in the client through a data push service;
according to the registration request, establishing a long connection session between the data push service and the client;
generating a session ID unique to the session in the data push service, binding the service front end URL, the user ID and the session ID, and determining session information of the client;
and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
10. A data communication non-transitory computer storage medium storing computer-executable instructions, for use with a server, the computer-executable instructions configured to:
acquiring a registration request of a client, a Uniform Resource Locator (URL) of a service front end and a user ID for logging in the client through a data push service;
according to the registration request, establishing a long connection session between the data push service and the client;
generating a session ID unique to the session in the data push service, binding the service front end URL, the user ID and the session ID, and determining session information of the client;
and carrying out data communication between the service back end and the service front end according to the session information, the data push service and the client.
CN202111454063.0A 2021-12-01 2021-12-01 Data communication method, equipment and medium Pending CN114139093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111454063.0A CN114139093A (en) 2021-12-01 2021-12-01 Data communication method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111454063.0A CN114139093A (en) 2021-12-01 2021-12-01 Data communication method, equipment and medium

Publications (1)

Publication Number Publication Date
CN114139093A true CN114139093A (en) 2022-03-04

Family

ID=80387268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111454063.0A Pending CN114139093A (en) 2021-12-01 2021-12-01 Data communication method, equipment and medium

Country Status (1)

Country Link
CN (1) CN114139093A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573390A (en) * 2023-11-20 2024-02-20 航天信息(广东)有限公司 Data processing method, cloud, client and data processing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117573390A (en) * 2023-11-20 2024-02-20 航天信息(广东)有限公司 Data processing method, cloud, client and data processing system

Similar Documents

Publication Publication Date Title
US8938502B2 (en) Subscriber device and subscription management that supports real-time communication
US8589338B2 (en) Service-oriented architecture (SOA) management of data repository
CN110351283B (en) Data transmission method, device, equipment and storage medium
CN104363507B (en) A kind of video and audio recording and sharing method and system based on OTT set-top box
CN107547213B (en) Method and device for identifying business rules
CN112788126B (en) Resource downloading method, device, server and storage medium
CN101854371A (en) Method and device for calling and processing JavaScript object
CN101729491A (en) Method, device and system for enhancing application reliability of script-based business
CN105677536A (en) Implementing method for task messages and task system for implementing task messages
CN102571575A (en) Session information creation method, device and system
CN114040020A (en) Cross-cluster service calling method and system
CN105141653A (en) Method, equipment and system for data interaction of service platform
CN105099769A (en) Method, device and system for processing abnormal operations of service platform
CN110381058B (en) Request transmission method and device based on full duplex communication protocol WebSocket
CN113556359A (en) Communication protocol conversion method, device, system and gateway device
CN114139093A (en) Data communication method, equipment and medium
CN107113281A (en) Content shared method, terminal, server and system
CN102970185A (en) Operation state monitoring method of network application, client equipment and communication system
CN114697282A (en) Message processing method and system, storage medium and electronic device
CN113435937A (en) Advertisement creating method and device
CN114285658B (en) System mutual jump login-free method based on WeChat authorization login
CN103546360B (en) A kind of information acquisition method, system and IMAP clients
WO2023088011A1 (en) Method and apparatus for transmitting interaction information, and storage medium and electronic apparatus
CN102970184A (en) Operation state monitoring method of network application and application server
CN114697281B (en) Text message processing method and device, storage medium and electronic 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