WO2017092594A1 - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
WO2017092594A1
WO2017092594A1 PCT/CN2016/106879 CN2016106879W WO2017092594A1 WO 2017092594 A1 WO2017092594 A1 WO 2017092594A1 CN 2016106879 W CN2016106879 W CN 2016106879W WO 2017092594 A1 WO2017092594 A1 WO 2017092594A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
update
client
configuration information
server
Prior art date
Application number
PCT/CN2016/106879
Other languages
French (fr)
Chinese (zh)
Inventor
章向明
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017092594A1 publication Critical patent/WO2017092594A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Definitions

  • the present application relates to the field of computer technologies, and in particular, to an information processing method and apparatus.
  • the terminal includes, but is not limited to, a mobile phone, a personal computer, a tablet computer, a smart watch, a radio station, and the like.
  • the client of the application is mounted on the terminal, and the server is mounted on the server or terminal of the application.
  • the client generally contains configuration information, and in the process of using the client, the client may often need to obtain updated configuration information or other configuration information from the server (for convenience)
  • the updated configuration information, the other configuration information may be collectively referred to as: update information of configuration information, to implement update and function upgrade to the client.
  • the configuration information of the client of the information card application, and the update information of the configuration information include, but are not limited to, an interface template, global application setting information, a scene engine rule, menu information, and the like.
  • the client can obtain the update information of the configuration information from the server by using a timing clock scheme.
  • the client may start a timing thread, and periodically invoke an interface provided by the server for updating the configuration information to request whether the update information of the configuration information is requested, and after the server receives the request, when the query has When the information is updated, the update information is returned to the client.
  • the timing thread will always occupy part of the resources of the client, and the burden on the client is large.
  • the embodiment of the present invention provides an information processing method and device, which are used to solve the problem that the client obtains the update information of the configuration information in the prior art, which causes a large burden on the client.
  • a service request including the status information according to an interface call request generated by the client for the at least one service interface provided by the server, and status information of the configuration information on the client;
  • a generating module configured to generate a service request including the status information according to an interface call request generated by the client for at least one service interface provided by the server, and status information of the configuration information on the client;
  • a sending module configured to send the service request to the server.
  • the embodiment of the present application provides another information processing method and apparatus for solving the problem that the client obtains the update information of the configuration information in the prior art, which causes a large burden on the client.
  • the service request includes an interface call request of the client for at least one service interface provided by the server, and status information of the configuration information on the client;
  • a receiving module configured to receive a service request sent by the client, where the service request includes an interface call request of the client for the at least one service interface provided by the server, and status information of the configuration information on the client ;
  • a returning module configured to: according to the status information included in the service request, determine and return update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
  • An embodiment of the present application provides a terminal, including:
  • a memory for storing processor executable instructions
  • a processor coupled to the memory for reading the executable instructions stored by the memory, and in response, performing an operation of: invoking a request according to an interface generated by the client for at least one service interface provided by the server, And the status information of the configuration information on the client, generating a service request including the status information; and sending the service request to the server.
  • An embodiment of the present application provides another terminal, including:
  • a memory for storing processor executable instructions
  • a processor coupled to the memory for reading executable instructions stored by the memory, and in response, performing an operation of: receiving a service request sent by a client, wherein the service request includes the client for a service An interface call request of at least one service interface provided by the terminal, and status information of the configuration information on the client; Determining and returning update indication information to the client according to the status information included in the service request, where the update indication information is used to indicate update information of the configuration information.
  • the embodiment of the present application can obtain the update information of the configuration information by using any of the existing service interfaces by using the foregoing at least one technical solution, without separately maintaining a timing thread for obtaining the update information, thereby reducing the client's burden.
  • FIG. 1 is a flowchart of an information processing method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an implementation manner and a working mode of a proxy unit on a client in an actual application scenario according to an embodiment of the present application;
  • FIG. 3 is a flowchart of another information processing method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of interaction between a client and a server when the information processing method is implemented in an actual application scenario according to an embodiment of the present application;
  • FIG. 5 is a schematic structural diagram of a system applicable to implementing the information processing method according to an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 1 according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 3 according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a terminal corresponding to FIG. 1 according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a terminal corresponding to FIG. 3 according to an embodiment of the present application.
  • the server of the application may provide more than one service for the client of the application.
  • the services provided by the server include, but are not limited to, querying a communication message, transmitting a communication message, querying a public information of a specified communication account, transmitting a file, and the like.
  • services provided by the server include, but are not limited to, video on demand, live video, offline download, and the like.
  • the server may provide a service interface for obtaining the service to the client in advance for each service.
  • the client may generate an interface call request for the service interface, and send the request to the server through the service interface.
  • the server uses the interface implementation unit corresponding to the service interface to process the call request of the interface, and then returns the service to the client. It can be seen that the service interface corresponding to each service already exists, and there is a corresponding service process to provide resource support for the service interface.
  • the embodiment of the present application by using the existing service interfaces and the corresponding service processes, not only the corresponding services but also some additional transactions can be processed, so that the interfaces and processes are not separately provided for the additional transactions. In this way, not only can the burden on the server and the client be alleviated, but also additional network calls can be reduced, wherein the additional transaction can at least include the client to obtain update information of the configuration information on itself.
  • the embodiment of the present application is mainly described based on this situation.
  • FIG. 1 is a process of an information processing method according to an embodiment of the present disclosure.
  • the execution body of the information processing method may be: an application client, or a terminal equipped with the client.
  • the terminal includes but is not limited to: a personal computer, a mobile phone, a tablet computer, a smart watch, a car mobile station, and the like.
  • the executor of the present invention is not limited to the present application.
  • the embodiments corresponding to FIG. 1 are described by taking the execution subject as a client as an example.
  • the process in FIG. 1 may specifically include the following steps:
  • S101 Generate a service request including the status information according to an interface call request generated by the client for at least one service interface provided by the server, and status information of the configuration information on the client.
  • the client when receiving the service acquisition instruction, the client generates an interface call request for at least one service interface provided by the server.
  • the service obtaining instruction may be: an instruction for instructing the client to obtain any service provided by the server from the server.
  • the triggering factor of the action of “receiving the service acquisition instruction” is not limited in the embodiment of the present application. In an actual application, the action may be triggered by the user's operation on the client, or may be automatically performed by the client according to the preset service logic. trigger.
  • a user may edit a communication message in the application interface and click the "send" button to send the communication message to another user.
  • the client receives a service acquisition instruction, and the service acquisition instruction is used to instruct the client to transmit the "communication message" from the server.
  • the service interface corresponding to the service obtains the service.
  • the interface call request may include an interface function of the at least one service interface, and a call parameter of the interface function, where the call parameter may be specified by a service acquisition instruction, or may be The user enters it in real time on the client.
  • the update information of the configuration information on the client may be acquired at the same time. Therefore, the interface call request may not be directly sent to the server, but is directed to the service.
  • the interface and/or the interface call request performs specific processing to add additional information required to obtain the update information (ie, status information of the configuration information on the client), and then send the request generated after the specific processing to the server.
  • the specific processing may include at least two types, and the two are separately described below.
  • the service interface unit for generating an interface call request on the client may be modified in advance to add processing logic including the state information, so that the modified service interface unit may generate the inclusion
  • the interface of the status information invokes the request and sends it to the server.
  • the first method of processing does not change the structure of the units on the client.
  • the second type that is, the processing method corresponding to step S101.
  • the proxy unit may be added to the client in advance, and the client may transmit the generated interface call request to the proxy unit, where the proxy unit performs step S101, and the generated service request including the status information may be sent.
  • the second processing method has a lower implementation cost and has less impact on the existing interfaces on the client and the server.
  • the client After the client of the application is installed, the client generally contains configuration information, and during the process of using the client, the client may often need to obtain updated configuration information or other configuration information from the server (for convenience of description,
  • the updated configuration information, the other configuration information may be collectively referred to as: update information of the configuration information, to implement update and function upgrade to the client.
  • the format, file type, and specific content of the configuration information and the update information of the configuration information are not limited.
  • the configuration information and the update information of the configuration information may be: an interface template, global application setting information, a scenario engine rule, menu information, an additional content download package, an application patch, and the like.
  • the service request may be sent to the server by using the at least one service interface mentioned in step S101 or other service interfaces provided by the server.
  • the server may return the update indication information to the client according to the state information included in the service information, so that the client obtains the update of the configuration information according to the update indication information. information.
  • the update indication information may be used to indicate whether there is update information of configuration information, and which update information is available, and the like.
  • the update indication information may be update information of the configuration information, may be an identifier of update information of the configuration information, or may be a download address of update information of the configuration information, and the like.
  • the update information may be carried in the update indication information, and the client may directly obtain the update information from the update indication information, so as to reduce the relationship between the client and the server.
  • the number of message interactions saves network resources.
  • the identifier of the update information may be carried in the update indication information, and the subsequent client may download the update information from the server when the network is idle or at other specified times according to the identifier of the update information.
  • the success rate of obtaining update information can be improved, and the burden on the client can be reduced.
  • the client can obtain the update information of the configuration information by using any existing service interface, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client, wherein the burden includes Consumption of resources such as processor resources, memory resources, and power resources.
  • the above method can trigger the triggering action of the query and the update information of the configuration information into the interaction process between the client and any service interface provided by the server, therefore, no additional server-oriented is added.
  • the network calls, and can also obtain the update information in a relatively timely manner, without having to wait for the timing thread to trigger the acquisition of the update information as in the prior art.
  • the client may be triggered to send a service request to the server, and the server successfully responds to the service request. After that, the client can not only obtain the "transport communication message” service provided by the server, but also obtain the update information of the configuration information.
  • the client may obtain the update information of the configuration information by using the above method in the process of acquiring any service, or , to complete other additional transactions.
  • the status information included in the service request may be any information that can be used to enable the server to determine whether the configuration information on the client has update information.
  • the status information may be the latest update time of the configuration information, or may be an identifier of the configuration information, and the like.
  • the configuration information is an interface template as an example.
  • the configuration information on the client includes two interface templates, namely the interface template 1 and the interface template. 2", wherein the time when the client downloads the two interface templates is January 1, 2014.
  • the status information of the configuration information may be "interface template 1" and "interface template 2", and the server according to the status information You can query whether the interface template is not saved on the client.
  • the status information of the configuration information can also be the time of January 1, 2014.
  • the server can query the server to update after the time according to the time.
  • the interface template that is, the interface template that is not on the client.
  • the server generates the client and returns the update indication information, where the update indication information may be the updated interface template, or the name of the updated interface template, etc. Wait.
  • the status information may be included in the service request in a different manner.
  • the status information is saved by the predetermined field of the service request, included in the service request, or the status information may be written into a file or message, and the service request carries a file or message in which the status information is written.
  • the former solution has a small implementation cost, and the latter solution can further encrypt the file or message of the state information to improve information security, and can select a more suitable solution according to the actual application scenario.
  • the description is mainly based on the former solution.
  • the interface call request in step S101 may include an interface function of the at least one service interface, and a call parameter of the interface function.
  • the service request including the status information is generated according to the interface call request generated by the client and the at least one service interface provided by the server, and the status information of the configuration information on the client is generated.
  • the method includes: determining a proxy implementation class corresponding to the interface call request, where the proxy implementation class is generated according to the interface function and the predetermined field; and according to the proxy implementation class, the call parameter of the interface function
  • the status information generates a service request including the status information. It should be noted that, the embodiment of the present application does not limit information such as the name, the number of bytes, and the like of the predetermined field.
  • different interface call requests may correspond to different agent implementation classes, and the proxy implementation class may be modified or extended based on the function of the original interface on the client, and does not affect the original interface. logic.
  • the service request is used to request acquisition from the server: the service corresponding to the interface function, and the update information of the configuration information on the client.
  • the embodiment of the present application does not limit the generation manner of the generation proxy implementation class, and may be generated by a preset proxy unit on the client, or may be generated by any unit already existing on the client.
  • the service request can be a request; it can also be a request consisting of at least two sub-requests, where one sub-request can be used to request the service, another sub-request can be used to request the update information, and so on.
  • at least two sub-requests included in the service request are simultaneously sent to the server, and at least two sub-requests may be separately sent to the server according to a predetermined sending sequence.
  • the embodiment of the present application does not limit the predetermined sending sequence.
  • the service request including the status information may include: converting, according to the agent implementation class, a call parameter of the interface function, generating a service parameter; acquiring the state information, and saving the State information; generating a service request including the state information according to the agent implementation class, the service parameter, and the predetermined field in which the state information is saved.
  • the operations involved in the conversion process include, but are not limited to, a mapping operation, a packaging operation, a parameter modification operation, a permission modification operation, and the like.
  • the embodiment of the present application does not limit the unit responsible for managing, maintaining, and using the predetermined field on the client, and may be responsible for the agent unit, or may be responsible for other units.
  • step S101 can be implemented by the proxy unit, so that the client can manage the sending process of each interface call request.
  • the implementation manner of the proxy unit in the embodiment of the present application is not limited.
  • the following describes an implementation manner of the proxy unit that can be used in an actual application scenario, and an example of the working mode of the proxy unit.
  • the proxy unit runs on the client, assuming that there are two interface functions defined in a service interface provided by the server, as follows:
  • the implementation and working mode of the proxy unit may specifically include the following steps (the execution entity of each step may be the proxy unit):
  • S201 Construct a factory class, wherein the factory class includes a function for creating a proxy implementation class.
  • TPSClient client TPSClient.getTpsClient()
  • Client.getService ("com.yunos.item.service.ItemQueryService", ItemQueryService.class);
  • the factory class can be TPSClient, and the function can be TPSClient.getTpsClient().
  • S202 Create a corresponding proxy implementation class for the service interface according to the function.
  • the service interface may be an ItemQueryService, and the proxy implementation class created is an agent implementation class corresponding to an interface call request of the service interface.
  • S203 Construct a request object in the proxy implementation class according to the received interface call request, where the request object is used to deliver information related to an interface call request for a service interface.
  • the request object may be req, and the related information may be a call parameter, an interface function, or the like.
  • the calling parameter may be converted into a HyperText Transfer Protocol (http) request parameter, where the parameter is a json string generated by the call parameter conversion.
  • http HyperText Transfer Protocol
  • S205 Acquire status information of the configuration information on the client.
  • the latest update time may be saved and delivered through a predetermined field (such as the gmtFlag field).
  • the server may send a default value, such as 0.
  • S206 Generate a service request including the status information according to the proxy implementation class, the request parameter, and the status information.
  • S207 Send the service request to the server through the service interface.
  • the server may parse the interface call request according to the service request, and then return the corresponding service to the client through the implementation unit of the service interface; on the other hand, according to the service request
  • the included status information determines the update indication information and returns to the client, so that the client obtains the update information of the configuration information according to the update indication information.
  • step S102 the step of transmitting the service request to the server may further perform the following steps: receiving update indication information returned by the server according to the state information included in the service request;
  • the update indication information acquires update information of the configuration information.
  • the server receives the configuration information including After the service request of the latest update time (referred to as: client update time for convenience of description), the client update time may be updated with the latest update time of the configuration information saved by the server (for convenience of description, it is called: server) Update time) for comparison. If the server update time is greater than the client update time, the server may save the update information that the client has not obtained, and the server may return the update information or the update information as the update indication information to the client. If the server update time is not greater than the client update time, it may indicate that the server does not save the update information that the client has not obtained yet, that is, the configuration information on the client is up to date, and no update is needed at present. The update indication information returned by the server to the client may also be used to inform the client that the configuration information does not need to be updated.
  • the update indication information may include: an identifier of the update information of the configuration information, or an update information of the configuration information; and the like.
  • the obtaining the update information of the configuration information according to the update indication information may specifically include: according to the identifier of the update information of the configuration information, The server acquires update information of the configuration information.
  • the obtaining the update information of the configuration information according to the update indication information may include: acquiring the configuration information from the update indication information. Update information.
  • the embodiment of the present application further provides another information processing method corresponding to FIG. 1, and the other information processing.
  • the method is described from the perspective of the server, as shown in Figure 3.
  • FIG. 3 is a process of another information processing method according to an embodiment of the present disclosure.
  • the execution body of the other information processing method may be: a server of an application, or a terminal or a server on which the server is equipped.
  • the executor of the present invention is not limited to the present application. For the convenience of description, each embodiment corresponding to FIG. 3 is described by taking the execution subject as the server.
  • the process in FIG. 3 may specifically include the following steps:
  • S301 Receive a service request sent by the client, where the service request includes an interface call request of the client for the at least one service interface provided by the server, and status information of the configuration information on the client.
  • S302 Determine, according to the status information included in the service request, return update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
  • the server may return the corresponding service by the service interface implementation unit corresponding to the service interface that receives the service request; on the other hand, the status information included in the service request may be determined.
  • Update the indication information, or the service interface can also transmit the status information to the preset message on the server.
  • the processing unit determines the update indication information according to the status information and returns the information to the client, so that the client obtains the update information of the configuration information according to the update indication information.
  • the client can obtain update information of the configuration information by using any service interface provided by the server, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client and reducing the service.
  • the step of determining the update indication information according to the status information included in the service request may be included in the service request.
  • the included status information is delivered to a preset message processing unit on the server, so that the message processing unit determines the update indication information according to the status information.
  • the delivery manner adopted by the embodiment of the present application for “delivering the status information to a preset message processing unit on the server” is not limited.
  • a message including the status information may be constructed, and the message is sent to the message processing unit.
  • the message may be sent to the message processing unit in an asynchronous manner.
  • the message processing unit may specifically be an asynchronous message processing unit.
  • the service interface may also send related information such as the identity of the client to the message processing unit, so that the message processing unit can correctly return the generated update indication information to the client.
  • related information such as the identity of the client to the message processing unit, so that the message processing unit can correctly return the generated update indication information to the client.
  • the status information may include: the latest update time of the configuration information on the client, or an identifier of the configuration information on the client.
  • the update indication information may be determined according to the status information according to the following method: when determining the latest update of the configuration information on the server When the time is greater than the latest update time of the configuration information on the client, the update information of the configuration information that is updated after the latest update time of the configuration information of the server on the client is determined; according to the update The information generation update indication information, wherein the update indication information includes an identifier of the update information or the update information;
  • the update indication information may be determined according to the status information according to the following method: when it is determined that the corresponding identifier and the location exist on the server When the configuration information of the configuration information on the client is different from the configuration information, the determined configuration information is used as update information of the configuration information on the client; and the update indication information is generated according to the update information, where the update The indication information includes an identifier of the update information or the update information.
  • the service interface and/or the message processing unit may push (Push) message through a long connection.
  • the method returns the update indication information to the client, where the long connection Push message channel can be used by only one application, or can be shared by multiple applications.
  • the update indication information includes the identifier of the update information, and the update information is not included, the client does not directly obtain the update information, and the client may receive the update indication information, and then according to the identifier of the update information, Through the long connection Push message channel, or other channels, the update information is obtained from the server.
  • the client obtains the update information through the other channels
  • the information transmission burden of the long-connected Push message channel can be reduced, and the long-connected Push message channel is prevented from being occupied for a long time.
  • the client and the server can also target the other.
  • the message channel implements the specified security mechanism to improve the reliability of the client to obtain updated information.
  • the embodiment of the present application further provides a schematic diagram of the interaction between the client and the server when the information processing method is implemented in an actual application scenario. As shown in FIG. 4, the interaction may specifically include the following steps:
  • S401 The client receives a service acquisition instruction.
  • the client generates an interface call request for the at least one service interface provided by the server according to the service obtaining instruction.
  • S403 The client delivers the interface call request to the preset proxy unit on the client.
  • S404 The proxy unit acquires state information of the configuration information on the client.
  • the proxy unit generates a service request including the status information according to the interface call request and the status information.
  • S406 The proxy unit sends the service request to the server through the service interface.
  • the service interface processes the service request by using a corresponding service interface implementation unit to return a corresponding service to the client.
  • the service interface sends the status information included in the service request to the asynchronous message processing unit on the server by using an asynchronous message.
  • the asynchronous message processing unit determines, as the update indication information, the identifier of the update information of the configuration information that is updated by the server after the client update time when it is determined that the server update time is greater than the client update time included in the state information.
  • the asynchronous message processing unit returns the update indication information to the client through the long connection Push channel.
  • the client obtains the update information of the configuration information on the configuration client from the server according to the identifier of the update information in the update indication information.
  • the embodiment of the present application further provides a schematic structural diagram of a system suitable for implementing the information processing method in a practical application scenario, as shown in FIG. 5 .
  • the client and the server respectively contain several units. It should be noted that FIG. 5 is only one type. For an example of the system structure, in the actual application, the units in FIG. 5 may also be combined and/or split. The embodiment of the present application is not limited.
  • the public request proxy unit and the public return proxy unit may constitute the proxy unit described in the embodiment of the present application, and the working process of the system is as follows:
  • the service interface calling unit After receiving the service acquisition instruction, the service interface calling unit passes the corresponding interface function and the calling parameter to the public request proxy unit;
  • the public request proxy unit generates a service request according to the interface function, the calling parameter, and status information of the configuration information on the client;
  • the public request proxy unit sends the service request to the server through the corresponding service interface;
  • the service interface processes the service request through the service interface implementation unit, and returns a corresponding service to the client;
  • the service interface generates a message containing the status information according to the status information included in the service request, and delivers the message to the asynchronous message processing unit in an asynchronous manner;
  • the asynchronous message processing unit sends the update information of the configuration information as the update indication information to the client through the long connection Push message channel according to the received message;
  • the client receives the update indication information through the Push message receiving unit, and obtains the update information of the configuration information by using the configuration information query interface calling unit and the configuration information query interface implementation unit of the server according to the identifier of the update message;
  • the configuration information query interface calling unit passes the update information of the configuration information to the public return proxy unit, so that the client updates the configuration information.
  • the public return proxy unit can be used to record status information of the configuration information.
  • the embodiment of the present application further provides a corresponding information processing apparatus, as shown in FIG. 6 and FIG. 7.
  • FIG. 6 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 1 according to an embodiment of the present application, specifically including:
  • the generating module 601 is configured to generate a service request including the status information according to an interface call request generated by the client for the at least one service interface provided by the server, and status information of the configuration information on the client.
  • the sending module 602 is configured to send the service request to the server.
  • the client can obtain the update information of the configuration information by using any existing service interface, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client.
  • the status information includes: a latest update time of the configuration information on the client, or an identifier of the configuration information on the client.
  • the status information is saved by a predetermined field of the service request and included in the service request.
  • the interface call request includes an interface function of the at least one service interface, and a call of the interface function parameter;
  • the generating module 601 is specifically configured to: determine a proxy implementation class corresponding to the interface call request, where the proxy implementation class is generated according to the interface function and the predetermined field; The calling parameter of the interface function and the state information generate a service request including the state information.
  • the generating module 601 is specifically configured to: convert, according to the proxy implementation class, a call parameter of the interface function, generate a service parameter; acquire the state information, and save the state information by using the predetermined field;
  • the agent implementation class, the service parameter, and the predetermined field in which the state information is saved, generates a service request including the state information.
  • the device may further include:
  • the obtaining module 603 is configured to: after the sending module 601 sends the service request to the server, receive the update indication information returned by the server according to the state information included in the service request; The update indication information acquires update information of the configuration information.
  • the update indication information includes: an identifier of the update information of the configuration information, or an update information of the configuration information;
  • the sending module is specifically configured to: obtain the update information of the configuration information from the server according to the identifier of the update information of the configuration information. ;
  • the sending module is specifically configured to: obtain the update information of the configuration information from the update indication information.
  • the specific device shown in FIG. 6 above may be located on the client.
  • FIG. 7 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 3 according to an embodiment of the present disclosure, which specifically includes:
  • the receiving module 701 is configured to receive a service request sent by the client, where the service request includes an interface call request of the client for the at least one service interface provided by the server, and a status of the configuration information on the client. information;
  • the returning module 702 is configured to determine, according to the status information included in the service request, returning update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
  • the client can obtain the update information of the configuration information by using any existing service interface, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client.
  • the returning module 702 is specifically configured to: pass the status information included in the service request to a preset message processing unit on the server, so that the message processing unit determines an update according to the status information. Instructions.
  • the status information includes: a latest update time of the configuration information on the client, or the client Identification of the configuration information;
  • the returning module 702 determines the update indication information according to the status information according to the following method:
  • the server When it is determined that the latest update time of the configuration information on the server is greater than the latest update time of the configuration information on the client, determining that the server updates after the latest update time of the configuration information on the client
  • the update information of the configuration information is generated, and the update indication information is generated according to the update information, where the update indication information includes an identifier of the update information or the update information;
  • the returning module 702 determines the update indication information according to the status information according to the following method:
  • the determined configuration information is used as update information of the configuration information on the client;
  • the update information generates update indication information, wherein the update indication information includes an identifier of the update information or the update information.
  • the specific device shown in FIG. 7 above may be located on the server.
  • the embodiment of the present application further provides a corresponding terminal, as shown in FIG. 8 and FIG. 9.
  • FIG. 8 is a schematic diagram of a terminal corresponding to FIG. 1 according to an embodiment of the present disclosure, specifically including:
  • a memory 801 configured to store processor executable instructions
  • the processor 802 is coupled to the memory for reading the executable instructions stored by the memory, and in response, performing an operation of: invoking a request according to an interface generated by the client for at least one service interface provided by the server And status information of the configuration information on the client, generating a service request including the status information; and transmitting the service request to the server.
  • FIG. 9 is a schematic diagram of a terminal corresponding to FIG. 3 according to an embodiment of the present disclosure, specifically including:
  • a memory 901 configured to store processor executable instructions
  • a processor 902 coupled to the memory, for reading the executable instructions stored by the memory, and in response, performing an operation of: receiving a service request sent by a client, wherein the service request includes the client An interface call request of the at least one service interface provided by the server, and status information of the configuration information on the client; determining, according to the status information included in the service request, and returning update indication information to the client And the update indication information is used to indicate update information of the configuration information.
  • the terminal in FIG. 9 can be used as a server.
  • embodiments of the present invention can be provided as a method, system, or computer program product.
  • the present invention can be implemented in an entirely hardware embodiment, an entirely software embodiment, or in combination with software and hardware.
  • the invention can 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, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, 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 disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated numbers. According to the signal and carrier.

