Interaction method, device, computer device, distributed system and storage medium

By storing the lowest version information of the peer on both the client and server sides, the problem of interaction between high-version clients and low-version servers is solved, achieving flexible version compatibility and a shortened upgrade cycle.

CN115914331BActive Publication Date: 2026-03-20ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, higher version clients cannot interact with lower version servers, which restricts version upgrades, affects client usage, and prolongs the upgrade cycle.

Method used

The client and server each store the lowest supported peer version information. By comparing the version information of the local end and the initiating end, they determine whether to interact and use the lowest version of the interaction protocol to process the request.

Benefits of technology

It enables flexible interaction between high-version clients and low-version servers, reduces the constraints of version upgrades, shortens the upgrade cycle, and avoids system anomalies caused by some servers failing to upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914331B_ABST
    Figure CN115914331B_ABST
Patent Text Reader

Abstract

The embodiment of the present specification provides an interaction method and device, computer equipment, a distributed system and a storage medium. The method is applied to the server or the client. The method comprises the following steps: receiving an interaction request initiated by an initiating end. The interaction request carries current supported opposite end minimum version information stored by the initiating end. According to the current version information of the local end and the current supported opposite end minimum version information stored by the initiating end, it is determined whether to interact with the initiating end.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the technical field of computer, and particularly relates to an interaction method and device, a computer device, a distributed system and a storage medium. BACKGROUND

[0002] A client can include many functions, some of which need to interact with a server. When these functions are upgraded, a new version of the client and a new version of the server are generated.

[0003] Currently, when the server receives a request of the client carrying a current version of the client, the server checks the current version of the client. If the current version of the server is higher than the current version of the client, the request of the client can be processed by using an interaction protocol. If the current version of the server is lower than the current version of the client, the server directly rejects the request.

[0004] Therefore, in the above interaction processing scheme, the high-version client cannot interact with the low-version server, which affects the use of the client and leads to certain constraints in version upgrade. SUMMARY

[0005] To overcome the problems in the related art, the embodiments of the present specification provide an interaction method and device, a computer device, a distributed system and a storage medium.

[0006] According to a first aspect of the embodiments of the present specification, an interaction method is provided, the method is applied to a server or a client, and the method comprises the following steps.

[0007] receiving an interaction request initiated by an initiating end, the interaction request carrying current supported minimum version information of a peer end stored by the initiating end;

[0008] determining whether to interact with the initiating end according to a current version identifier of the local end and the current supported minimum version information of the peer end stored by the initiating end.

[0009] According to a second aspect of the embodiments of the present specification, an interaction device is provided, the device is applied to a server or a client, and the device comprises the following modules.

[0010] a receiving module, configured to receive an interaction request initiated by an initiating end, the interaction request carrying current supported minimum version information of a peer end stored by the initiating end;

[0011] a determining module, configured to determine whether to interact with the initiating end according to a current version identifier of the local end and the current supported minimum version information of the peer end stored by the initiating end.

[0012] According to a third aspect of the embodiments of the present specification, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the method embodiment of the first aspect when executing the computer program.

[0013] According to a fourth aspect of the embodiments of the present specification, a distributed system is provided, comprising a plurality of servers, the servers comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the method embodiment of the first aspect when executing the computer program.

[0014] According to a fifth aspect of the embodiments of the present specification, a computer readable storage medium is provided, having a computer program stored thereon, the computer program being executed by a processor to implement the steps of the method embodiment of the first aspect.

[0015] The technical solutions provided by the embodiments of the present specification can include the following beneficial effects:

[0016] In the embodiments of the present specification, the interaction method can be applied to the server or the client, and the interaction request initiated by the initiator carries the current supported minimum version information of the opposite end stored by the initiator. According to the current version information of the local end and the current supported minimum version information of the opposite end stored by the initiator, it is determined whether to interact with the initiator. In this embodiment, since the client and the server store the current supported minimum version information of the opposite end respectively, in the processing of the interaction request, it is determined whether to interact with the initiator according to the current version information of the local end and the current supported minimum version information of the opposite end stored by the initiator, so that the low version local end can more flexibly determine whether to interact when facing the interaction of the high version initiator, and the interaction request of the high version initiator can also be processed. In addition, this interaction method also enables the high version initiator to access the low version local end, so as to reduce the constraints of version upgrade in the upgrade scenario of the server and the client.

