CN109067860B - Mobile terminal message processing method and related device - Google Patents

Mobile terminal message processing method and related device Download PDF

Info

Publication number
CN109067860B
CN109067860B CN201810804919.4A CN201810804919A CN109067860B CN 109067860 B CN109067860 B CN 109067860B CN 201810804919 A CN201810804919 A CN 201810804919A CN 109067860 B CN109067860 B CN 109067860B
Authority
CN
China
Prior art keywords
message
server
mobile terminal
request
json format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810804919.4A
Other languages
Chinese (zh)
Other versions
CN109067860A (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.)
KUNSHAN CVIC SE CO., LTD.
Original Assignee
Kunshan Cvic Se Co ltd
CVIC Software Engineering 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 Kunshan Cvic Se Co ltd, CVIC Software Engineering Co Ltd filed Critical Kunshan Cvic Se Co ltd
Priority to CN201810804919.4A priority Critical patent/CN109067860B/en
Publication of CN109067860A publication Critical patent/CN109067860A/en
Application granted granted Critical
Publication of CN109067860B publication Critical patent/CN109067860B/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
    • H04L67/565Conversion or adaptation of application format or content
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a mobile terminal message processing method, which comprises the following steps: the server judges whether the intermediate layer request message sent by the mobile terminal meets the processing standard or not according to a preset white list; if so, performing message forwarding processing on the server request message by adopting a server session according to the server request parameter to obtain a return message; and performing JSON format conversion processing on the return message according to the request parameter of the server side to obtain a JSON format return message, and sending the JSON format return message to the mobile terminal. By forwarding the message of the mobile terminal, an intermediate layer is realized between the server terminal and the mobile terminal, so that the message sent to the mobile terminal is adapted to the mobile terminal, and secondary development of a server is avoided. The application also discloses a mobile terminal service request method, a mobile terminal message processing device, a mobile terminal service request device, a server and a computer readable storage medium, which have the beneficial effects.

Description