Abstract

Disclosed in the present application are an information processing method and device, the method comprising: generating a service request containing state information according to an interface call request of at least one service interface generated at a client and provided for a server, and the state information of configuration information at the client, and; sending the service request to the server. By virtue of the present application, the client can obtain update information of the configuration information by using any existing service interface, eliminating the need of maintaining a separate timing thread for obtaining the update information, thus lessening the burden on the client.

Description

一种信息处理方法及装置Information processing method and device
本申请要求2015年12月03日递交的申请号为201510881312.2、发明名称为“一种信息处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。Priority is claimed on Japanese Patent Application No. 201510881312.2, the entire disclosure of which is hereby incorporated by reference in its entirety in its entirety in the the the the the the the the the the
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种信息处理方法及装置。The present application relates to the field of computer technologies, and in particular, to an information processing method and apparatus.
背景技术Background technique
在互联网时代,随着终端的普及,各类应用的数量也大大增加,给人们的日常生活和工作带来了便利。所述终端包括但不限于:手机、个人计算机、平板电脑、智能手表、车载台,等等。In the Internet age, with the popularity of terminals, the number of applications has also increased greatly, bringing convenience to people's daily lives and work. The terminal includes, but is not limited to, a mobile phone, a personal computer, a tablet computer, a smart watch, a radio station, and the like.
一般地,应用的客户端搭载于终端上,而服务端搭载于该应用的服务器或终端上。在终端上安装应用的客户端后,该客户端一般会包含有配置信息,而在使用该客户端的过程中,该客户端可能经常需要从服务端获取更新的配置信息或其他配置信息(为了便于描述,所述更新的配置信息、所述其他配置信息可以统称为:配置信息的更新信息),以实现对客户端的更新和功能升级。Generally, the client of the application is mounted on the terminal, and the server is mounted on the server or terminal of the application. After the client of the application is installed on the terminal, the client generally contains configuration information, and in the process of using the client, the client may often need to obtain updated configuration information or other configuration information from the server (for convenience) The updated configuration information, the other configuration information may be collectively referred to as: update information of configuration information, to implement update and function upgrade to the client.
例如,对于某种信息卡片应用,该信息卡片应用的客户端的配置信息,以及该配置信息的更新信息包括但不限于:界面模板、全局应用设置信息、场景引擎规则、菜单信息,等等。For example, for a certain information card application, the configuration information of the client of the information card application, and the update information of the configuration information include, but are not limited to, an interface template, global application setting information, a scene engine rule, menu information, and the like.
在现有技术中,客户端可以采用定时时钟方案,从服务端获取配置信息的更新信息。具体的,客户端可以启动一个定时线程,定时调用服务端提供的、用于更新配置信息的接口,以请求查询是否有该配置信息的更新信息,则服务端接收到请求后,当查询到有更新信息时,将该更新信息返回给客户端。In the prior art, the client can obtain the update information of the configuration information from the server by using a timing clock scheme. Specifically, the client may start a timing thread, and periodically invoke an interface provided by the server for updating the configuration information to request whether the update information of the configuration information is requested, and after the server receives the request, when the query has When the information is updated, the update information is returned to the client.
但是,在采用现有技术的情况下,客户端启动后,所述定时线程会一直占用客户端部分资源,客户端的负担较大。However, in the case of the prior art, after the client is started, the timing thread will always occupy part of the resources of the client, and the burden on the client is large.
发明内容Summary of the invention
本申请实施例提供一种信息处理方法及装置,用以解决现有技术中的客户端获取配置信息的更新信息的方法,导致客户端的负担较大的问题。The embodiment of the present invention provides an information processing method and device, which are used to solve the problem that the client obtains the update information of the configuration information in the prior art, which causes a large burden on the client.
本申请实施例提供的一种信息处理方法,包括: An information processing method provided by the embodiment of the present application includes:
根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;Generating a service request including the status information according to an interface call request generated by the client for the at least one service interface provided by the server, and status information of the configuration information on the client;
将所述服务请求发送给所述服务端。Sending the service request to the server.
本申请实施例提供的一种信息处理装置,包括:An information processing apparatus provided by an embodiment of the present application includes:
生成模块,用于根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;a generating module, configured to generate a service request including the status information according to an interface call request generated by the client for at least one service interface provided by the server, and status information of the configuration information on the client;
发送模块,用于将所述服务请求发送给所述服务端。And a sending module, configured to send the service request to the server.
本申请实施例提供另一种信息处理方法及装置,用以解决现有技术中的客户端获取配置信息的更新信息的方法,导致客户端的负担较大的问题。The embodiment of the present application provides another information processing method and apparatus for solving the problem that the client obtains the update information of the configuration information in the prior art, which causes a large burden on the client.
本申请实施例提供的另一种信息处理方法,包括:Another information processing method provided by the embodiment of the present application includes:
接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息;Receiving a service request sent by the client, where the service request includes an interface call request of the client for at least one service interface provided by the server, and status information of the configuration information on the client;
根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。Determining and returning update indication information to the client according to the status information included in the service request, where the update indication information is used to indicate update information of the configuration information.
本申请实施例提供的另一种信息处理装置,包括:Another information processing apparatus provided by the embodiment of the present application includes:
接收模块,用于接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息;a receiving module, configured to receive a service request sent by the client, where the service request includes an interface call request of the client for the at least one service interface provided by the server, and status information of the configuration information on the client ;
返回模块,用于根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。And a returning module, configured to: according to the status information included in the service request, determine and return update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
本申请实施例提供一种终端,包括:An embodiment of the present application provides a terminal, including:
存储器,用于存储处理器可执行指令;a memory for storing processor executable instructions;
处理器,耦合到所述存储器,用于读取所述存储器存储的可执行指令,作为响应,执行如下操作:根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;将所述服务请求发送给所述服务端。a processor coupled to the memory for reading the executable instructions stored by the memory, and in response, performing an operation of: invoking a request according to an interface generated by the client for at least one service interface provided by the server, And the status information of the configuration information on the client, generating a service request including the status information; and sending the service request to the server.
本申请实施例提供另一种终端,包括:An embodiment of the present application provides another terminal, including:
存储器,用于存储处理器可执行指令;a memory for storing processor executable instructions;
处理器,耦合到所述存储器,用于读取所述存储器存储的可执行指令,作为响应,执行如下操作:接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息; 根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。a processor coupled to the memory for reading executable instructions stored by the memory, and in response, performing an operation of: receiving a service request sent by a client, wherein the service request includes the client for a service An interface call request of at least one service interface provided by the terminal, and status information of the configuration information on the client; Determining and returning update indication information to the client according to the status information included in the service request, where the update indication information is used to indicate update information of the configuration information.
本申请实施例通过上述至少一种技术方案,客户端可以利用已有的任一服务接口获取配置信息的更新信息,而不需要为了获取该更新信息单独维护一个定时线程,因此,可以减轻客户端的负担。The embodiment of the present application can obtain the update information of the configuration information by using any of the existing service interfaces by using the foregoing at least one technical solution, without separately maintaining a timing thread for obtaining the update information, thereby reducing the client's burden.
附图说明DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:
图1为本申请实施例提供的信息处理方法的过程;FIG. 1 is a flowchart of an information processing method according to an embodiment of the present application;
图2为本申请实施例提供的,在一种实际应用场景下,客户端上的代理单元的实现方式和工作方式;FIG. 2 is a schematic diagram of an implementation manner and a working mode of a proxy unit on a client in an actual application scenario according to an embodiment of the present application;
图3为本申请实施例提供的另一种信息处理方法的过程;FIG. 3 is a flowchart of another information processing method according to an embodiment of the present application;
图4为本申请实施例提供的,在一种实际应用场景下,实施所述信息处理方法时,客户端和服务端的交互示意图;FIG. 4 is a schematic diagram of interaction between a client and a server when the information processing method is implemented in an actual application scenario according to an embodiment of the present application;
图5为本申请实施例提供的,在一种实际应用场景下,适用于实施所述信息处理方法的系统结构示意图;FIG. 5 is a schematic structural diagram of a system applicable to implementing the information processing method according to an embodiment of the present application;
图6为本申请实施例提供的对应于图1的信息处理装置结构示意图;FIG. 6 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 1 according to an embodiment of the present disclosure;
图7为本申请实施例提供的对应于图3的信息处理装置结构示意图;FIG. 7 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 3 according to an embodiment of the present application;
图8为本申请实施例提供的对应于图1的终端示意图;FIG. 8 is a schematic diagram of a terminal corresponding to FIG. 1 according to an embodiment of the present application;
图9为本申请实施例提供的对应于图3的终端示意图。FIG. 9 is a schematic diagram of a terminal corresponding to FIG. 3 according to an embodiment of the present application.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions of the present application will be clearly and completely described in the following with reference to the specific embodiments of the present application and the corresponding drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
在本申请实施例中,对于任一应用,该应用的服务端可以为该应用的客户端提供不止一项服务。In the embodiment of the present application, for any application, the server of the application may provide more than one service for the client of the application.
例如,对于即时通讯应用,服务端提供的服务包括但不限于:查询通讯消息、传输通讯消息、查询指定通讯账号的公开信息、传输文件,等等。 For example, for an instant messaging application, the services provided by the server include, but are not limited to, querying a communication message, transmitting a communication message, querying a public information of a specified communication account, transmitting a file, and the like.
又例如,对于视频应用,服务端提供的服务包括但不限于:视频点播、视频直播、视频离线下载,等等。For another example, for a video application, services provided by the server include, but are not limited to, video on demand, live video, offline download, and the like.
服务端可以预先针对每项服务,向客户端提供用于获取该项服务的服务接口,相应的,客户端可以生成针对该服务接口的接口调用请求,并通过该服务接口发送给服务端,则服务端通过该服务接口对应的接口实现单元,对该接口调用请求进行处理,进而可以向客户端返回该项服务。可以看到,各项服务对应的服务接口是已经存在的,且有相应的服务进程为服务接口提供资源支持。The server may provide a service interface for obtaining the service to the client in advance for each service. Correspondingly, the client may generate an interface call request for the service interface, and send the request to the server through the service interface. The server uses the interface implementation unit corresponding to the service interface to process the call request of the interface, and then returns the service to the client. It can be seen that the service interface corresponding to each service already exists, and there is a corresponding service process to provide resource support for the service interface.
在本申请实施例中,利用这些已经存在的服务接口和对应的服务进程,不仅可以获得对应的服务,还可以处理一些额外的事务,从而可以不用为所述额外的事务单独提供接口和进程,这样的话,不仅可以减轻服务端和客户端的负担,也可以减少额外的网络调用,其中,所述额外的事务至少可以包括客户端获取自身上的配置信息的更新信息。本申请实施例主要基于这种情况进行详细说明。In the embodiment of the present application, by using the existing service interfaces and the corresponding service processes, not only the corresponding services but also some additional transactions can be processed, so that the interfaces and processes are not separately provided for the additional transactions. In this way, not only can the burden on the server and the client be alleviated, but also additional network calls can be reduced, wherein the additional transaction can at least include the client to obtain update information of the configuration information on itself. The embodiment of the present application is mainly described based on this situation.
图1为本申请实施例提供的信息处理方法的过程,所述信息处理方法的执行主体可以是:应用的客户端,或者,搭载有所述客户端的终端。其中,所述终端包括但不限于:个人计算机、手机、平板电脑、智能手表、车载移动台等。所述的执行主体并不构成对本申请的限定,为了便于描述,图1对应的各实施例均以执行主体是客户端为例进行说明。FIG. 1 is a process of an information processing method according to an embodiment of the present disclosure. The execution body of the information processing method may be: an application client, or a terminal equipped with the client. The terminal includes but is not limited to: a personal computer, a mobile phone, a tablet computer, a smart watch, a car mobile station, and the like. The executor of the present invention is not limited to the present application. For the convenience of description, the embodiments corresponding to FIG. 1 are described by taking the execution subject as a client as an example.
图1中的过程具体可以包括以下步骤:The process in FIG. 1 may specifically include the following steps:
S101:根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求。S101: Generate a service request including the status information according to an interface call request generated by the client for at least one service interface provided by the server, and status information of the configuration information on the client.
在本申请实施例中,客户端当接收到服务获取指令时,生成针对服务端提供的至少一个服务接口的接口调用请求。所述服务获取指令可以是:用于指示客户端从服务端,获取服务端提供的任一项服务的指令。In the embodiment of the present application, when receiving the service acquisition instruction, the client generates an interface call request for at least one service interface provided by the server. The service obtaining instruction may be: an instruction for instructing the client to obtain any service provided by the server from the server.
本申请实施例对“接收服务获取指令”这一动作的触发因素并不做限定,在实际应用中,这一动作可以由用户对客户端的操作触发,也可以由客户端根据预设业务逻辑自动触发。The triggering factor of the action of “receiving the service acquisition instruction” is not limited in the embodiment of the present application. In an actual application, the action may be triggered by the user's operation on the client, or may be automatically performed by the client according to the preset service logic. trigger.
例如,用户在使用即时通讯应用时,可能会在应用界面编辑一条通讯消息,并点击“发送”按钮,将该条通讯消息发送给另一位用户。在该例中,可以认为,该“发送”按钮被按下后,客户端即接收到一条服务获取指令,该条服务获取指令用于指示客户端从服务端提供的“传输通讯消息”这项服务对应的服务接口获取服务。For example, when using an instant messaging application, a user may edit a communication message in the application interface and click the "send" button to send the communication message to another user. In this example, it can be considered that after the "send" button is pressed, the client receives a service acquisition instruction, and the service acquisition instruction is used to instruct the client to transmit the "communication message" from the server. The service interface corresponding to the service obtains the service.
在本申请实施例中,所述接口调用请求可以包含所述至少一个服务接口的接口函数,以及所述接口函数的调用参数,其中,调用参数可以是由服务获取指令指定的,也可以是 用户在客户端上实时地输入的。In the embodiment of the present application, the interface call request may include an interface function of the at least one service interface, and a call parameter of the interface function, where the call parameter may be specified by a service acquisition instruction, or may be The user enters it in real time on the client.
在本申请实施例中,除了要获取接口调用请求对应的服务以外,同时还可以获取客户端上的配置信息的更新信息,因此,可以不直接向服务端发送接口调用请求,而是对针对服务接口和/或接口调用请求进行特定处理,以加入获取该更新信息所需要的额外的信息(也即,客户端上的配置信息的状态信息),进而将特定处理后生成的请求发送给服务端。在本申请实施例中,所述特定处理至少可以包括两种,下面对这两种分别进行说明。In the embodiment of the present application, in addition to obtaining the service corresponding to the interface call request, the update information of the configuration information on the client may be acquired at the same time. Therefore, the interface call request may not be directly sent to the server, but is directed to the service. The interface and/or the interface call request performs specific processing to add additional information required to obtain the update information (ie, status information of the configuration information on the client), and then send the request generated after the specific processing to the server. . In the embodiment of the present application, the specific processing may include at least two types, and the two are separately described below.
第一种,可以预先对客户端上用于生成接口调用请求的服务接口单元进行修改,以加入包含所述状态信息的处理逻辑,这样的话,通过修改后的服务接口单元,可以生成包含有所述状态信息的接口调用请求,并发送给服务端。第一种处理方法不用改变客户端上各单元的结构。First, the service interface unit for generating an interface call request on the client may be modified in advance to add processing logic including the state information, so that the modified service interface unit may generate the inclusion The interface of the status information invokes the request and sends it to the server. The first method of processing does not change the structure of the units on the client.
第二种,也即步骤S101对应的处理方法。具体的,可以预先在客户端上增加代理单元,则客户端可以将生成的接口调用请求传递给代理单元,由代理单元执行步骤S101,进而可以将生成的、包含所述状态信息的服务请求发送给服务端。第二种处理方法实现成本较低,对客户端和服务端上已有的接口影响较小。The second type, that is, the processing method corresponding to step S101. Specifically, the proxy unit may be added to the client in advance, and the client may transmit the generated interface call request to the proxy unit, where the proxy unit performs step S101, and the generated service request including the status information may be sent. To the server. The second processing method has a lower implementation cost and has less impact on the existing interfaces on the client and the server.
在实际应用中,可以根据应用场景的具体情况,在以上两种处理方法中选择更适用的方法。本申请实施例主要是基于上述的第二种处理方法进行说明的。In practical applications, a more suitable method can be selected among the above two processing methods according to the specific situation of the application scenario. The embodiment of the present application is mainly described based on the second processing method described above.
进一步的,为了便于理解,下面对所述配置信息进行说明。Further, for ease of understanding, the configuration information will be described below.
安装应用的客户端后,该客户端一般会包含有配置信息,而在使用该客户端的过程中,该客户端可能经常需要从服务端获取更新的配置信息或其他配置信息(为了便于描述,所述更新的配置信息、所述其他配置信息可以统称为:配置信息的更新信息),以实现对客户端的更新和功能升级。After the client of the application is installed, the client generally contains configuration information, and during the process of using the client, the client may often need to obtain updated configuration information or other configuration information from the server (for convenience of description, The updated configuration information, the other configuration information may be collectively referred to as: update information of the configuration information, to implement update and function upgrade to the client.
需要说明的是,本申请实施例对所述配置信息和所述配置信息的更新信息的格式、文件类型、具体内容并不做限定。在实际应用中,所述配置信息和所述配置信息的更新信息可以是:界面模板、全局应用设置信息、场景引擎规则、菜单信息、追加内容下载包、应用补丁,等等。It should be noted that, in the embodiment of the present application, the format, file type, and specific content of the configuration information and the update information of the configuration information are not limited. In an actual application, the configuration information and the update information of the configuration information may be: an interface template, global application setting information, a scenario engine rule, menu information, an additional content download package, an application patch, and the like.
S102:将所述服务请求发送给所述服务端。S102: Send the service request to the server.
在本申请实施例中,可以通过步骤S101中提到的所述的至少一个服务接口,也可以通过服务端提供的其他服务接口,将服务请求发送给所述服务端。In the embodiment of the present application, the service request may be sent to the server by using the at least one service interface mentioned in step S101 or other service interfaces provided by the server.
在本申请实施例中,服务端在接收到服务信息后,可以根据服务信息中包含的所述状态信息,向客户端返回更新指示信息,以便于客户端根据更新指示信息,获取配置信息的更新信息。 In the embodiment of the present application, after receiving the service information, the server may return the update indication information to the client according to the state information included in the service information, so that the client obtains the update of the configuration information according to the update indication information. information.
所述更新指示信息可以用于指示是否有配置信息的更新信息,以及有哪些更新信息,等等。例如,所述更新指示信息可以是所述配置信息的更新信息,可以是所述配置信息的更新信息的标识,也可以是所述配置信息的更新信息的下载地址,等等。The update indication information may be used to indicate whether there is update information of configuration information, and which update information is available, and the like. For example, the update indication information may be update information of the configuration information, may be an identifier of update information of the configuration information, or may be a download address of update information of the configuration information, and the like.
在本申请实施例中,对于客户端根据更新指示信息,获取配置信息的更新信息这一步骤,可以有多种实施方式。In the embodiment of the present application, for the step that the client obtains the update information of the configuration information according to the update indication information, there may be various implementation manners.
例如,当更新信息的数据量较少时,可以将更新信息携带在更新指示信息中,则客户端可以从更新指示信息中直接获取到更新信息,这样的话,可以降低客户端与服务端之间的消息交互次数,节省网络资源。For example, when the amount of data of the update information is small, the update information may be carried in the update indication information, and the client may directly obtain the update information from the update indication information, so as to reduce the relationship between the client and the server. The number of message interactions saves network resources.
又例如,当更新信息的数据量较多时,可以将更新信息的标识携带在更新指示信息,后续客户端可以根据更新信息的标识,在网络空闲时或是其他指定时刻从服务端下载更新信息,这样的话,可以提高获取更新信息的成功率,也可以减轻客户端的负担。For example, when the amount of data of the update information is large, the identifier of the update information may be carried in the update indication information, and the subsequent client may download the update information from the server when the network is idle or at other specified times according to the identifier of the update information. In this way, the success rate of obtaining update information can be improved, and the burden on the client can be reduced.
通过上述方法,客户端可以利用已有的任一服务接口获取配置信息的更新信息,而不需要为了获取该更新信息单独维护一个定时线程,因此,可以减轻客户端的负担,其中,所述负担包括对处理器资源、内存资源、电量资源等资源的消耗。Through the above method, the client can obtain the update information of the configuration information by using any existing service interface, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client, wherein the burden includes Consumption of resources such as processor resources, memory resources, and power resources.
不仅如此,由于上述方法可以将查询以及获取配置信息的更新信息这一动作的触发时机,融入到客户端与服务端提供的任一服务接口的交互过程中,因此,没有增加额外的针对服务端的网络调用,而且也可以比较及时地获取更新信息,而不用像在现有技术中需要等待定时线程触发获取更新信息。Not only that, because the above method can trigger the triggering action of the query and the update information of the configuration information into the interaction process between the client and any service interface provided by the server, therefore, no additional server-oriented is added. The network calls, and can also obtain the update information in a relatively timely manner, without having to wait for the timing thread to trigger the acquisition of the update information as in the prior art.
例如,用户使用客户端上的即时通讯应用发送即时通讯消息(向服务端请求获取“传输通讯消息”这项服务)时,可以触发客户端向服务端发送服务请求,服务端成功响应该服务请求后,客户端不仅可以获取到服务端提供的“传输通讯消息”这项服务,还可以获得配置信息的更新信息。For example, when a user sends an instant messaging message by using an instant messaging application on the client (a request to obtain a "transfer communication message" service from the server), the client may be triggered to send a service request to the server, and the server successfully responds to the service request. After that, the client can not only obtain the "transport communication message" service provided by the server, but also obtain the update information of the configuration information.
需要说明的是,以上只是用“传输通讯消息”这项服务举例说明,在实际应用中,客户端在获取任一项服务的过程中,也可以通过上述方法,获得配置信息的更新信息,或者,完成其他额外的事务。It should be noted that the above is only an example of the service of “transmitting a communication message”. In an actual application, the client may obtain the update information of the configuration information by using the above method in the process of acquiring any service, or , to complete other additional transactions.
为了便于理解,下面对图1中的步骤进一步地详细说明。For ease of understanding, the steps in FIG. 1 are further described in detail below.
在本申请实施例中,服务请求中包含的所述状态信息可以是:可用于让服务端确定客户端上的配置信息是否存在更新信息的任意信息。在实际应用中,该状态信息可以是该配置信息的最新更新时间,也可以是该配置信息的标识,等等。以所述配置信息是界面模板为例进行说明。In the embodiment of the present application, the status information included in the service request may be any information that can be used to enable the server to determine whether the configuration information on the client has update information. In an actual application, the status information may be the latest update time of the configuration information, or may be an identifier of the configuration information, and the like. The configuration information is an interface template as an example.
假定客户端上的配置信息包括两个界面模板,名称分别为“界面模板1”、“界面模板 2”,其中,客户端下载到这两个界面模板的时间是2014年1月1日。该配置信息的状态信息可以是“界面模板1”和“界面模板2”,服务端根据该状态信息可以查询自身上是否保存有客户端上没有的界面模板;类似的,该配置信息的状态信息也可以是时间2014年1月1日,服务端根据该时间可以查询服务端在该时间以后更新的界面模板,也即,客户端上没有的界面模板。进而服务端生成并客户端返回更新指示信息,该更新指示信息可以是所述更新的界面模板,或所述更新的界面模板的名称,等等。Assume that the configuration information on the client includes two interface templates, namely the interface template 1 and the interface template. 2", wherein the time when the client downloads the two interface templates is January 1, 2014. The status information of the configuration information may be "interface template 1" and "interface template 2", and the server according to the status information You can query whether the interface template is not saved on the client. Similarly, the status information of the configuration information can also be the time of January 1, 2014. The server can query the server to update after the time according to the time. The interface template, that is, the interface template that is not on the client. The server generates the client and returns the update indication information, where the update indication information may be the updated interface template, or the name of the updated interface template, etc. Wait.
在本申请实施例中,状态信息可以以不同的方式包含在服务请求中。In the embodiment of the present application, the status information may be included in the service request in a different manner.
例如,状态信息通过所述服务请求的预定字段进行保存,包含在所述服务请求中,或者,可以将状态信息写入文件或消息中,由服务请求携带写入了状态信息的文件或消息。前一种方案实现成本较小,后一种方案可以对状态信息的文件或消息进一步地加密等操作,以提高信息安全性,可以根据实际应用场景,选择更适用的方案。在本申请实施例中,主要是基于前一种方案进行说明的。For example, the status information is saved by the predetermined field of the service request, included in the service request, or the status information may be written into a file or message, and the service request carries a file or message in which the status information is written. The former solution has a small implementation cost, and the latter solution can further encrypt the file or message of the state information to improve information security, and can select a more suitable solution according to the actual application scenario. In the embodiment of the present application, the description is mainly based on the former solution.
在本申请实施例中,步骤S101中的接口调用请求可以包含所述至少一个服务接口的接口函数,以及所述接口函数的调用参数。In the embodiment of the present application, the interface call request in step S101 may include an interface function of the at least one service interface, and a call parameter of the interface function.
对于步骤S101,根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求,具体可以包括:确定所述接口调用请求对应的代理实现类,其中,所述代理实现类是根据所述接口函数和所述预定字段生成的;根据所述代理实现类、所述接口函数的调用参数和所述状态信息,生成包含所述状态信息的服务请求。需要说明的是,本申请实施例对所述预定字段的名称、字节数等信息并不做限定。For the step S101, the service request including the status information is generated according to the interface call request generated by the client and the at least one service interface provided by the server, and the status information of the configuration information on the client is generated. The method includes: determining a proxy implementation class corresponding to the interface call request, where the proxy implementation class is generated according to the interface function and the predetermined field; and according to the proxy implementation class, the call parameter of the interface function The status information generates a service request including the status information. It should be noted that, the embodiment of the present application does not limit information such as the name, the number of bytes, and the like of the predetermined field.
在本申请实施例中,不同的接口调用请求可以对应于不同的代理实现类,通过代理实现类可以在客户端上的原有接口的功能的基础上修改或扩展,且不影响原有接口的逻辑。In the embodiment of the present application, different interface call requests may correspond to different agent implementation classes, and the proxy implementation class may be modified or extended based on the function of the original interface on the client, and does not affect the original interface. logic.
服务请求用于向服务端请求获取:该接口函数对应的服务,以及客户端上的配置信息的更新信息。本申请实施例对生成代理实现类的生成方式并不做限定,可以是客户端上预设的代理单元生成的,也可以是由客户端上已有任一单元生成的。The service request is used to request acquisition from the server: the service corresponding to the interface function, and the update information of the configuration information on the client. The embodiment of the present application does not limit the generation manner of the generation proxy implementation class, and may be generated by a preset proxy unit on the client, or may be generated by any unit already existing on the client.
服务请求可以是一个请求;也可以是由至少两个子请求组成的请求,其中,某个子请求可以用于请求获取该服务,另一个子请求可以用于请求获取该更新信息,等等。对于后一种情况,在将服务请求发送给服务端的过程中,将该服务请求包含的至少两个子请求同时发送给服务端,也可以按照预定发送顺序,将至少两个子请求分别发送给服务端,本申请实施例对所述预定发送顺序并不做限定。The service request can be a request; it can also be a request consisting of at least two sub-requests, where one sub-request can be used to request the service, another sub-request can be used to request the update information, and so on. In the latter case, in the process of sending the service request to the server, at least two sub-requests included in the service request are simultaneously sent to the server, and at least two sub-requests may be separately sent to the server according to a predetermined sending sequence. The embodiment of the present application does not limit the predetermined sending sequence.
进一步的,根据所述代理实现类、所述接口函数的调用参数和所述状态信息,生成包 含所述状态信息的服务请求,具体可以包括:根据所述代理实现类,对所述接口函数的调用参数进行转换,生成服务参数;获取所述状态信息,并通过所述预定字段保存所述状态信息;根据所述代理实现类、所述服务参数和保存了所述状态信息的所述预定字段,生成包含所述状态信息的服务请求。Further, generating a package according to the proxy implementation class, the calling parameter of the interface function, and the state information The service request including the status information may include: converting, according to the agent implementation class, a call parameter of the interface function, generating a service parameter; acquiring the state information, and saving the State information; generating a service request including the state information according to the agent implementation class, the service parameter, and the predetermined field in which the state information is saved.
所述转换过程中涉及的操作包括但不限于:映射操作、封装操作、参数修改操作、权限修改操作、等等。本申请实施例对客户端上负责管理、维护以及使用所述预定字段的单元并不做限定,可以由代理单元负责,也可以由其他单元负责。The operations involved in the conversion process include, but are not limited to, a mapping operation, a packaging operation, a parameter modification operation, a permission modification operation, and the like. The embodiment of the present application does not limit the unit responsible for managing, maintaining, and using the predetermined field on the client, and may be responsible for the agent unit, or may be responsible for other units.
在实际应用中,当客户端上预设有代理单元时,可以由该代理单元实现步骤S101,这样的话,便于客户端管理各接口调用请求的发送过程。需要说明的是,本申请实施例对于所述代理单元的实现方式并不做限定。为了便于理解,下面对在一种实际应用场景下,可以采用的代理单元的实现方式,以及代理单元的工作方式举例进行说明。In an actual application, when the proxy unit is pre-configured on the client, step S101 can be implemented by the proxy unit, so that the client can manage the sending process of each interface call request. It should be noted that the implementation manner of the proxy unit in the embodiment of the present application is not limited. For ease of understanding, the following describes an implementation manner of the proxy unit that can be used in an actual application scenario, and an example of the working mode of the proxy unit.
代理单元在客户端上运行,假定在服务端提供的某服务接口中定义有两个接口函数,如下所示:The proxy unit runs on the client, assuming that there are two interface functions defined in a service interface provided by the server, as follows:
Figure PCTCN2016106879-appb-000001
Figure PCTCN2016106879-appb-000001
如图2所示,代理单元的实现方式和工作方式具体可以包括以下步骤(各所述步骤的执行主体可以为该代理单元):As shown in FIG. 2, the implementation and working mode of the proxy unit may specifically include the following steps (the execution entity of each step may be the proxy unit):
S201:构造工厂类,其中,所述工厂类中包含用于创建代理实现类的函数。S201: Construct a factory class, wherein the factory class includes a function for creating a proxy implementation class.
调用代码举例说明:An example of calling the code:
TPSClient client=TPSClient.getTpsClient();TPSClient client=TPSClient.getTpsClient();
ItemQueryService service= ItemQueryService service=
Client.getService(“com.yunos.item.service.ItemQueryService”,ItemQueryService.class);Client.getService("com.yunos.item.service.ItemQueryService", ItemQueryService.class);
List<ItemEntity>list=service.queryTopItemList();List<ItemEntity>list=service.queryTopItemList();
所述工厂类可以为TPSClient,所述函数可以为TPSClient.getTpsClient()。The factory class can be TPSClient, and the function can be TPSClient.getTpsClient().
S202:根据所述函数,为服务接口创建对应的代理实现类。S202: Create a corresponding proxy implementation class for the service interface according to the function.
所述服务接口可以为ItemQueryService,创建的该代理实现类也即为针对该服务接口的接口调用请求对应的代理实现类。The service interface may be an ItemQueryService, and the proxy implementation class created is an agent implementation class corresponding to an interface call request of the service interface.
S203:根据接收到的接口调用请求,在所述代理实现类中,构造请求对象,其中所述请求对象用于传递与针对服务接口的接口调用请求相关的信息。S203: Construct a request object in the proxy implementation class according to the received interface call request, where the request object is used to deliver information related to an interface call request for a service interface.
继续调用代码举例说明:Continue to call the code for an example:
Request req=new Request();Request req=new Request();
req.setServiceName(service);req.setServiceName(service);
req.setMethod(method.getName());req.setMethod(method.getName());
req.setParameters(GsonUtil.toJson(args));req.setParameters(GsonUtil.toJson(args));
其中,所述请求对象可以是req,所述相关的信息可以是调用参数、接口函数等。The request object may be req, and the related information may be a call parameter, an interface function, or the like.
S204:将接口调用请求包含的调用参数进行转换后,保存在所述请求对象中。S204: Convert the call parameter included in the interface call request, and save it in the request object.
具体的,可以将调用参数转换为超文本传输协议(HyperText Transfer Protocol,http)请求参数,其中,parameters中是对调用参数转换生成的json字符串。Specifically, the calling parameter may be converted into a HyperText Transfer Protocol (http) request parameter, where the parameter is a json string generated by the call parameter conversion.
S205:获取客户端上的配置信息的状态信息。S205: Acquire status information of the configuration information on the client.
以所述状态信息为配置信息的最新更新时间为例进行说明,可以将最新更新时间通过预定字段(如gmtFlag字段)进行保存和传递。另外,若客户端并未记录状态信息,则后续可以向服务端发送默认值,如0。Taking the status information as the latest update time of the configuration information as an example, the latest update time may be saved and delivered through a predetermined field (such as the gmtFlag field). In addition, if the client does not record status information, then the server may send a default value, such as 0.
S206:根据代理实现类、请求参数和状态信息,生成包含该状态信息的服务请求。S206: Generate a service request including the status information according to the proxy implementation class, the request parameter, and the status information.
S207:将服务请求通过服务接口,发送给服务端。S207: Send the service request to the server through the service interface.
服务端通过服务接口接收到服务请求后,一方面可以根据所述服务请求,解析出接口调用请求,进而通过该服务接口的实现单元为客户端返回对应的服务;另一方面,可以根据服务请求包含的状态信息,确定更新指示信息并返回给客户端,以便于客户端根据该更新指示信息获取配置信息的更新信息。After receiving the service request through the service interface, the server may parse the interface call request according to the service request, and then return the corresponding service to the client through the implementation unit of the service interface; on the other hand, according to the service request The included status information determines the update indication information and returns to the client, so that the client obtains the update information of the configuration information according to the update indication information.
因此,对于步骤S102,在将所述服务请求发送给所述服务端,还可以执行如下步骤:接收所述服务端根据所述服务请求中包含的所述状态信息,返回的更新指示信息;根据所述更新指示信息,获取所述配置信息的更新信息。Therefore, in step S102, the step of transmitting the service request to the server may further perform the following steps: receiving update indication information returned by the server according to the state information included in the service request; The update indication information acquires update information of the configuration information.
例如,在状态信息是配置信息的最新更新时间的情况下,服务端接收到包含配置信息 的最新更新时间(为了便于描述,称为:客户端更新时间)的服务请求后,可以将客户端更新时间,与服务端保存的配置信息的最新更新时间(为了便于描述,称为:服务端更新时间)进行比较。若服务端更新时间大于客户端更新时间,则可以表示服务端保存有客户端尚未获得的更新信息,进而服务端可以将该更新信息或该更新信息的标识作为更新指示信息,返回给客户端;若服务端更新时间不大于客户端更新时间,则可以表示服务端未保存有客户端尚未获得的更新信息,也即,客户端上的配置信息已是最新,当前无需更新,在这种情况下,服务端向客户端返回的更新指示信息也可以用于告知客户端无需更新配置信息。For example, in the case that the status information is the latest update time of the configuration information, the server receives the configuration information including After the service request of the latest update time (referred to as: client update time for convenience of description), the client update time may be updated with the latest update time of the configuration information saved by the server (for convenience of description, it is called: server) Update time) for comparison. If the server update time is greater than the client update time, the server may save the update information that the client has not obtained, and the server may return the update information or the update information as the update indication information to the client. If the server update time is not greater than the client update time, it may indicate that the server does not save the update information that the client has not obtained yet, that is, the configuration information on the client is up to date, and no update is needed at present. The update indication information returned by the server to the client may also be used to inform the client that the configuration information does not need to be updated.
在本申请实施例中,所述更新指示信息可以包括:所述配置信息的更新信息的标识,或者,所述配置信息的更新信息;等等。In the embodiment of the present application, the update indication information may include: an identifier of the update information of the configuration information, or an update information of the configuration information; and the like.
当所述更新指示信息包括所述配置信息的更新信息的标识时,根据所述更新指示信息,获取所述配置信息的更新信息,具体可以包括:根据所述配置信息的更新信息的标识,从所述服务端获取所述配置信息的更新信息。When the update indication information includes the identifier of the update information of the configuration information, the obtaining the update information of the configuration information according to the update indication information may specifically include: according to the identifier of the update information of the configuration information, The server acquires update information of the configuration information.
当所述更新指示信息包括所述配置信息的更新信息时,根据所述更新指示信息,获取所述配置信息的更新信息,具体可以包括:从所述更新指示信息中,获取所述配置信息的更新信息。When the update indication information includes the update information of the configuration information, the obtaining the update information of the configuration information according to the update indication information may include: acquiring the configuration information from the update indication information. Update information.
以上是从客户端角度,说明的本申请实施例提供的信息处理方法,基于同样的思路,本申请实施例还提供了对应于图1的另一种信息处理方法,所述另一种信息处理方法是从服务端角度进行说明的,如图3所示。The above is the information processing method provided by the embodiment of the present application from the perspective of the client. Based on the same idea, the embodiment of the present application further provides another information processing method corresponding to FIG. 1, and the other information processing. The method is described from the perspective of the server, as shown in Figure 3.
图3为本申请实施例提供的另一种信息处理方法的过程,所述另一种信息处理方法的执行主体可以是:应用的服务端,或者搭载有所述服务端的终端或服务器。所述的执行主体并不构成对本申请的限定,为了便于描述,图3对应的各实施例均以执行主体是所述服务端为例进行说明。FIG. 3 is a process of another information processing method according to an embodiment of the present disclosure. The execution body of the other information processing method may be: a server of an application, or a terminal or a server on which the server is equipped. The executor of the present invention is not limited to the present application. For the convenience of description, each embodiment corresponding to FIG. 3 is described by taking the execution subject as the server.
图3中的过程具体可以包括以下步骤:The process in FIG. 3 may specifically include the following steps:
S301:接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息。S301: Receive a service request sent by the client, where the service request includes an interface call request of the client for the at least one service interface provided by the server, and status information of the configuration information on the client.
S302:根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。S302: Determine, according to the status information included in the service request, return update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
在本申请实施例中,服务端接收到服务请求后,一方面可以由接收服务请求的服务接口对应的服务接口实现单元返回对应的服务;另一方面,可以由服务请求包含的状态信息,确定更新指示信息,或者,该服务接口也可以将该状态信息传递给服务端上预设的消息处 理单元,由于该消息处理单元根据该状态信息,确定更新指示信息并返回给客户端,以便于客户端根据该更新指示信息,获取配置信息的更新信息。In the embodiment of the present application, after receiving the service request, the server may return the corresponding service by the service interface implementation unit corresponding to the service interface that receives the service request; on the other hand, the status information included in the service request may be determined. Update the indication information, or the service interface can also transmit the status information to the preset message on the server. The processing unit determines the update indication information according to the status information and returns the information to the client, so that the client obtains the update information of the configuration information according to the update indication information.
通过上述方法,客户端可以利用服务端提供的任一服务接口,获取配置信息的更新信息,而不需要为了获取该更新信息单独维护一个定时线程,因此,可以减轻客户端的负担,也可以减少服务端与客户端之间的交互。Through the above method, the client can obtain update information of the configuration information by using any service interface provided by the server, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client and reducing the service. The interaction between the end and the client.
为了便于理解,下面对图3中的步骤进一步地详细说明。For ease of understanding, the steps in FIG. 3 are further described in detail below.
在本申请实施例中,在服务端上预设有消息处理单元时,对于步骤S302,根据所述服务请求中包含的所述状态信息,确定更新指示信息,具体可以包括:所述服务请求中包含的所述状态信息传递给所述服务端上预设的消息处理单元,以便于所述消息处理单元根据所述状态信息,确定更新指示信息。In the embodiment of the present application, when the message processing unit is pre-configured on the server, the step of determining the update indication information according to the status information included in the service request may be included in the service request. The included status information is delivered to a preset message processing unit on the server, so that the message processing unit determines the update indication information according to the status information.
需要说明的是,本申请实施例对“将所述状态信息传递给所述服务端上预设的消息处理单元”所采用的传递方式并不做限定。在实际应用场景下,服务接口获得该状态信息后,可以构造一个包含该状态信息的消息,并将该消息发送给消息处理单元。进一步的,该消息可以以异步方式发送给消息处理单元,在这种情况下,所述消息处理单元具体可以是异步消息处理单元。It should be noted that the delivery manner adopted by the embodiment of the present application for “delivering the status information to a preset message processing unit on the server” is not limited. In the actual application scenario, after the service interface obtains the status information, a message including the status information may be constructed, and the message is sent to the message processing unit. Further, the message may be sent to the message processing unit in an asynchronous manner. In this case, the message processing unit may specifically be an asynchronous message processing unit.
服务接口除了可以将状态信息发送给消息处理单元以外,还可以将诸如客户端的标识等相关信息发送给消息处理单元,以便于消息处理单元可以将生成的更新指示信息正确地返回给客户端。下面对更新指示信息的确定方法进一步地说明。In addition to sending the status information to the message processing unit, the service interface may also send related information such as the identity of the client to the message processing unit, so that the message processing unit can correctly return the generated update indication information to the client. The method of determining the update indication information will be further described below.
前面已经提到,所述状态信息可以包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上的配置信息的标识。As mentioned above, the status information may include: the latest update time of the configuration information on the client, or an identifier of the configuration information on the client.
则当所述状态信息包括所述客户端上的配置信息的最新更新时间时,可以按照如下方法,根据所述状态信息,确定更新指示信息:当确定所述服务端上的配置信息的最新更新时间大于所述客户端上的配置信息的最新更新时间时,确定所述服务端在所述客户端上的配置信息的最新更新时间之后,更新的所述配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息;Then, when the status information includes the latest update time of the configuration information on the client, the update indication information may be determined according to the status information according to the following method: when determining the latest update of the configuration information on the server When the time is greater than the latest update time of the configuration information on the client, the update information of the configuration information that is updated after the latest update time of the configuration information of the server on the client is determined; according to the update The information generation update indication information, wherein the update indication information includes an identifier of the update information or the update information;
类似的,当所述状态信息包括所述客户端上的配置信息的标识时,可以按照如下方法,根据所述状态信息,确定更新指示信息:当确定所述服务端上存在对应的标识与所述客户端上的配置信息的标识不相同的配置信息时,将确定出的配置信息作为所述客户端上的配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息。Similarly, when the status information includes the identifier of the configuration information on the client, the update indication information may be determined according to the status information according to the following method: when it is determined that the corresponding identifier and the location exist on the server When the configuration information of the configuration information on the client is different from the configuration information, the determined configuration information is used as update information of the configuration information on the client; and the update indication information is generated according to the update information, where the update The indication information includes an identifier of the update information or the update information.
在本申请实施例中,服务接口和/或消息处理单元可以通过长连接推送(Push)消息通 道,将更新指示信息返回给客户端,其中,所述长连接Push消息通道可以只由一个应用使用,也可以由多个应用公用。进一步的,当更新指示信息中包含更新信息的标识、且未包含该更新信息时,则客户端尚未直接获取到更新信息,客户端可以在接收到更新指示信息后,再根据更新信息的标识,通过该长连接Push消息通道,或者,其他的通道,从服务端获取更新信息。In the embodiment of the present application, the service interface and/or the message processing unit may push (Push) message through a long connection. The method returns the update indication information to the client, where the long connection Push message channel can be used by only one application, or can be shared by multiple applications. Further, when the update indication information includes the identifier of the update information, and the update information is not included, the client does not directly obtain the update information, and the client may receive the update indication information, and then according to the identifier of the update information, Through the long connection Push message channel, or other channels, the update information is obtained from the server.
当客户端通过所述其他的通道获取更新信息时,可以降低长连接Push消息通道的信息传送负担,防止自己长时间占用长连接Push消息通道,而且,客户端和服务端还可以针对所述其他的消息通道,实现指定的安全机制,以提高客户端获取更新信息的可靠性。When the client obtains the update information through the other channels, the information transmission burden of the long-connected Push message channel can be reduced, and the long-connected Push message channel is prevented from being occupied for a long time. Moreover, the client and the server can also target the other. The message channel implements the specified security mechanism to improve the reliability of the client to obtain updated information.
以上为分别从客户端角度和服务端角度,对本申请实施例提供的信息处理方法的说明。为了便于理解,本申请实施例还提供了在一种实际应用场景下,实施所述信息处理方法时,客户端和服务端的交互示意图,如图4所示,所述交互具体可以包括以下步骤:The foregoing is a description of the information processing method provided by the embodiment of the present application from the perspective of the client and the server. For the sake of understanding, the embodiment of the present application further provides a schematic diagram of the interaction between the client and the server when the information processing method is implemented in an actual application scenario. As shown in FIG. 4, the interaction may specifically include the following steps:
S401:客户端接收服务获取指令。S401: The client receives a service acquisition instruction.
S402:客户端根据所述服务获取指令,生成针对服务端提供的至少一个服务接口的接口调用请求。S402: The client generates an interface call request for the at least one service interface provided by the server according to the service obtaining instruction.
S403:客户端将接口调用请求传递给客户端上预设的代理单元。S403: The client delivers the interface call request to the preset proxy unit on the client.
S404:代理单元获取客户端上的配置信息的状态信息。S404: The proxy unit acquires state information of the configuration information on the client.
S405:代理单元根据接口调用请求和状态信息,生成包含该状态信息的服务请求。S405: The proxy unit generates a service request including the status information according to the interface call request and the status information.
S406:代理单元通过服务接口,将服务请求发送给服务端。S406: The proxy unit sends the service request to the server through the service interface.
S407:服务接口通过对应的服务接口实现单元对服务请求进行处理,以向客户端返回对应的服务。S407: The service interface processes the service request by using a corresponding service interface implementation unit to return a corresponding service to the client.
S408:服务接口将服务请求包含的该状态信息,通过异步消息发送给服务端上的异步消息处理单元。S408: The service interface sends the status information included in the service request to the asynchronous message processing unit on the server by using an asynchronous message.
S409:异步消息处理单元当确定服务端更新时间大于该状态信息中包含的客户端更新时间时,确定服务端在客户端更新时间后更新的配置信息的更新信息的标识,作为更新指示信息。S409: The asynchronous message processing unit determines, as the update indication information, the identifier of the update information of the configuration information that is updated by the server after the client update time when it is determined that the server update time is greater than the client update time included in the state information.
S410:异步消息处理单元将更新指示信息通过长连接Push通道返回给客户端。S410: The asynchronous message processing unit returns the update indication information to the client through the long connection Push channel.
S411:客户端根据更新指示信息中的更新信息的标识,从服务端获取配置客户端上的配置信息的更新信息。S411: The client obtains the update information of the configuration information on the configuration client from the server according to the identifier of the update information in the update indication information.
进一步的,本申请实施例还提供了在一种实际应用场景下,适用于实施所述信息处理方法的系统结构示意图,如图5所示。Further, the embodiment of the present application further provides a schematic structural diagram of a system suitable for implementing the information processing method in a practical application scenario, as shown in FIG. 5 .
在图5中,客户端和服务端上分别包含有若干个单元,需要说明的是,图5只是一种 举例说明的系统结构示意图,在实际应用中,图5中的各单元也可以进行合并和/或分拆,本申请实施例并不做限定。In Figure 5, the client and the server respectively contain several units. It should be noted that FIG. 5 is only one type. For an example of the system structure, in the actual application, the units in FIG. 5 may also be combined and/or split. The embodiment of the present application is not limited.
在图5中,公共请求代理单元和公共返回代理单元可以构成本申请实施例中所述的代理单元,系统的工作过程如下:In FIG. 5, the public request proxy unit and the public return proxy unit may constitute the proxy unit described in the embodiment of the present application, and the working process of the system is as follows:
服务接口调用单元在接收到服务获取指令后,将对应的接口函数和调用参数传递给公共请求代理单元;After receiving the service acquisition instruction, the service interface calling unit passes the corresponding interface function and the calling parameter to the public request proxy unit;
公共请求代理单元根据该接口函数、该调用参数,以及客户端上的配置信息的状态信息,生成服务请求;The public request proxy unit generates a service request according to the interface function, the calling parameter, and status information of the configuration information on the client;
公共请求代理单元将服务请求通过对应的服务接口,发送给服务端;服务接口通过服务接口实现单元,对服务请求进行处理,并向客户端返回对应的服务;The public request proxy unit sends the service request to the server through the corresponding service interface; the service interface processes the service request through the service interface implementation unit, and returns a corresponding service to the client;
服务接口根据服务请求包含的状态信息,生成包含有该状态信息的消息,并以异步方式将该消息传递给异步消息处理单元;The service interface generates a message containing the status information according to the status information included in the service request, and delivers the message to the asynchronous message processing unit in an asynchronous manner;
异步消息处理单元根据接收到的该消息,当确定服务端上存在配置信息的更新信息时,将该更新消息的标识作为更新指示信息,通过长连接Push消息通道,发送给客户端;The asynchronous message processing unit sends the update information of the configuration information as the update indication information to the client through the long connection Push message channel according to the received message;
客户端通过Push消息接收单元接收到更新指示信息,根据更新消息的标识,通过配置信息查询接口调用单元与服务端的配置信息查询接口实现单元,获取到配置信息的更新信息;The client receives the update indication information through the Push message receiving unit, and obtains the update information of the configuration information by using the configuration information query interface calling unit and the configuration information query interface implementation unit of the server according to the identifier of the update message;
配置信息查询接口调用单元将配置信息的更新信息传递给公共返回代理单元,以便于客户端更新配置信息。其中,公共返回代理单元可以用于记录配置信息的状态信息。The configuration information query interface calling unit passes the update information of the configuration information to the public return proxy unit, so that the client updates the configuration information. The public return proxy unit can be used to record status information of the configuration information.
针对本申请实施例提供的信息处理方法,基于同样的思路,本申请实施例还提供相应的信息处理装置,如图6、图7所示。For the information processing method provided by the embodiment of the present application, based on the same idea, the embodiment of the present application further provides a corresponding information processing apparatus, as shown in FIG. 6 and FIG. 7.
图6为本申请实施例提供的对应与图1的信息处理装置结构示意图,具体包括:FIG. 6 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 1 according to an embodiment of the present application, specifically including:
生成模块601,用于根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;The generating module 601 is configured to generate a service request including the status information according to an interface call request generated by the client for the at least one service interface provided by the server, and status information of the configuration information on the client.
发送模块602,用于将所述服务请求发送给所述服务端。The sending module 602 is configured to send the service request to the server.
通过上述装置,客户端可以利用已有的任一服务接口获取配置信息的更新信息,而不需要为了获取该更新信息单独维护一个定时线程,因此,可以减轻客户端的负担。Through the above device, the client can obtain the update information of the configuration information by using any existing service interface, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client.
所述状态信息包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上的配置信息的标识。The status information includes: a latest update time of the configuration information on the client, or an identifier of the configuration information on the client.
所述状态信息通过所述服务请求的预定字段进行保存,包含在所述服务请求中。The status information is saved by a predetermined field of the service request and included in the service request.
所述接口调用请求包含所述至少一个服务接口的接口函数,以及所述接口函数的调用 参数;The interface call request includes an interface function of the at least one service interface, and a call of the interface function parameter;
所述生成模块601具体用于:确定所述接口调用请求对应的代理实现类,其中,所述代理实现类是根据所述接口函数和所述预定字段生成的;根据所述代理实现类、所述接口函数的调用参数和所述状态信息,生成包含所述状态信息的服务请求。The generating module 601 is specifically configured to: determine a proxy implementation class corresponding to the interface call request, where the proxy implementation class is generated according to the interface function and the predetermined field; The calling parameter of the interface function and the state information generate a service request including the state information.
所述生成模块601具体用于:根据所述代理实现类,对所述接口函数的调用参数进行转换,生成服务参数;获取所述状态信息,并通过所述预定字段保存所述状态信息;根据所述代理实现类、所述服务参数和保存了所述状态信息的所述预定字段,生成包含所述状态信息的服务请求。The generating module 601 is specifically configured to: convert, according to the proxy implementation class, a call parameter of the interface function, generate a service parameter; acquire the state information, and save the state information by using the predetermined field; The agent implementation class, the service parameter, and the predetermined field in which the state information is saved, generates a service request including the state information.
所述装置还可以包括:The device may further include:
获取模块603,用于在所述发送模块601将所述服务请求发送给所述服务端之后,接收所述服务端根据所述服务请求中包含的所述状态信息,返回的更新指示信息;根据所述更新指示信息,获取所述配置信息的更新信息。The obtaining module 603 is configured to: after the sending module 601 sends the service request to the server, receive the update indication information returned by the server according to the state information included in the service request; The update indication information acquires update information of the configuration information.
所述更新指示信息包括:所述配置信息的更新信息的标识,或者,所述配置信息的更新信息;The update indication information includes: an identifier of the update information of the configuration information, or an update information of the configuration information;
当所述更新指示信息包括所述配置信息的更新信息的标识时,所述发送模块具体用于:根据所述配置信息的更新信息的标识,从所述服务端获取所述配置信息的更新信息;When the update indication information includes the identifier of the update information of the configuration information, the sending module is specifically configured to: obtain the update information of the configuration information from the server according to the identifier of the update information of the configuration information. ;
当所述更新指示信息包括所述配置信息的更新信息时,所述发送模块具体用于:从所述更新指示信息中,获取所述配置信息的更新信息。When the update indication information includes the update information of the configuration information, the sending module is specifically configured to: obtain the update information of the configuration information from the update indication information.
具体的上述如图6所示的装置可以位于客户端上。The specific device shown in FIG. 6 above may be located on the client.
图7为本申请实施例提供的对应于图3的信息处理装置结构示意图,具体包括:FIG. 7 is a schematic structural diagram of an information processing apparatus corresponding to FIG. 3 according to an embodiment of the present disclosure, which specifically includes:
接收模块701,用于接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息;The receiving module 701 is configured to receive a service request sent by the client, where the service request includes an interface call request of the client for the at least one service interface provided by the server, and a status of the configuration information on the client. information;
返回模块702,用于根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。The returning module 702 is configured to determine, according to the status information included in the service request, returning update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
通过上述装置,客户端可以利用已有的任一服务接口获取配置信息的更新信息,而不需要为了获取该更新信息单独维护一个定时线程,因此,可以减轻客户端的负担。Through the above device, the client can obtain the update information of the configuration information by using any existing service interface, and does not need to separately maintain a timing thread for obtaining the update information, thereby reducing the burden on the client.
所述返回模块702具体用于:将所述服务请求中包含的所述状态信息传递给所述服务端上预设的消息处理单元,以便于所述消息处理单元根据所述状态信息,确定更新指示信息。The returning module 702 is specifically configured to: pass the status information included in the service request to a preset message processing unit on the server, so that the message processing unit determines an update according to the status information. Instructions.
所述状态信息包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上 的配置信息的标识;The status information includes: a latest update time of the configuration information on the client, or the client Identification of the configuration information;
当所述状态信息包括所述客户端上的配置信息的最新更新时间时,所述返回模块702按照如下方法,根据所述状态信息,确定更新指示信息:When the status information includes the latest update time of the configuration information on the client, the returning module 702 determines the update indication information according to the status information according to the following method:
当确定所述服务端上的配置信息的最新更新时间大于所述客户端上的配置信息的最新更新时间时,确定所述服务端在所述客户端上的配置信息的最新更新时间之后,更新的所述配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息;When it is determined that the latest update time of the configuration information on the server is greater than the latest update time of the configuration information on the client, determining that the server updates after the latest update time of the configuration information on the client The update information of the configuration information is generated, and the update indication information is generated according to the update information, where the update indication information includes an identifier of the update information or the update information;
当所述状态信息包括所述客户端上的配置信息的标识时,所述返回模块702按照如下方法,根据所述状态信息,确定更新指示信息:When the status information includes the identifier of the configuration information on the client, the returning module 702 determines the update indication information according to the status information according to the following method:
当确定所述服务端上存在对应的标识与所述客户端上的配置信息的标识不相同的配置信息时,将确定出的配置信息作为所述客户端上的配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息。When it is determined that the configuration information that is different from the identifier of the configuration information on the client is different on the server, the determined configuration information is used as update information of the configuration information on the client; The update information generates update indication information, wherein the update indication information includes an identifier of the update information or the update information.
具体的上述如图7所示的装置可以位于服务端上。The specific device shown in FIG. 7 above may be located on the server.
基于同样的思路,本申请实施例还提供相应的终端,如图8、图9所示。Based on the same idea, the embodiment of the present application further provides a corresponding terminal, as shown in FIG. 8 and FIG. 9.
图8为本申请实施例提供的对应于图1的终端示意图,具体包括:FIG. 8 is a schematic diagram of a terminal corresponding to FIG. 1 according to an embodiment of the present disclosure, specifically including:
存储器801,用于存储处理器可执行指令;a memory 801, configured to store processor executable instructions;
处理器802,耦合到所述存储器,用于读取所述存储器存储的可执行指令,作为响应,执行如下操作:根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;将所述服务请求发送给所述服务端。The processor 802 is coupled to the memory for reading the executable instructions stored by the memory, and in response, performing an operation of: invoking a request according to an interface generated by the client for at least one service interface provided by the server And status information of the configuration information on the client, generating a service request including the status information; and transmitting the service request to the server.
图9为本申请实施例提供的对应于图3的终端示意图,具体包括:FIG. 9 is a schematic diagram of a terminal corresponding to FIG. 3 according to an embodiment of the present disclosure, specifically including:
存储器901,用于存储处理器可执行指令;a memory 901, configured to store processor executable instructions;
处理器902,耦合到所述存储器,用于读取所述存储器存储的可执行指令,作为响应,执行如下操作:接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息;根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。a processor 902, coupled to the memory, for reading the executable instructions stored by the memory, and in response, performing an operation of: receiving a service request sent by a client, wherein the service request includes the client An interface call request of the at least one service interface provided by the server, and status information of the configuration information on the client; determining, according to the status information included in the service request, and returning update indication information to the client And the update indication information is used to indicate update information of the configuration information.
需要说明的是,在实际应用中,图9中的终端可以作为服务器使用。It should be noted that, in practical applications, the terminal in FIG. 9 can be used as a server.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实 施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Thus, the present invention can be implemented in an entirely hardware embodiment, an entirely software embodiment, or in combination with software and hardware. The form of the case. Moreover, the invention can 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, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory. Memory is an example of a computer readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数 据信号和载波。Computer readable media includes both permanent and non-persistent, removable and non-removable media. Information storage can be implemented by any method or technology. The information can be computer readable instructions, data structures, modules of programs, 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 disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary storage of computer readable media, such as modulated numbers. According to the signal and carrier.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It is also to be understood that the terms "comprises" or "comprising" or "comprising" or any other variations are intended to encompass a non-exclusive inclusion, such that a process, method, article, Other elements not explicitly listed, or elements that are inherent to such a process, method, commodity, or equipment. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device including the element.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。 The above description is only an embodiment of the present application and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (22)

  1. 一种信息处理方法,其特征在于,包括:An information processing method, comprising:
    根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;Generating a service request including the status information according to an interface call request generated by the client for the at least one service interface provided by the server, and status information of the configuration information on the client;
    将所述服务请求发送给所述服务端。Sending the service request to the server.
  2. 如权利要求1所述的方法,其特征在于,所述状态信息包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上的配置信息的标识。The method of claim 1, wherein the status information comprises: a latest update time of configuration information on the client, or an identification of configuration information on the client.
  3. 如权利要求1所述的方法,其特征在于,所述状态信息通过所述服务请求的预定字段进行保存,包含在所述服务请求中。The method of claim 1 wherein said status information is saved by a predetermined field of said service request and included in said service request.
  4. 如权利要求3所述的方法,其特征在于,所述接口调用请求包含所述至少一个服务接口的接口函数,以及所述接口函数的调用参数;The method of claim 3, wherein the interface call request comprises an interface function of the at least one service interface, and a call parameter of the interface function;
    根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求,具体包括:Generating a service request including the status information according to the interface call request generated by the client and the at least one service interface provided by the server, and the status information of the configuration information on the client, which includes:
    确定所述接口调用请求对应的代理实现类,其中,所述代理实现类是根据所述接口函数和所述预定字段生成的;Determining, by the proxy implementation class corresponding to the interface call request, where the proxy implementation class is generated according to the interface function and the predetermined field;
    根据所述代理实现类、所述接口函数的调用参数和所述状态信息,生成包含所述状态信息的服务请求。Generating a service request including the status information according to the proxy implementation class, the calling parameter of the interface function, and the state information.
  5. 如权利要求4所述的方法,其特征在于,根据所述代理实现类、所述接口函数的调用参数和所述状态信息,生成包含所述状态信息的服务请求,具体包括:The method according to claim 4, wherein the generating the service request including the status information according to the proxy implementation class, the calling parameter of the interface function, and the status information, specifically includes:
    根据所述代理实现类,对所述接口函数的调用参数进行转换,生成服务参数;Deriving a call parameter of the interface function according to the proxy implementation class to generate a service parameter;
    获取所述状态信息,并通过所述预定字段保存所述状态信息;Obtaining the status information, and saving the status information by using the predetermined field;
    根据所述代理实现类、所述服务参数和保存了所述状态信息的所述预定字段,生成包含所述状态信息的服务请求。Generating a service request including the status information according to the agent implementation class, the service parameter, and the predetermined field in which the status information is saved.
  6. 如权利要求1所述的方法,其特征在于,将所述服务请求发送给所述服务端之后,还包括:The method of claim 1, after the sending the service request to the server, further comprising:
    接收所述服务端根据所述服务请求中包含的所述状态信息,返回的更新指示信息;Receiving update indication information returned by the server according to the status information included in the service request;
    根据所述更新指示信息,获取所述配置信息的更新信息。And obtaining update information of the configuration information according to the update indication information.
  7. 如权利要求6所述的方法,其特征在于,所述更新指示信息包括:所述配置信息的更新信息的标识,或者,所述配置信息的更新信息;The method according to claim 6, wherein the update indication information comprises: an identifier of the update information of the configuration information, or an update information of the configuration information;
    当所述更新指示信息包括所述配置信息的更新信息的标识时,根据所述更新指示信 息,获取所述配置信息的更新信息,具体包括:When the update indication information includes an identifier of the update information of the configuration information, according to the update indication letter And obtaining the update information of the configuration information, specifically:
    根据所述配置信息的更新信息的标识,从所述服务端获取所述配置信息的更新信息;Obtaining update information of the configuration information from the server according to the identifier of the update information of the configuration information;
    当所述更新指示信息包括所述配置信息的更新信息时,根据所述更新指示信息,获取所述配置信息的更新信息,具体包括:When the update indication information includes the update information of the configuration information, the update information of the configuration information is obtained according to the update indication information, which specifically includes:
    从所述更新指示信息中,获取所述配置信息的更新信息。And obtaining, from the update indication information, update information of the configuration information.
  8. 一种信息处理方法,其特征在于,包括:An information processing method, comprising:
    接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息;Receiving a service request sent by the client, where the service request includes an interface call request of the client for at least one service interface provided by the server, and status information of the configuration information on the client;
    根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。Determining and returning update indication information to the client according to the status information included in the service request, where the update indication information is used to indicate update information of the configuration information.
  9. 如权利要求8所述的方法,其特征在于,根据所述服务请求中包含的所述状态信息,确定更新指示信息,具体包括:The method of claim 8, wherein the determining the update indication information according to the status information included in the service request comprises:
    将所述服务请求中包含的所述状态信息传递给所述服务端上预设的消息处理单元,以便于所述消息处理单元根据所述状态信息,确定更新指示信息。And transmitting the status information included in the service request to a preset message processing unit on the server, so that the message processing unit determines the update indication information according to the status information.
  10. 如权利要求8或9所述的方法,其特征在于,所述状态信息包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上的配置信息的标识;The method according to claim 8 or 9, wherein the status information comprises: a latest update time of the configuration information on the client, or an identifier of the configuration information on the client;
    当所述状态信息包括所述客户端上的配置信息的最新更新时间时,按照如下方法,根据所述状态信息,确定更新指示信息:When the status information includes the latest update time of the configuration information on the client, the update indication information is determined according to the status information according to the following method:
    当确定所述服务端上的配置信息的最新更新时间大于所述客户端上的配置信息的最新更新时间时,确定所述服务端在所述客户端上的配置信息的最新更新时间之后,更新的所述配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息;When it is determined that the latest update time of the configuration information on the server is greater than the latest update time of the configuration information on the client, determining that the server updates after the latest update time of the configuration information on the client The update information of the configuration information is generated, and the update indication information is generated according to the update information, where the update indication information includes an identifier of the update information or the update information;
    当所述状态信息包括所述客户端上的配置信息的标识时,按照如下方法,根据所述状态信息,确定更新指示信息:When the status information includes the identifier of the configuration information on the client, the update indication information is determined according to the status information according to the following method:
    当确定所述服务端上存在对应的标识与所述客户端上的配置信息的标识不相同的配置信息时,将确定出的配置信息作为所述客户端上的配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息。When it is determined that the configuration information that is different from the identifier of the configuration information on the client is different on the server, the determined configuration information is used as update information of the configuration information on the client; The update information generates update indication information, wherein the update indication information includes an identifier of the update information or the update information.
  11. 一种信息处理装置,其特征在于,包括: An information processing apparatus, comprising:
    生成模块,用于根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;a generating module, configured to generate a service request including the status information according to an interface call request generated by the client for at least one service interface provided by the server, and status information of the configuration information on the client;
    发送模块,用于将所述服务请求发送给所述服务端。And a sending module, configured to send the service request to the server.
  12. 如权利要求11所述的装置,其特征在于,所述状态信息包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上的配置信息的标识。The apparatus according to claim 11, wherein the status information comprises: a latest update time of the configuration information on the client, or an identifier of the configuration information on the client.
  13. 如权利要求11所述的装置,其特征在于,所述状态信息通过所述服务请求的预定字段进行保存,包含在所述服务请求中。The apparatus of claim 11, wherein the status information is saved by a predetermined field of the service request and included in the service request.
  14. 如权利要求13所述的装置,其特征在于,所述接口调用请求包含所述至少一个服务接口的接口函数,以及所述接口函数的调用参数;The apparatus according to claim 13, wherein said interface call request comprises an interface function of said at least one service interface, and a call parameter of said interface function;
    所述生成模块具体用于:确定所述接口调用请求对应的代理实现类,其中,所述代理实现类是根据所述接口函数和所述预定字段生成的;根据所述代理实现类、所述接口函数的调用参数和所述状态信息,生成包含所述状态信息的服务请求。The generating module is specifically configured to: determine a proxy implementation class corresponding to the interface call request, where the proxy implementation class is generated according to the interface function and the predetermined field; according to the proxy implementation class, The calling parameter of the interface function and the state information generate a service request including the state information.
  15. 如权利要求14所述的装置,其特征在于,所述生成模块具体用于:根据所述代理实现类,对所述接口函数的调用参数进行转换,生成服务参数;获取所述状态信息,并通过所述预定字段保存所述状态信息;根据所述代理实现类、所述服务参数和保存了所述状态信息的所述预定字段,生成包含所述状态信息的服务请求。The device according to claim 14, wherein the generating module is configured to: convert a call parameter of the interface function according to the proxy implementation class, generate a service parameter; acquire the state information, and The state information is saved by the predetermined field; and a service request including the state information is generated according to the agent implementation class, the service parameter, and the predetermined field in which the state information is saved.
  16. 如权利要求11所述的装置,其特征在于,所述装置还包括:The device of claim 11 wherein said device further comprises:
    获取模块,用于在所述发送模块将所述服务请求发送给所述服务端之后,接收所述服务端根据所述服务请求中包含的所述状态信息,返回的更新指示信息;根据所述更新指示信息,获取所述配置信息的更新信息。An obtaining module, configured to receive, after the sending module sends the service request to the server, the update indication information returned by the server according to the state information included in the service request; Updating the indication information to obtain update information of the configuration information.
  17. 如权利要求16所述的装置,其特征在于,所述更新指示信息包括:所述配置信息的更新信息的标识,或者,所述配置信息的更新信息;The device according to claim 16, wherein the update indication information comprises: an identifier of the update information of the configuration information, or an update information of the configuration information;
    当所述更新指示信息包括所述配置信息的更新信息的标识时,所述发送模块具体用于:根据所述配置信息的更新信息的标识,从所述服务端获取所述配置信息的更新信息;When the update indication information includes the identifier of the update information of the configuration information, the sending module is specifically configured to: obtain the update information of the configuration information from the server according to the identifier of the update information of the configuration information. ;
    当所述更新指示信息包括所述配置信息的更新信息时,所述发送模块具体用于:从所述更新指示信息中,获取所述配置信息的更新信息。When the update indication information includes the update information of the configuration information, the sending module is specifically configured to: obtain the update information of the configuration information from the update indication information.
  18. 一种信息处理装置,其特征在于,包括:An information processing apparatus, comprising:
    接收模块,用于接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的 状态信息;a receiving module, configured to receive a service request sent by the client, where the service request includes an interface call request of the client for at least one service interface provided by the server, and configuration information on the client status information;
    返回模块,用于根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。And a returning module, configured to: according to the status information included in the service request, determine and return update indication information to the client, where the update indication information is used to indicate update information of the configuration information.
  19. 如权利要求18所述的装置,其特征在于,所述返回模块具体用于:将所述服务请求中包含的所述状态信息传递给所述服务端上预设的消息处理单元,以便于所述消息处理单元根据所述状态信息,确定更新指示信息。The device of claim 18, wherein the returning module is configured to: pass the status information included in the service request to a preset message processing unit on the server, to facilitate The message processing unit determines update indication information according to the status information.
  20. 如权利要求18或20所述的装置,其特征在于,所述状态信息包括:所述客户端上的配置信息的最新更新时间,或者,所述客户端上的配置信息的标识;The device according to claim 18 or 20, wherein the status information comprises: a latest update time of the configuration information on the client, or an identifier of the configuration information on the client;
    当所述状态信息包括所述客户端上的配置信息的最新更新时间时,所述返回模块按照如下方法,根据所述状态信息,确定更新指示信息:When the status information includes the latest update time of the configuration information on the client, the returning module determines the update indication information according to the status information according to the following method:
    当确定所述服务端上的配置信息的最新更新时间大于所述客户端上的配置信息的最新更新时间时,确定所述服务端在所述客户端上的配置信息的最新更新时间之后,更新的所述配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息;When it is determined that the latest update time of the configuration information on the server is greater than the latest update time of the configuration information on the client, determining that the server updates after the latest update time of the configuration information on the client The update information of the configuration information is generated, and the update indication information is generated according to the update information, where the update indication information includes an identifier of the update information or the update information;
    当所述状态信息包括所述客户端上的配置信息的标识时,所述返回模块按照如下方法,根据所述状态信息,确定更新指示信息:When the status information includes the identifier of the configuration information on the client, the returning module determines the update indication information according to the status information according to the following method:
    当确定所述服务端上存在对应的标识与所述客户端上的配置信息的标识不相同的配置信息时,将确定出的配置信息作为所述客户端上的配置信息的更新信息;根据所述更新信息生成更新指示信息,其中,所述更新指示信息中包含所述更新信息的标识或所述更新信息。When it is determined that the configuration information that is different from the identifier of the configuration information on the client is different on the server, the determined configuration information is used as update information of the configuration information on the client; The update information generates update indication information, wherein the update indication information includes an identifier of the update information or the update information.
  21. 一种终端,其特征在于,包括:A terminal, comprising:
    存储器,用于存储处理器可执行指令;a memory for storing processor executable instructions;
    处理器,耦合到所述存储器,用于读取所述存储器存储的可执行指令,作为响应,执行如下操作:根据客户端上生成的、针对服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息,生成包含所述状态信息的服务请求;将所述服务请求发送给所述服务端。a processor coupled to the memory for reading the executable instructions stored by the memory, and in response, performing an operation of: invoking a request according to an interface generated by the client for at least one service interface provided by the server, And the status information of the configuration information on the client, generating a service request including the status information; and sending the service request to the server.
  22. 一种终端,其特征在于,包括:A terminal, comprising:
    存储器,用于存储处理器可执行指令;a memory for storing processor executable instructions;
    处理器,耦合到所述存储器,用于读取所述存储器存储的可执行指令,作为响应,执行如下操作:接收客户端发送的服务请求,其中,所述服务请求包括所述客户端针对 服务端提供的至少一个服务接口的接口调用请求,以及所述客户端上的配置信息的状态信息;根据所述服务请求中包含的所述状态信息,确定并向所述客户端返回更新指示信息,所述更新指示信息用于指示所述配置信息的更新信息。 a processor coupled to the memory for reading executable instructions stored by the memory, and in response, performing an operation of: receiving a service request sent by a client, wherein the service request includes the client An interface call request of the at least one service interface provided by the server, and status information of the configuration information on the client; determining, according to the status information included in the service request, and returning update indication information to the client And the update indication information is used to indicate update information of the configuration information.