[0017] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present specification. BRIEF DESCRIPTION OF DRAWINGS

[0018] The accompanying drawings, which are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present specification and, together with the specification, serve to explain the principles of the present specification.

[0019] Figure 1 is a schematic diagram of a distributed system according to an exemplary embodiment of the present specification.

[0020] Figure 2 is a flowchart of an interaction method according to an example embodiment of the present specification.

[0021] Figure 3 is a flowchart of another interaction method according to an example embodiment of the present specification.

[0022] Figure 4 is a block diagram of a computer device in which an interaction device according to an example embodiment of the present specification is located.

[0023] Figure 5 is a block diagram of an interaction device according to an example embodiment of the present specification. DETAILED DESCRIPTION

[0024] The example embodiments will be described in detail herein with reference to the accompanying drawings. When the following description refers to accompanying drawings, unless otherwise specified, the same numbers in different drawings indicate the same or similar elements. The implementations described in the following example embodiments do not represent all implementations consistent with the present specification. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present specification as detailed in the appended claims.

[0025] The terminology used in the present specification is for the purpose of describing particular embodiments only and is not intended to limit the present specification. As used in the present specification and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0026] It should be understood that although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order. These terms are used only to distinguish one piece of information from another. For example, without departing from the scope of the present specification, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if' as used herein can be interpreted as "when" or "upon" or "in response to determining".

[0027] As shown in FIG. 1, a distributed system according to an example embodiment of the present specification includes a server cluster, the server cluster including k servers, each server being deployed with a service end. Figure 1 Figure 1 Each service end can be connected to a client, and each client can be connected to a plurality of service ends. Figure 1 ​i client interactions in the k clusters. k and i are both integers greater than 1, and in actual applications, they can be configured according to needs, and specific values are not limited in this embodiment.

[0028] In related technologies, a client and a server support only one-way compatibility, that is, a high-version server supports a low-version client, and a high-version client cannot access a low-version server. The server is usually configured with multiple versions of interaction protocols from the latest version to a low version. Here, the interaction protocol refers to an agreement between the server and the client on how to handle the function of interaction. In the one-way compatibility mode of the client and the server, when the client and the server interact, the client carries a current version number of the client in a request sent to the server; if a low-version client accesses a high-version server, the high-version server can interact with the client using an interaction protocol adapted to the low-version client. If the current version of the server is lower than the current version of the client, the server directly rejects the request.

[0029] However, this interaction mode affects the use of the client. For example, some interaction requests of a high-version client can actually be compatible and processed by a low-version server, but the above-mentioned direct rejection of the interaction request affects the use of the client.

[0030] In addition, this interaction mode also has a relatively large constraint on version upgrade in a cluster scenario, and it is necessary to ensure that the full-version server is upgraded to a high version before the client is upgraded. In this mode, the server is required to deploy a new version of the server before a new version of the client is released. In this way, when the new version of the client is used, the client can access the new version of the server and obtain the function support of the new version of the server.

[0031] For example, Figure 1 In the cluster shown, because the business scenario depends on the new function of the new version of the client, the staff of the service party must upgrade the server version of the cluster to enable, and the upgrade dependency is relatively large. In some scenarios, the client is also deployed on the device of the service party by the staff of the service party, and the staff needs to upgrade the new version of the client on each device after all servers are upgraded to the new version of the server, and the overall upgrade period is relatively long. If some servers appear abnormal during the server upgrade process, resulting in that some servers are not successfully upgraded and are in a low version, a high-version client accesses a low-version server, and the interaction protocol may be incorrect, thereby causing system abnormalities.