Mobile terminal message processing method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a mobile terminal message processing method, a mobile terminal service request method, a mobile terminal message processing apparatus, a mobile terminal service request apparatus, a server, and a computer-readable storage medium.
Background
With the continuous development of information technology, a new structure from a mobile terminal to a server appears in the prior browser-to-server structure, and the two structures coexist in the internet and provide internet services for consumers. Therefore, in some configurations where the mobile side server is not developed, in order to increase the support for the mobile side, that is, in order to implement the processing of the mobile side message, the secondary development is usually performed on the server side program in the existing architecture, and a new interface code is added at the server side for the mobile side to call.
However, for the secondary development of the server, because the development is performed on the basis of the work of predecessors, new developers are needed to learn and understand the logic of the original server code, and the development cost is increased. Moreover, the secondary development results can affect the codes of the original server side, and the stability of the program is reduced.
Therefore, how to implement the processing of the mobile side message by the existing service side without secondary development is a key issue of attention by those skilled in the art.
Disclosure of Invention
The present application aims to provide a mobile terminal message processing method, a mobile terminal service request method, a mobile terminal message processing apparatus, a mobile terminal service request apparatus, a server, and a computer-readable storage medium, which implement an intermediate layer between a server and a mobile terminal by forwarding a mobile terminal message, so that a message sent to the mobile terminal is adapted to the mobile terminal, thereby avoiding secondary development of the server.
In order to solve the above technical problem, the present application provides a method for processing a mobile terminal message, including:
the server judges whether the intermediate layer request message sent by the mobile terminal meets the processing standard or not according to a preset white list;
if so, performing message forwarding processing on the server request message by adopting a server session according to the server request parameter to obtain a return message; wherein the server side session is determined according to the mobile side session of the middle layer request message; the server side request parameter and the server side request message are obtained by analyzing the intermediate layer request message;
and performing JSON format conversion processing on the return message according to the request parameter of the server side to obtain a JSON format return message, and sending the JSON format return message to the mobile terminal.
Optionally, the determining, by the server, whether the intermediate layer request message sent by the mobile terminal meets the processing standard according to the preset white list includes:
the server extracts the URL of the intermediate layer request message sent by the mobile terminal;
and judging whether the URL is in the preset white list or not.
Optionally, the server session is determined according to the mobile terminal session of the intermediate layer request message, and includes:
determining a corresponding client object in a session mapping table according to the mobile terminal session of the intermediate layer request message;
and searching the client object to obtain the server session.
Optionally, the performing JSON format conversion processing on the return message according to the service end request parameter to obtain a JSON format return message, and sending the JSON format return message to the mobile end includes:
determining corresponding data extraction operation according to the request address of the server request parameter;
executing the data extraction operation on the return message to obtain return data;
performing JSON format packaging processing on the returned data to obtain a JSON format returned message;
and sending the JSON format return message to the mobile terminal.
The application also provides a mobile terminal service request method, which comprises the following steps:
the mobile terminal encapsulates the server request message and the server request parameter to obtain an intermediate layer request message;
sending the intermediate layer request message to a server so that the server performs message forwarding processing on the intermediate layer request message to obtain a return message, performs JSON format conversion processing on the return message to obtain a JSON format return message, and sends the JSON format return message to the mobile terminal;
and receiving the JSON format return message so as to complete the service request operation.
The present application further provides a mobile terminal message processing apparatus, including:
the message filtering module is used for judging whether the intermediate layer request message sent by the mobile terminal meets the processing standard or not according to a preset white list;
the message forwarding module is used for performing message forwarding processing on the request message of the server by adopting the session of the server according to the request parameter of the server when the request message of the middle layer meets the processing standard so as to obtain a return message; wherein the server side session is determined according to the mobile side session of the middle layer request message; the server side request parameter and the server side request message are obtained by analyzing the intermediate layer request message;
and the message format conversion module is used for performing JSON format conversion processing on the return message according to the request parameter of the server side to obtain a JSON format return message and sending the JSON format return message to the mobile terminal.
Optionally, the message format conversion module includes:
the data extraction operation determining unit is used for determining corresponding data extraction operation according to the request address of the server request parameter;
the data extraction unit is used for executing the data extraction operation on the return message to obtain return data;
the data encapsulation unit is used for carrying out JSON format encapsulation processing on the returned data to obtain a JSON format returned message;
and the return message sending unit is used for sending the JSON format return message to the mobile terminal.
The present application further provides a mobile terminal service request apparatus, including:
the request message encapsulation module is used for encapsulating the server request message and the server request parameter to obtain an intermediate layer request message;
the message sending module is used for sending the intermediate layer request message to a server so that the server can perform message forwarding processing on the intermediate layer request message to obtain a return message, perform JSON format conversion processing on the return message to obtain a JSON format return message, and send the JSON format return message to the mobile terminal;
and the return message receiving module is used for receiving the JSON format return message so as to complete the service request operation.
The present application further provides a server, comprising:
a memory for storing a computer program;
a processor, configured to implement the steps of the mobile-side message processing method as described above when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, implements the steps of the mobile-side message processing method as described above.
The application provides a mobile terminal message processing method, which comprises the following steps: the server judges whether the intermediate layer request message sent by the mobile terminal meets the processing standard or not according to a preset white list; if so, performing message forwarding processing on the server request message by adopting a server session according to the server request parameter to obtain a return message; wherein the server side session is determined according to the mobile side session of the middle layer request message; the server side request parameter and the server side request message are obtained by analyzing the intermediate layer request message; and performing JSON format conversion processing on the return message according to the request parameter of the server side to obtain a JSON format return message, and sending the JSON format return message to the mobile terminal.
The received intermediate layer request message is analyzed to obtain a server session, the server session is requested, namely message forwarding processing is carried out, so that the request message of the mobile terminal can keep the same session and is sent to the server to carry out service request, further, when the server returns the message, format conversion is carried out on the returned message, so that the mobile terminal receives the returned message in a correct format, the server provides interface service for the mobile terminal, secondary development on the original server is avoided, and the efficiency of the server for providing service for the mobile terminal is improved.
The present application further provides a mobile terminal service request method, a mobile terminal message processing device, a mobile terminal service request device, a server, and a computer readable storage medium, which have the above beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for processing a mobile-side message according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a format conversion operation of a method for processing a mobile-side message according to an embodiment of the present application;
fig. 3 is a flowchart of a mobile terminal service request method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a mobile-side message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a mobile terminal service request apparatus according to an embodiment of the present disclosure.
Detailed Description
The core of the application is to provide a mobile terminal message processing method, a mobile terminal service request method, a mobile terminal message processing device, a mobile terminal service request device, a server and a computer readable storage medium, by forwarding the message of the mobile terminal, an intermediate layer is realized between the server and the mobile terminal, so that the message sent to the mobile terminal is adapted to the mobile terminal, and secondary development of the server is avoided.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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.
In the prior art, if an existing server-side program is to support a mobile terminal, the server-side program needs to be developed secondarily, but the difficulty of secondary development is high, and the secondary development of the original program affects the stability of the original program.
Therefore, this embodiment provides a method for processing a mobile terminal message to a server, where a request is made for a session of a server obtained by analyzing a received request message of an intermediate layer, that is, a message forwarding process is performed, so that the request message of the mobile terminal can keep the same session and send the session to the server to make a service request, and further, when the server returns a message, format conversion is performed on the return message so that the mobile terminal receives the return message in a correct format, thereby completing an interface service provided by the server to the mobile terminal, avoiding secondary development of an original server, and improving efficiency of the server in providing services to the mobile terminal.
Specifically, referring to fig. 1, fig. 1 is a flowchart of a method for processing a mobile terminal message according to an embodiment of the present application.
The method can comprise the following steps:
s101, the server judges whether a middle layer request message sent by the mobile terminal meets a processing standard or not according to a preset white list; if yes, executing S102;
this step is intended to filter the intermediate layer request sent by the mobile terminal. When the mobile terminal requests the server for the interface service, a situation that part of the interface service is not opened for the mobile terminal exists, so that whether the processing standard is met or not is judged by the step, and the server is prevented from receiving a request message which does not provide the service.
It should be noted that, by using the method of this embodiment, the intermediate layer for adapting the mobile terminal message is implemented between the server and the mobile terminal, so that the mobile terminal directly sends the request message, that is, the intermediate layer request message, to the intermediate layer when requesting the message from the server.
Optionally, this step may include:
step one, a server extracts a URL of a middle layer request message sent by a mobile terminal;
and step two, judging whether the URL is in a preset white list or not.
Since the URL of the service request determines the service interface to which the request message requests, the alternative determines whether the URL of the data service request in the intermediate layer request message meets the processing standard, and can clearly and directly determine the intermediate layer request message.
Optionally, this step may further include:
if not, an error message is sent to the mobile terminal.
S102, according to the server request parameter, the server session is adopted to perform message forwarding processing on the server request message, and a return message is obtained; the server-side session is determined according to the mobile-side session of the intermediate layer request message; the server side request parameters and the server side request messages are obtained by analyzing the intermediate layer request messages;
on the basis of the step S101, the step aims to determine a server session through a mobile terminal session of the intermediate layer request message, analyze the intermediate layer request message to obtain a server request parameter and a server request message, send the server request message by using the server session according to the server request parameter, and process the message after sending to obtain a return message.
It should be noted that the server session in this step is mainly to keep different mobile terminals corresponding to different sessions when the mobile terminal forwards the message through the middle layer, so as to prevent a message sending error caused by using the same session by multiple mobile terminals.
It should be noted that the server request parameter obtained by analyzing the intermediate layer request message in this step is a necessary parameter for sending the server request message to the corresponding service interface, and includes a request mode (e.g., get, post, etc.), a request address (e.g., api, user, etc.), and a request parameter (e.g., name 123, etc.). The server request parameter can be used for sending a server request message to an actual service interface, namely, the server request message is processed by calling the service interface to obtain a return message.
The return message is the data requested by the mobile terminal to the server terminal.
Optionally, the step of acquiring the session of the server in this step may include:
step one, determining a corresponding client object in a session mapping table according to a mobile terminal session of a middle layer request message;
and step two, searching the client object to obtain the server session.
In this alternative, there is a session mapping table, where the session mapping table corresponds to a mobile session and a client object, and the client object stores a required server session. Therefore, a corresponding client object is obtained by looking up a table through the session mapping table, and the server session is obtained by cashing through the client.
And S103, performing JSON format conversion processing on the return message according to the request parameter of the server to obtain a JSON format return message, and sending the JSON format return message to the mobile terminal.
On the basis of step S102, since the return message returned by the original program of the server is data returned to the browser, if the data is directly sent to the mobile terminal, an incompatibility may occur, and therefore, in this step, the return message is subjected to format conversion to obtain a JSON format return message.
The format conversion performed in this step is to convert data in an HTML format into data in a JSON format, and any conversion method provided in the prior art may be adopted, and the conversion method provided in the following embodiments may also be adopted, which is not specifically limited herein.
In summary, in this embodiment, the received intermediate layer request message is analyzed to obtain a server session, that is, the message is forwarded, so that the request message of the mobile terminal can keep the same session and send to the server to perform the service request, and further, when the server returns the message, format conversion is performed on the return message so that the mobile terminal receives the return message in a correct format, thereby completing interface service provided by the server to the mobile terminal, avoiding secondary development of the original server, and improving efficiency of the server providing service to the mobile terminal.
On the basis of the previous embodiment, this embodiment mainly provides a specific description on how to perform format conversion of the return message in the previous embodiment, and other parts are substantially the same as those in the previous embodiment, and the same parts may refer to the previous embodiment, which is not described herein again.
The embodiment mainly extracts specific data in the return message, and encapsulates the extracted data into the JSON format, so as to obtain the JSON format return message.
Specifically, please refer to fig. 2, fig. 2 is a flowchart illustrating a format conversion operation of a mobile-side message processing method according to an embodiment of the present application.
The operations may include:
s201, determining corresponding data extraction operation according to a request address of a server request parameter;
due to the fact that the return data are requested to different service interfaces, return requests with different formats can be obtained, wherein the storage format of specific data can also be different, for example, the specific data can be the data stored in the element with a specific ID, and the specific table element can also be obtained. Therefore, in this step, what data extraction operation is used in this step is determined according to the specific request address.
If the request address obtains data of a certain element, such as an ID, a contact address and the like, the data extraction operation is to directly obtain the data element referred by the ID or the contact address, such as the ID of 123456, 1233456 is obtained, or if the ID refers to a specific element, the content in the element is obtained. If the request address obtains data of a certain table, the data extraction operation directly obtains the data in the table, and specifically, the data in the table can be obtained in a circular manner.
S202, performing data extraction operation on the return message to obtain return data;
on the basis of step S201, this step is intended to perform a data extraction operation, resulting in extracted data, i.e., return data.
S203, packaging the returned data in a JSON format to obtain a JSON format returned message;
on the basis of step S202, this step is intended to encapsulate the return data into data in JSON format, resulting in a JSON format return message.
The JSON format is abbreviated as JavaScript Object notification, and is a lightweight data exchange format. The extracted return data is key data extracted from HTML, the data length of the extracted return data is short, the data volume of exchange can be greatly reduced by encapsulating the extracted return data in a JSON format, and meanwhile, the data returned by the server side is made to be adaptive to the mobile side.
And S204, sending the JSON format return message to the mobile terminal.
On the basis of step S203, this step is intended to transmit a JSON format return message to the mobile terminal so that the mobile terminal receives the return message.
In practical application, the method can be expressed in that firstly, a service end URL is associated to an HTML Java analysis implementation class through an XML (Extensible Markup Language) file; after the middle layer receives HTML format data returned by the server, finding a Java implementation class according to the associated information, and calling the implementation class to finish page analysis; and finally, the middle layer encapsulates the analysis result into JSON format data. Because the HTML structures returned by different URLs are different, different analysis logics can be designed for different HTML structures according to the Java implementation classes corresponding to the URL association, and the different HTML structures are adaptive to various page structures.
In the embodiment, the JSON format return message is obtained by extracting the key data in the return message and packaging the key data into the JSON format, so that the data volume of the return message is reduced, the data transmission efficiency is improved, meanwhile, the message returned by the server is adaptive to the mobile terminal, and the secondary development of the original server program is avoided.
The session mapping table in all the above embodiments is specifically described. The middle layer maintains a session mapping table from the session sessionId of the mobile terminal (denoted as sessionId1, i.e. the mobile terminal session) to the http client object, and the http client object records status information including the session sessionId that the server can identify (denoted as sessionId2, i.e. the server session). Receiving the middle layer request message, finding a corresponding http client object in the mapping table, wherein a session sessionId (denoted as sessionId2, namely, a server session) that can be identified by the server is recorded in the http client object, and requesting the browser server by using the http client object, thereby implementing the session sessionId maintenance from the mobile terminal to the server.
The embodiment of the application provides a mobile terminal message processing method, which can request a service terminal session obtained by analyzing a received intermediate layer request message, namely, message forwarding processing, so that the request message of the mobile terminal can keep the same session and send the session to a server for service request, and further, when the server returns the message, format conversion is performed on the returned message so that the mobile terminal receives the returned message in a correct format, the service terminal provides interface service for the mobile terminal, secondary development on an original server is avoided, and efficiency of the server for providing service for the mobile terminal is improved.
Based on all the above embodiments, the present application further provides a mobile terminal service request method, which is mainly described in terms of a mobile terminal.
Specifically, please refer to fig. 3, where fig. 3 is a flowchart of a mobile terminal service request method according to an embodiment of the present application.
The method can comprise the following steps:
s301, the mobile terminal encapsulates the server request message and the server request parameter to obtain a middle layer request message;
the step is to encapsulate the message to be sent and the parameters during sending, namely the server request message and the server request parameters, into the middle layer request message by the mobile terminal.
In practical applications, compared with the common interface call, the interface call through the middle layer needs to perform one-layer packaging on data, that is, the common interface call needs to transmit data a by the mobile terminal, and the interface call through the middle layer needs to transmit data a + data B by the mobile terminal, where the data a is the transmitted information content, and the data B is used to inform the middle layer of the address of the service forwarded to and the HTTP request mode (GET, POST, etc.) used for forwarding.
S302, the intermediate layer request message is sent to a server so that the server can perform message forwarding processing on the intermediate layer request message to obtain a return message, perform JSON format conversion processing on the return message to obtain a JSON format return message, and send the JSON format return message to a mobile terminal;
on the basis of step S301, this step is intended to send the middle tier request message to the server, so that the service processes the middle tier request message to obtain a JSON format return message, and sends the JSON return message to the mobile terminal.
S303, receiving the JSON format return message so as to complete the service request operation.
On the basis of step S302, this step is intended to receive a JSON format return message, completing the service request operation.
In summary, in this embodiment, the received intermediate layer request message is analyzed to obtain a server session, that is, the message is forwarded, so that the request message of the mobile terminal can keep the same session and send to the server to perform the service request, and further, when the server returns the message, format conversion is performed on the return message so that the mobile terminal receives the return message in a correct format, thereby completing interface service provided by the server to the mobile terminal, avoiding secondary development of the original server, and improving efficiency of the server providing service to the mobile terminal.
In the following, a mobile terminal message processing apparatus provided in the embodiments of the present application is introduced, and a mobile terminal message processing apparatus described below and a mobile terminal service request method described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a mobile-end message processing apparatus according to an embodiment of the present disclosure.
The apparatus may include:
the message filtering module 110 is configured to determine whether the intermediate layer request message sent by the mobile terminal meets a processing standard according to a preset white list;
a message forwarding module 120, configured to, when the intermediate layer request message meets the processing standard, perform message forwarding processing on the server request message by using a server session according to the server request parameter, so as to obtain a return message; the server-side session is determined according to the mobile-side session of the intermediate layer request message; the server side request parameters and the server side request messages are obtained by analyzing the intermediate layer request messages;
and the message format conversion module 130 is configured to perform JSON format conversion processing on the return message according to the service end request parameter to obtain a JSON format return message, and send the JSON format return message to the mobile end.
Optionally, the message format conversion module 130 may include:
the data extraction operation determining unit is used for determining corresponding data extraction operation according to the request address of the server request parameter;
the data extraction unit is used for executing data extraction operation on the return message to obtain return data;
the data encapsulation unit is used for carrying out JSON format encapsulation processing on the returned data to obtain a JSON format returned message;
and the return message sending unit is used for sending the JSON format return message to the mobile terminal.
Fig. 5 is a schematic structural diagram of a mobile terminal service request device according to an embodiment of the present application, where fig. 5 is a schematic structural diagram of the mobile terminal service request device according to the present application.
The apparatus may include:
a request message encapsulation module 210, configured to encapsulate the server request message and the server request parameter by the mobile terminal to obtain an intermediate layer request message;
the message sending module 220 is configured to send the middle layer request message to the server, so that the server performs message forwarding processing on the middle layer request message to obtain a return message, performs JSON format conversion processing on the return message to obtain a JSON format return message, and sends the JSON format return message to the mobile terminal;
a return message receiving module 230, configured to receive a JSON format return message to complete the service request operation.
An embodiment of the present application further provides a server, including:
a memory for storing a computer program;
a processor for implementing the steps of the mobile terminal message processing method according to the above embodiment when executing the computer program.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the mobile terminal message processing method according to the above embodiment are implemented.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing detailed description has provided a mobile-side message processing method, a mobile-side service request method, a mobile-side message processing apparatus, a mobile-side service request apparatus, a server, and a computer-readable storage medium, which are provided by the present application. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A method for processing a message at a mobile terminal is characterized by comprising the following steps:
the server judges whether the intermediate layer request message sent by the mobile terminal meets the processing standard or not according to a preset white list;
if so, performing message forwarding processing on the server request message by adopting a server session according to the server request parameter to obtain a return message; the server side session is determined according to the mobile side session of the intermediate layer request message, and the server side request parameter and the server side request message are obtained by analyzing the intermediate layer request message;
and performing JSON format conversion processing on the return message according to the request parameter of the server side to obtain a JSON format return message, and sending the JSON format return message to the mobile terminal.
2. The method of claim 1, wherein the server determines whether the middle layer request message sent by the mobile terminal meets a processing standard according to a preset white list, comprising:
the server extracts the URL of the intermediate layer request message sent by the mobile terminal;
and judging whether the URL is in the preset white list or not.
3. The method according to claim 1, wherein the server session is determined according to the mobile session of the middle layer request message, and the method comprises:
determining a corresponding client object in a session mapping table according to the mobile terminal session of the intermediate layer request message;
and searching the client object to obtain the server session.
4. The method according to any one of claims 1 to 3, wherein the performing JSON format conversion processing on the return message according to the service request parameter to obtain a JSON format return message, and sending the JSON format return message to the mobile terminal includes:
determining corresponding data extraction operation according to the request address of the server request parameter;
executing the data extraction operation on the return message to obtain return data;
performing JSON format packaging processing on the returned data to obtain a JSON format returned message;
and sending the JSON format return message to the mobile terminal.
5. A mobile terminal service request method is characterized by comprising the following steps:
the mobile terminal encapsulates the server request message and the server request parameter to obtain an intermediate layer request message;
sending the intermediate layer request message to a server so that the server performs message forwarding processing on the intermediate layer request message to obtain a return message, performs JSON format conversion processing on the return message to obtain a JSON format return message, and sends the JSON format return message to the mobile terminal;
and receiving the JSON format return message so as to complete the service request operation.
6. A mobile-side message processing apparatus, comprising:
the message filtering module is used for judging whether the intermediate layer request message sent by the mobile terminal meets the processing standard or not according to a preset white list;
the message forwarding module is used for performing message forwarding processing on the request message of the server by adopting the session of the server according to the request parameter of the server when the request message of the middle layer meets the processing standard so as to obtain a return message; the server side session is determined according to the mobile side session of the intermediate layer request message, and the server side request parameter and the server side request message are obtained by analyzing the intermediate layer request message;
and the message format conversion module is used for performing JSON format conversion processing on the return message according to the request parameter of the server side to obtain a JSON format return message and sending the JSON format return message to the mobile terminal.
7. The apparatus of claim 6, wherein the message format conversion module comprises:
the data extraction operation determining unit is used for determining corresponding data extraction operation according to the request address of the server request parameter;
the data extraction unit is used for executing the data extraction operation on the return message to obtain return data;
the data encapsulation unit is used for carrying out JSON format encapsulation processing on the returned data to obtain a JSON format returned message;
and the return message sending unit is used for sending the JSON format return message to the mobile terminal.
8. A mobile-side service request apparatus, comprising:
the request message encapsulation module is used for encapsulating the server request message and the server request parameter to obtain an intermediate layer request message;
the message sending module is used for sending the intermediate layer request message to a server so that the server can perform message forwarding processing on the intermediate layer request message to obtain a return message, perform JSON format conversion processing on the return message to obtain a JSON format return message, and send the JSON format return message to the mobile terminal;
and the return message receiving module is used for receiving the JSON format return message so as to complete the service request operation.
9. A server, comprising:
a memory for storing a computer program;
processor for implementing the steps of the mobile-side message processing method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the steps of the mobile-side message processing method according to any one of claims 1 to 4.
CN201810804919.4A 2018-07-20 2018-07-20 Mobile terminal message processing method and related device Active CN109067860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810804919.4A CN109067860B (en) 2018-07-20 2018-07-20 Mobile terminal message processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810804919.4A CN109067860B (en) 2018-07-20 2018-07-20 Mobile terminal message processing method and related device