PCT/CN2016/106879 2015-12-03 2016-11-23 Information processing method and device WO2017092594A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510881312.2 2015-12-03
CN201510881312.2A CN106850242A (en) 2015-12-03 2015-12-03 A kind of information processing method and device

Publications (1)

Publication Number Publication Date
WO2017092594A1 true WO2017092594A1 (en) 2017-06-08

Family

ID=58796266

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/106879 WO2017092594A1 (en) 2015-12-03 2016-11-23 Information processing method and device

Country Status (2)

Country Link
CN (1) CN106850242A (en)
WO (1) WO2017092594A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947448A (en) * 2019-03-15 2019-06-28 努比亚技术有限公司 A kind of method for updating time, equipment and computer readable storage medium
CN111865687A (en) * 2020-07-20 2020-10-30 上海悦易网络信息技术有限公司 Service data updating method and equipment
CN112242935A (en) * 2019-07-19 2021-01-19 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for acquiring TCP state information
CN112463259A (en) * 2020-12-18 2021-03-09 杭州搜车网科技有限公司 Configuration information generation method, device, electronic device and medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120509B (en) * 2018-07-26 2021-12-28 创新先进技术有限公司 Information collection method and device
CN112597234A (en) * 2020-12-29 2021-04-02 拉卡拉支付股份有限公司 Data transmission method, data transmission device, electronic device, storage medium, and program product
CN113935301B (en) * 2021-10-19 2022-07-12 中国银行股份有限公司 Report generation method and device, storage medium and electronic equipment
CN115102857A (en) * 2022-05-31 2022-09-23 深圳市大头兄弟科技有限公司 Method, device, equipment and storage medium for updating client configuration data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129378A (en) * 2010-01-20 2011-07-20 腾讯科技(深圳)有限公司 Software menu updating method and device
CN103677860A (en) * 2012-08-30 2014-03-26 百度在线网络技术(北京)有限公司 Method and device for updating browser
CN103902692A (en) * 2014-03-27 2014-07-02 乐得科技有限公司 Application interface updating method, device and system
US20150039732A1 (en) * 2013-07-31 2015-02-05 Sap Ag Mobile application framework extensibiilty

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129378A (en) * 2010-01-20 2011-07-20 腾讯科技(深圳)有限公司 Software menu updating method and device
CN103677860A (en) * 2012-08-30 2014-03-26 百度在线网络技术(北京)有限公司 Method and device for updating browser
US20150039732A1 (en) * 2013-07-31 2015-02-05 Sap Ag Mobile application framework extensibiilty
CN103902692A (en) * 2014-03-27 2014-07-02 乐得科技有限公司 Application interface updating method, device and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947448A (en) * 2019-03-15 2019-06-28 努比亚技术有限公司 A kind of method for updating time, equipment and computer readable storage medium
CN109947448B (en) * 2019-03-15 2023-06-27 努比亚技术有限公司 Time updating method, device and computer readable storage medium
CN112242935A (en) * 2019-07-19 2021-01-19 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for acquiring TCP state information
CN112242935B (en) * 2019-07-19 2022-05-10 腾讯科技(深圳)有限公司 Method, device, equipment and storage medium for acquiring TCP state information
CN111865687A (en) * 2020-07-20 2020-10-30 上海悦易网络信息技术有限公司 Service data updating method and equipment
CN111865687B (en) * 2020-07-20 2023-05-30 上海万物新生环保科技集团有限公司 Service data updating method and device
CN112463259A (en) * 2020-12-18 2021-03-09 杭州搜车网科技有限公司 Configuration information generation method, device, electronic device and medium

Also Published As

Publication number Publication date
CN106850242A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
WO2017092594A1 (en) Information processing method and device
US10977103B2 (en) Awakening an application by means of a mobile browser
US11106776B2 (en) Digital certificate application
CN110839078B (en) Proxy push
US9706371B2 (en) Push notification middleware
AU2014269271B2 (en) Electronic device using logical channels for communication
US11025724B2 (en) Transport of control data in proxy-based network communications
CN102255935B (en) Cloud service consuming method, cloud service intermediary and cloud system
JP2019533235A5 (en)
US20150229598A1 (en) Method and system of synchroning an unread message in instant communication
WO2016177285A1 (en) Data pushing method and device
JP2019537768A5 (en)
EP3618563A1 (en) System, method, and device for exposing wireless module data storage
WO2017152753A1 (en) Service execution method and device
US20200304580A1 (en) Network information processing
WO2011144031A1 (en) Cloud service publishing method, cloud service publishing interface message packet and cloud service broker
WO2017167121A1 (en) Method and device for determining and applying association relationship between application programs
WO2022104555A1 (en) Mqtt protocol-based communication method and device
CN112835632B (en) Method and equipment for calling end capability and computer storage medium
US20230344793A1 (en) Email synchronization method and electronic device
CN108965359B (en) Communication method, communication device, readable medium, and electronic apparatus
KR20150084284A (en) Status message service providing method of electronic apparatus and electronic apparatus thereof
CN109729121B (en) Cloud storage system and method for realizing custom data processing in cloud storage system
US20160112525A1 (en) Distribution control device and method for same, push distribution system, and storage medium
WO2018214795A1 (en) Call indication method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16869904

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16869904

Country of ref document: EP

Kind code of ref document: A1