[0032] Based on this, the embodiment of the present specification provides an interaction method. Since the client and the server store the current supported minimum version information of the opposite end respectively, in the processing of the interaction request, whether to interact with the initiating end is determined according to the current version information of the local end and the current supported minimum version information of the opposite end stored by the initiating end, so that when the low-version local end faces the interaction of the high-version initiating end, it can be more flexible to determine whether to interact, so that the interaction request of the high-version initiating end can also be processed. In addition, this interaction method also enables the high-version initiating end to access the low-version local end, so as to reduce the constraints of version upgrade in the upgrade scenario of the server and the client.

[0033] As shown in Figure 2 In the embodiment, the client and the server store the current supported minimum version information of the opposite end respectively, that is:

[0034] The client stores the current supported minimum server version information minServerVersion.

[0035] The server stores the current supported minimum client version information minClientVersion.

[0036] The method of the embodiment is applied to the server or the client, and the method can include the following steps:

[0037] In step 202, an interaction request initiated by an initiating end is received, and the interaction request carries the current supported minimum version information of the opposite end stored by the initiating end.

[0038] In step 204, whether to interact with the initiating end is determined according to the current version information of the local end and the current supported minimum version information of the opposite end stored by the initiating end.

[0039] In the embodiment, the version information can include various information for indicating the version, such as version identification and the like. In some examples, the version identification can be implemented in multiple ways, such as Chinese, English or numbers, and the like, which are not limited in the embodiment. Optionally, the numbers can be used to implement, and the use of numbers occupies less storage space. For example, the version identification is indicated by an integer, since the client and the server need to maintain the version identification of each version, the use of integer to indicate the version identification occupies less storage space in implementation, and can reduce the overhead. In the case of using numbers, the high and low of the version identification can be reflected by the high and low of the numerical value, which can facilitate subsequent version comparison. For example, the high and low of the version can be indicated by the high and low order of the numerical value, or vice versa, which is optional, and can be configured according to the actual application.

[0040] In some examples, the client also stores current version information of the client, and the server also stores current version information of the server.

[0041] As an example, the client maintains two version numbers:

[0042] ① currentVersion, the current version of the client; each time a new version is released, the current version number is increased, for example, if a number is used to represent the version number, then a new version is added, and the version number + 1;

[0043] ② minServerVersion, the minimum version of the server that is relied on.

[0044] Therefore, the client records the highest version information currentVersion of the local end and the minimum version information minServerVersion of the peer end that is currently supported.

[0045] The server also maintains two version numbers:

[0046] ① currentVersion, the current version supported by the server; each time a new version is released, the current version number + 1;

[0047] ② minClientVersion, the minimum client version supported by the server.

[0048] Therefore, the server records the highest version information currentVersion of the local end and the minimum version information minClientVersion of the peer end that is currently supported.

[0049] In some examples, the client can initiate an interaction request to the server, and the server applies the method of the present embodiment to process the interaction request to determine whether to interact with the initiating end. In other examples, the server can initiate an interaction request to the client, and the client applies the method of the present embodiment to process the interaction request to determine whether to interact with the initiating end.

[0050] The interaction request in the present embodiment carries the current minimum version information of the peer end supported by the initiating end, which describes the minimum version of the peer end required by the initiating end. Based on this, after receiving the interaction request, the local end can determine whether it can support the initiating end according to its own version, that is, whether it can interact with the initiating end.

[0051] In some examples, the determining whether to interact with the initiator can include determining whether the current version of the local end is higher than a current supported minimum version of the opposite end stored by the initiator, and determining to interact with the initiator if the current version of the local end is higher than the current supported minimum version of the opposite end stored by the initiator, and otherwise rejecting the interaction request. That is, the current version of the local end represents the highest version of the local end, and if the supported minimum version of the opposite end supported by the initiator is higher than the current version of the local end, it indicates that the local end cannot currently interact with the initiator. If the current version of the local end is higher than the current supported minimum version of the opposite end stored by the initiator, it indicates that the local end can interact with the initiator.

[0052] For example, for a service end, the service end determines whether the current version of the local end Server.currentVersion is lower than the supported minimum version of the opposite end information Client.minServerVersion of the client. If yes, it indicates that the service end cannot currently interact with the client, because the minimum required version of the service end by the client is higher than the current version of the service end. If no, it indicates that the current version of the service end is equal to or higher than the minimum required version of the service end by the client, and thus the service end can interact with the client.

[0053] For example, for a service end, the service end determines whether the current version of the local end Server.currentVersion is lower than the supported minimum version of the opposite end information Client.minServerVersion of the client. If yes, it indicates that the service end cannot currently interact with the client, because the minimum required version of the service end by the client is higher than the current version of the service end. If no, it indicates that the current version of the service end is equal to or higher than the minimum required version of the service end by the client, and thus the service end can interact with the client.

[0054] In some examples, the client and the service end respectively store an interaction protocol corresponding to each version from a target version of the local end to a current version of the local end, the target version of the local end being lower than the current version of the local end; for example:

[0055] The client stores an interaction protocol corresponding to each version from a client version n to a current version of the client, the client version n being lower than the current version of the client.

[0056] The service end stores an interaction protocol corresponding to each version from a service end version m to a current version of the service end, the service end version m being lower than the current version of the service end.

[0057] The interaction request carries current version information of the initiator, and the interacting with the initiator includes:

[0058] From the stored interaction protocols, the interaction protocol corresponding to the lower version between the current version information of the local end and the current version information of the initiating end is acquired, and the acquired interaction protocol is used to interact with the initiating end.

[0059] The embodiment does not limit the number of stored versions. For example, the server can store the interaction protocols corresponding to each version between version SV and the current version, where version SV is lower than the current version of the server. Similarly, the client stores the interaction protocols corresponding to each version between version CV and the current version, where version CV is lower than the current version of the client.

[0060] The interaction protocol refers to the agreement between the server and the client on how to handle the interacted function, which can include any information for handling the interacted function. For example, the client is provided with function A, which needs to interact with the server. The interaction protocol of the client for function A can include any information of function A, for example, the interaction protocol can include a module in the source code of the client that implements function A, including but not limited to the definition of one or more functions or parameters in the function that implement function A, and the like.

[0061] Different versions have different interaction protocols. In some examples, the embodiment of storing the interaction protocols of each version can be that each version corresponds to a complete interaction protocol. The target version can also correspond to a complete interaction protocol, and other versions correspond to protocol change information relative to the target version. For example, storing the interaction protocols corresponding to each version between versions V1 and V3 can be storing the interaction protocol of version V1, the interaction protocol corresponding to V2 stores the change information relative to the interaction protocol of V1, and the interaction protocol corresponding to V3 stores the change information relative to the interaction protocol of V2. When the interaction protocol of V2 is needed, the interaction protocol of V1 and the recorded change information can be obtained.

[0062] In the embodiment, when the current version of the local end is higher than the current supported lowest version of the opposite end stored by the initiating end, the local end can interact with the initiating end; during the interaction, the interaction protocol corresponding to the lower version between the current version information of the local end and the current version information of the initiating end is used to interact, so that the initiating end and the local end can interact.

[0063] In some examples, the initiator can initiate the interaction request using the stored lowest version of the interaction protocol when initiating the interaction request; for example, if a high version client accesses a low version server, assuming that the current interaction request is generated in the latest version of the client, the low version server can not be able to process the interaction request. Using the lowest version of the interaction protocol to generate the interaction protocol makes it possible for the low version server to process, and thus the above embodiment ensures that the current interaction request can be processed when the initiator accesses the low version of the local end.

[0064] In some examples, the interaction with the initiator using the obtained interaction protocol can include: processing the interaction request using the obtained interaction protocol, obtaining a response message to the interaction request and sending it to the initiator; wherein the response message carries the current version identifier of the local end, so that the initiator obtains the interaction protocol corresponding to the lower version of the current version identifier of the initiator and the current version identifier of the local end carried in the response message from the stored interaction protocols, and processes the response message using the obtained interaction protocol.

[0065] In this embodiment, if the current version of the local end is higher than the current supported minimum version of the opposite end stored by the initiator, it means that the local end can interact with the initiator; therefore, in the interaction process, the interaction is performed using the lower version of the current version of the local end and the current version of the initiator.

[0066] For example, taking the application to the server as an example, if the current version of the server Server.currentVersion is greater than or equal to the minServerVersion of the client, and the current version of the server Server.currentVersion is greater than or equal to the current version of the client Clien.currentVersion, the server processes the interaction request using the interaction protocol corresponding to the current version of the client, and replies to the client with a response message, which also carries the current version of the server.

[0067] If the current version of the server Server.currentVersion is greater than or equal to the minServerVersion of the client, and the current version of the server Server.currentVersion is less than the current version of the client Clien.currentVersion, the server processes the interaction request using the interaction protocol corresponding to the current version of the server, and replies to the client with a response message, which also carries the current version of the server.

[0068] For the client, when receiving the response message of the server, since the response message carries the current version Server.currentVersion of the server, the response message is processed according to the interactive protocol corresponding to min (the current version of the client, the current version of the server). Wherein, min (the current version of the client, the current version of the server) indicates the smaller one of the two.

[0069] In practical application, the client includes at least one preset function, that is, the client and the server interact through each of the preset functions. The current supported minimum version information of the opposite end includes: the current supported minimum version information of the opposite end corresponding to each preset function.

[0070] The receiving of the interactive request initiated by the initiator, the interactive request carrying the current supported minimum version information of the opposite end stored by the initiator, includes: receiving the interactive request initiated by the initiator for the target function, the interactive request carrying the current supported minimum version information of the opposite end corresponding to the target function stored by the initiator.

[0071] In practical application, the client and the server can interact through multiple different functions. Each time the version is upgraded, only part of the function is upgraded. After upgrading, the version information changes. In order to realize the more fine-grained management of each function and make the client and the server compatible to complete the interaction, in the embodiment, the client and the server store the current supported minimum version information of the opposite end corresponding to each preset function. For example, the preset functions of the client include function A, function B and function C, the client stores a client current version, stores minServerVersion corresponding to function A, stores minServerVersion corresponding to function B, and stores minServerVersion corresponding to function C.

[0072] When the initiator initiates the interactive request for the target function, the initiator can determine the minServerVersion of the target function by querying the stored data, and make the interactive request of the target function carry the minServerVersion of the target function. Therefore, in the case of multiple functions of the client, the embodiment can realize the more fine-grained management of each function.

[0073] As Figure 3 shown is a schematic diagram of another interactive method according to an exemplary embodiment of the present specification. Figure 3 In the embodiment, a certain client accessing the server is taken as an example for description.

[0074] For example, a high-version client accesses a low-version server. The current version of the client is CV6. The client stores the first type of interaction protocol from version CV3 to the current version CV6, four versions from low to high, and also stores the current version number CV6 and the minimum version information of the dependent server minServerVersion, which is SV3. SV3 corresponds to CV3, and the minimum version CV3 stored by the client also indicates that the minimum version of the dependent server is the version corresponding to CV3.

[0075] The current version of the accessed server is SV7. The server stores the second type of interaction protocol from version SV4 to the current version SV7, four versions from low to high, and also stores the current version number SV7 and the minimum version information of the supported client minClientVersion, which is CV4. CV4 corresponds to SV4, and the minimum version SV4 stored by the server also indicates that the minimum version of the supported client is the version corresponding to CV4.

[0076] When the client responds to the user's trigger request for the target function, the client initiates an interaction request for the target function, and determines the minServerVersion that supports the target function from the stored record.

[0077] The interaction request sent by the client to the server carries the currentVersion and minServerVersion.

[0078] On the server side, the server processes the interaction request according to the version number carried by the client.

[0079] If the current version Server.currentVersion of the server is lower than the minServerVersion of the client, the response fails and the interaction request is rejected. In this embodiment, the current version of the server is SV7 and the minServerVersion of the client is SV3, so the server can interact with the client.

[0080] Otherwise, the server determines the smaller one between the current version of the client Client.currentVersion and the current version of the server Server.currentVersion, and processes the interaction request by using the interaction protocol corresponding to the smaller one. For example, the current version of the client is CV6, and the current version of the server is SV7. Since SV7 is higher than CV6, the server determines that the smaller one is CV6. CV6 corresponds to SV6. The server selects the interaction protocol corresponding to SV6 from the stored interaction protocols of the second type, processes the interaction request, and generates a response message to the interaction request. The response message carries the current version of the server.

[0081] When receiving the response message of the server, since the response message carries the current version of the server Server.currentVersion, the client also determines the smaller one between the current version of the client Client.currentVersion and the current version of the server Server.currentVersion, and processes the interaction request by using the interaction protocol corresponding to the smaller one. For example, the current version of the client is CV6, and the current version of the server is SV7. Since SV7 is higher than CV6, the client determines that the smaller one is CV6. The client selects the interaction protocol corresponding to CV6 from the stored interaction protocols of the first type, and processes the response message. Thus, the client and the server both realize bidirectional compatibility by identifying the current version information of the other party, and can further complete subsequent interactions.

[0082] For example, a high-version client accesses a low-version server. Still taking the above client as an example, the client accesses another low-version server.

[0083] The current version of the accessed server Server.currentVersion is SV5. The server stores the second type of interaction protocols from SV3 to SV5, and also stores the current version SV5 and the minimum supported client version information minClientVersion, which is CV4. CV4 corresponds to SV4. The minimum version SV4 stored by the server also indicates that the minimum supported client version of the server is the version corresponding to CV4.

[0084] Therefore, when the high-version client CV6 accesses the low-version server SV5, the interactive request carries the Client.currentVersion CV6 and the minServerVersion SV4, and the server receives the interactive request. When the server receives the interactive request, it is determined that the Server.currentVersion SV5 is greater than the minServerVersion SV4, and the server determines that it can interact with the client and will not reject the interactive request.

[0085] The server determines that the lower one of the Client.currentVersion CV6 and the Server.currentVersion SV5 is SV5 based on the Client.currentVersion CV6 and the Server.currentVersion SV5, and therefore selects the interactive protocol corresponding to SV5 to process the interactive request to obtain a response message. The response message carries the Server.currentVersion SV5.

[0086] The client receives the response message, determines that the lower one of the Server.currentVersion SV5 and the Client.currentVersion CV6 is SV5 based on the Server.currentVersion SV5 and the Client.currentVersion CV6 carried in the response message, and therefore selects the interactive protocol corresponding to CV5 to process the response message.

[0087] As can be seen from the above embodiment, in the embodiment, after the bidirectional compatible interactive protocol between the client and the server is realized by the current supported minimum version information of the opposite end stored by the client and the server respectively, the constraint of supporting only unidirectional compatibility is eliminated. Therefore, the high-version client can also access the low-version server. In a cluster scenario, the upgrade of the client does not depend on the upgrade of all cluster servers, reduces the upgrade dependency between the client and the server, and enables the online of new functions of the client to depend on the upgrade of the full-amount backend service, thereby shortening the upgrade online period. For example, in a cluster scenario, the new-version client and the new-version server can be independently and simultaneously deployed on a computer device, and there is no need to wait for all servers to deploy the server before deploying the new-version client. If there is a server that fails to be upgraded successfully due to an exception in the upgrade process and is in a low version, the high-version client that is upgraded can also interact with the low-version server and will not cause an exception.

[0088] Corresponding to the foregoing embodiments of the interactive method, the present specification also provides embodiments of an interactive device and a terminal to which the interactive device is applied.

[0089] Embodiments of the interactive device of the present specification can be applied on a computer device, such as a server or a terminal device. The device embodiments can be implemented by software, or by hardware, or by a combination of software and hardware. Taking the software implementation as an example, as a logically meaningful device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for running by the processor where it is located. From the hardware level, as shown in Figure 4 The hardware structure diagram of the computer device where the interactive device of the present specification is located, in addition to the processor 410, the memory 430, the network interface 420, and the non-volatile memory 440 shown in Figure 4 , the computer device where the interactive device 331 is located in the embodiments can also include other hardware according to the actual function of the computer device, which will not be described here.

[0090] As shown in Figure 5 , Figure 5 is a block diagram of an interactive device according to an exemplary embodiment of the present specification, which is applied to a server or a client, and the device includes:

[0091] The receiving module 51 is configured to receive an interactive request initiated by an initiating end, and the interactive request carries current supported minimum version information of a peer end stored by the initiating end.

[0092] The determining module 52 is configured to determine whether to interact with the initiating end according to a current version identifier of the local end and the current supported minimum version information of the peer end stored by the initiating end.

[0093] In some examples, the determining module 52 is further configured to:

[0094] determine whether the current version of the local end is higher than the current supported minimum version of the peer end stored by the initiating end.

[0095] If yes, it is determined to interact with the initiating end, otherwise the interactive request is rejected.

[0096] In some examples, the client and the server respectively store: an interactive protocol corresponding to each version between a target version of the local end and a current version of the local end, the target version of the local end being lower than the current version of the client.

[0097] The determining module 52 is further configured to:

[0098] obtain an interactive protocol corresponding to the lower version of the current version information of the local end and the current version information of the initiating end from each interactive protocol stored by the local end, and interact with the initiating end by using the obtained interactive protocol.

[0099] In some examples, the determining module 52 is further configured to:

[0100] The interaction request is processed by using the obtained interaction protocol, a response message to the interaction request is obtained, and the response message is sent to the initiating end.

[0101] The response message carries the current version information of the local end, so that the initiating end obtains, from the stored interaction protocols, an interaction protocol corresponding to the lower version of the current version information of the initiating end and the current version information of the local end carried in the response message, and processes the response message by using the obtained interaction protocol.

[0102] In some examples, the interaction request is initiated by the initiating end by using the stored lowest version interaction protocol.

[0103] In some examples, the client includes at least one preset function.

[0104] The current supported lowest version information of the opposite end includes current supported lowest version information of the opposite end corresponding to each preset function, respectively.

[0105] The received interaction request initiated by the initiating end carries the current supported lowest version information of the opposite end stored by the initiating end, and the interaction request includes:

[0106] The received interaction request initiated by the initiating end carries the current supported lowest version information of the opposite end stored by the initiating end, and the interaction request includes:

[0107] The functions and effects of the modules in the above interaction device are specifically described in the implementation process of the corresponding steps in the above interaction method, and will not be repeated here.

[0108] Correspondingly, the present specification also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the interaction method of the above-mentioned embodiments when executing the computer program.

[0109] Correspondingly, the present specification also provides a distributed system, including a plurality of servers, the server including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the interaction method of the above-mentioned embodiments when executing the computer program.

[0110] Correspondingly, the present specification also provides a computer program product, including a computer program, the computer program being executed by a processor to implement the steps of the above-mentioned interaction method embodiments.

[0111] Correspondingly, the embodiments of the present specification also provide a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the interaction method embodiments when executing the program.

[0112] Correspondingly, the embodiments of the present specification also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the interaction method embodiments.

[0113] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts are described in the part of the method embodiments. The device embodiments described above are only illustrative, wherein the modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, i.e., they can be located in one place or distributed on multiple network modules. Part or all of the modules can be selected to achieve the purpose of the present specification according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0114] The above embodiments can be applied to one or more computer devices, which are devices capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions. The hardware of the electronic device includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0115] The computer device can be a server. The computer device can be any electronic product that can interact with the user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive Internet Protocol Television (IPTV), a smart wearable device, etc.

[0116] The computer device can also include a network device and / or a user device. The network device includes but is not limited to a single network server, a server group composed of multiple network servers or a cloud composed of a large number of hosts or network servers based on cloud computing.

[0117] The network in which the computer device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), and the like.

[0118] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in which they are recited in the embodiments and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous or necessary.

[0119] The division of steps of the above various methods is only for the purpose of clear description. When implemented, some steps can be combined into one step or some steps can be split into multiple steps, as long as the same logical relationship is included, which is within the protection scope of the present patent; adding insignificant modifications or introducing insignificant designs in the algorithm or process, but not changing the core design of the algorithm and process, are within the protection scope of the present application.

[0120] Wherein, the description of "specific examples" or "some examples" means that the specific features, structures, materials or characteristics described in connection with the described embodiments or examples are included in at least one embodiment or example of the present specification. In the present specification, the illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0121] Other embodiments of the present specification will be readily apparent to those skilled in the art upon considering the specification in its entirety. The specification is intended to cover any variations, uses, or adaptations of the present specification following the general principles thereof and including modifications and equivalents that are obvious to those skilled in the art. The specification and examples are to be regarded in an illustrative rather than a restrictive sense, and the true scope and spirit of the present specification are indicated by the following claims.

[0122] It should be understood that the present specification is not limited to the precise structures described and shown in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present specification is limited only by the appended claims.

[0123] The above description is only the preferred embodiment of the present specification, and is not used to limit the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.

Claims

1. An interaction method, the method being applied to a server or a client, wherein the client and the server respectively store: an interaction protocol corresponding to each version from the target version of the client to the current version of the client, wherein the target version of the client is lower than the current version of the client; the method includes: Receive an interaction request initiated by the initiating end, the interaction request carrying the lowest supported peer version information stored by the initiating end and the current version information of the initiating end; Based on the current version information of this end and the lowest supported peer version information stored on the initiating end, determine whether to interact with the initiating end; If it is determined that interaction with the initiating end is to be performed, the lower of the current version information of the local end and the current version information of the initiating end is obtained from the various interaction protocols stored on the local end, and the interaction protocol corresponding to the initiating end is used to interact with the initiating end.

2. The method according to claim 1, wherein determining whether to interact with the initiating end includes: Determine whether the current version of the local end is higher than the lowest supported version of the peer stored on the initiating end; If yes, then interaction with the initiating party will be initiated; otherwise, the interaction request will be rejected.

3. The method according to claim 1 or 2, wherein interacting with the initiating end using the acquired interaction protocol includes: The interaction request is processed using the acquired interaction protocol to obtain a response message for the interaction request and send it to the initiating end; The response message carries the current version information of the local end, so that the initiating end can obtain the lower version of the initiating end's current version information and the local current version information carried in the response message from the stored interaction protocols, and process the response message using the obtained interaction protocol.

4. The method according to claim 1, wherein the interaction request is initiated by the initiating end using the lowest version of the stored interaction protocol.

5. The method according to claim 1, wherein the client includes at least one preset function; The currently supported minimum peer version information includes: the currently supported minimum peer version information corresponding to each preset function; The receiving end initiates an interaction request, the interaction request carrying information about the lowest currently supported peer version stored by the receiving end, including: The system receives an interaction request for a target function initiated by the initiating end. The interaction request carries the lowest supported peer version information for the target function stored by the initiating end.

6. An interactive device, the device being applied to a server or a client, wherein the client and the server respectively store: an interaction protocol corresponding to each version from a target version to the current version of the client, wherein the target version is lower than the current version of the client; the device comprises: The receiving module is configured to: receive an interaction request initiated by the initiating end, wherein the interaction request carries the lowest supported peer version information stored by the initiating end and the current version information of the initiating end; The determination module is used to: determine whether to interact with the initiating end based on the current version identifier of the local end and the lowest supported peer version information stored by the initiating end; If it is determined that interaction with the initiating end is to be performed, the lower of the current version information of the local end and the current version information of the initiating end is obtained from the various interaction protocols stored on the local end, and the interaction protocol corresponding to the initiating end is used to interact with the initiating end.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A distributed system comprising multiple servers, each server including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method of any one of claims 1 to 5.