Publications (2)

Publication Number Publication Date
CN109067860A CN109067860A (en) 2018-12-21
CN109067860B true CN109067860B (en) 2021-11-09

Family

ID=64834851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810804919.4A Active CN109067860B (en) 2018-07-20 2018-07-20 Mobile terminal message processing method and related device

Country Status (1)

Country Link
CN (1) CN109067860B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110581890B (en) * 2019-09-10 2022-02-22 中国建设银行股份有限公司 Routing method and device for service request
CN110677427B (en) * 2019-10-08 2022-05-24 浪潮软件科技有限公司 Multi-message analysis method
CN112492042B (en) * 2020-12-08 2021-08-13 清华大学 Application program cross-platform system of optical microcavity sensing device
CN112671750A (en) * 2020-12-17 2021-04-16 杭州安恒信息技术股份有限公司 Cross-language data interaction method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810069A (en) * 2012-07-16 2012-12-05 深圳市融创天下科技股份有限公司 JAVA object requesting and responding methods, devices and systems and terminal
CN103607356A (en) * 2013-11-14 2014-02-26 北京奇虎科技有限公司 Load balancing method, load balancer and system thereof
CN105205766A (en) * 2015-08-19 2015-12-30 四川佳缘电子科技有限公司 Mobile Internet hospital attendance system based on cloud platform
CN105554133A (en) * 2015-12-21 2016-05-04 世纪龙信息网络有限责任公司 HTTP remote data access system and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989978A (en) * 2009-08-05 2011-03-23 华为技术有限公司 Method, device and system for forwarding data by real time streaming protocol (RTSP) proxy
CN104268739A (en) * 2014-08-29 2015-01-07 蓝信工场(北京)科技有限公司 Method and system for quickly converting enterprise information system into mobile application
US9921945B2 (en) * 2015-04-06 2018-03-20 Adp, Llc Automatic verification of JSON data
CN105095449A (en) * 2015-07-27 2015-11-25 福州盈展信息技术有限公司 Method for converting HTML webpage to mobile terminal page

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810069A (en) * 2012-07-16 2012-12-05 深圳市融创天下科技股份有限公司 JAVA object requesting and responding methods, devices and systems and terminal
CN103607356A (en) * 2013-11-14 2014-02-26 北京奇虎科技有限公司 Load balancing method, load balancer and system thereof
CN105205766A (en) * 2015-08-19 2015-12-30 四川佳缘电子科技有限公司 Mobile Internet hospital attendance system based on cloud platform
CN105554133A (en) * 2015-12-21 2016-05-04 世纪龙信息网络有限责任公司 HTTP remote data access system and method

Also Published As

Publication number Publication date
CN109067860A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN109067860B (en) Mobile terminal message processing method and related device
CN108289060B (en) Data processing method and device based on RPC service
US8934925B2 (en) Mobile messaging message notifications processing
US8848893B2 (en) Method and apparatus for callback processing in telecommunication capability opening
EP3002927B1 (en) Page redirection method, routing device, terminal device and system
CN101854371B (en) The method called and process of JavaScript object, device
US10164961B2 (en) Dynamic web services server
CN110324405B (en) Message sending method, device, system and computer readable storage medium
WO2020206660A1 (en) Network resource request method and apparatus, electronic device and storage medium
CN111831368A (en) Method, system and storage medium for interaction between browser application and desktop application
CN111639275A (en) Routing information processing method and device, electronic equipment and computer storage medium
CN105141653A (en) Method, equipment and system for data interaction of service platform
CN110913038B (en) IP address determination method, device, server and computer readable storage medium
CN110113298B (en) Data transmission method, device, signaling server and computer readable medium
CN106454403B (en) Data display method, equipment and system
CN106612263B (en) Method and equipment for processing application access request
CN112015383A (en) Login method and device
CN103491393A (en) Video service processing method and device
CN101917476B (en) Hyper text transmission protocol (HTTP) message processing method and client system thereof
CN114500484A (en) Page rendering method and device, electronic equipment and readable medium
CN114553944A (en) Early warning message pushing method and system
CN103347038A (en) Method of WEB server for processing http messages
CN104679786B (en) Form processing method and device
CN108462944B (en) Information processing method and device, and USSDGW
CN112433870A (en) Data calling method and device, computer readable storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20181212

Address after: 250014 No. 41-1 Qianfo Shandong Road, Jinan City, Shandong Province

Applicant after: Shandong CVIC Software Engineering Co., Ltd.

Applicant after: KUNSHAN CVIC SE CO., LTD.

Address before: 250014 No. 41-1 Qianfo Shandong Road, Lixia District, Jinan City, Shandong Province

Applicant before: Shandong CVIC Software Engineering Co., Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant