[go: up one dir, main page]

CN114021062B - Communication method, system and device - Google Patents

Communication method, system and device

Info

Publication number
CN114021062B
CN114021062B CN202111348553.2A CN202111348553A CN114021062B CN 114021062 B CN114021062 B CN 114021062B CN 202111348553 A CN202111348553 A CN 202111348553A CN 114021062 B CN114021062 B CN 114021062B
Authority
CN
China
Prior art keywords
target
browser
module
function
api
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111348553.2A
Other languages
Chinese (zh)
Other versions
CN114021062A (en
Inventor
郭维开
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Xuanxian Technology Co ltd
Original Assignee
Shanghai Xuanxian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Xuanxian Technology Co ltd filed Critical Shanghai Xuanxian Technology Co ltd
Priority to CN202111348553.2A priority Critical patent/CN114021062B/en
Publication of CN114021062A publication Critical patent/CN114021062A/en
Application granted granted Critical
Publication of CN114021062B publication Critical patent/CN114021062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

本发明实施例提供了一种通信方法、系统及装置,涉及互联网技术领域,目标浏览器接收即时通信服务器发送的针对目标功能模块的调用请求;该调用请求包括:与即时通信服务器的版本相匹配的浏览器中,目标功能模块的第一原始功能标识;基于目标浏览器对应的目标应用程序接口API中记录的,各功能模块的原始功能标识与目标浏览器中各功能模块的映射功能标识之间的对应关系,确定第一原始功能标识对应的映射功能标识,作为目标浏览器中目标功能模块的目标功能标识;按照目标功能标识调用目标功能模块,以得到第一目标资源;向即时通信服务器发送第一目标资源。如此实现了目标浏览器与即时通信服务器之间的数据通信,避免通信业务中断。

The embodiment of the present invention provides a communication method, system and device, which relates to the field of Internet technology, wherein a target browser receives a call request for a target function module sent by an instant communication server; the call request includes: a first original function identifier of the target function module in a browser that matches the version of the instant communication server; based on the correspondence between the original function identifiers of each function module and the mapped function identifiers of each function module in the target browser recorded in a target application program interface API corresponding to the target browser, a mapped function identifier corresponding to the first original function identifier is determined as the target function identifier of the target function module in the target browser; the target function module is called according to the target function identifier to obtain a first target resource; and the first target resource is sent to the instant communication server. In this way, data communication between the target browser and the instant communication server is realized, and communication service interruption is avoided.

Description

Communication method, system and device
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a communication method, system, and device.
Background
WebRTC (Web Real-Time Communication) protocol is one of the most mainstream protocols in the voice or video field of the internet, which has the best support capability across browsers and the strongest instantaneity. Based on the JS (JavaScript, just-in-time compiled programming language) library corresponding to WebRTC protocol, communication between various browsers can be realized. The JS library records APIs corresponding to different types and versions of browsers.
Specifically, for each browser, the instant communication server may communicate with the browser based on the API corresponding to the browser recorded in the JS library, and forward the data sent by the browser to other browsers, so as to implement communication between the browsers.
In the prior art, the instant messaging server may send a call request (first call request) for a target function module to a browser (first browser), where the first call request includes a function identifier (first function identifier) of the target function module in the first browser, and a corresponding relationship between the first function identifier and the target function module recorded in a first API corresponding to the first browser, and then the first browser may call the target function module according to the first function identifier and the first API. If the first browser performs version upgrading to be a second browser, and the function identifier of the target function module in the second browser is changed to be a second function identifier, the corresponding second browser records the corresponding relation between the second function identifier and the target function module in the corresponding second API. When the instant messaging server sends a call request (second call request) for the target function module to the second browser, the second browser cannot call the target function module according to the first function identifier and the second API because the second call request record is the first function identifier. And the second browser and the instant messaging server cannot perform data communication, so that the communication service is interrupted.
Disclosure of Invention
The embodiment of the invention aims to provide a communication method, a communication system and a communication device, so as to realize data communication between a target browser and an instant messaging server and avoid communication service interruption.
The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a communication method, the method being applied to a target browser, the method comprising:
The method comprises the steps of receiving a call request for a target function module sent by an instant messaging server, wherein the call request comprises a first original function identifier of the target function module in a browser matched with a version of the instant messaging server;
Based on the corresponding relation between the original function identification of each function module and the mapping function identification of each function module in the target browser, which is recorded in the target application program interface API corresponding to the target browser, determining the mapping function identification corresponding to the first original function identification as the target function identification of the target function module in the target browser;
Invoking the target function module according to the target function identifier to obtain a first target resource;
And sending the first target resource to the instant messaging server.
Optionally, before the receiving the call request for the target function module sent by the instant messaging server, the method further includes:
The method comprises the steps of sending a connection request to the instant messaging server so that the instant messaging server sends a preset interface library to the target browser, wherein the preset interface library records APIs (application program interfaces) corresponding to a plurality of browsers with different types and different versions;
Receiving the preset interface library;
And generating a target API corresponding to the target browser according to the preset interface library.
Optionally, the preset interface library records common API parts corresponding to multiple browsers of different types and different versions, and differential API parts corresponding to each browser;
the generating, according to the preset interface library, a target API corresponding to the target browser includes:
acquiring a difference API part corresponding to the type of the target browser and the version number of the target browser from the preset interface library as a target difference API part;
And combining the common API part and the target difference API part to obtain a target API corresponding to the target browser.
Optionally, the target difference API records a correspondence between an original function identifier of each function module and a mapping function identifier of each function module in the target browser.
Optionally, if the target function module is an audio function module, the first target resource is an audio file, and if the target function module is a video function module, the first target resource is a video file.
Optionally, the method further comprises:
And receiving a second target resource sent by the instant messaging server, wherein the second target resource is a resource sent by other browsers except the target browser and received by the instant messaging server.
In a second aspect of the present invention, there is also provided a communication method, the method being applied to an instant messaging server, the method comprising:
The method comprises the steps of sending a call request for a target function module to a target browser, wherein the call request comprises a first original function identifier of the target function module in the browser matched with the version of the instant messaging server, determining a mapping function identifier corresponding to the first original function identifier as the target function identifier of the target function module in the target browser based on a corresponding relation between the original function identifier of each function module and the mapping function identifier of each function module in the target browser recorded in a target API corresponding to the target browser, calling the target function module according to the target function identifier to obtain a first target resource, and sending the first target resource to the instant messaging server;
And receiving the first target resource.
Optionally, before the call request for the target function module sent to the target browser, the method further includes:
receiving a connection request sent by the target browser;
The method comprises the steps of receiving a target browser, sending a preset interface library to the target browser, recording common API parts corresponding to a plurality of browsers of different types and different versions and differential API parts corresponding to each browser in the preset interface library, enabling the target browser to receive the preset interface library, obtaining differential API parts corresponding to the types of the target browser and version numbers of the target browser from the preset interface library to serve as target differential API parts, and combining the common API parts and the target differential API parts to obtain target APIs corresponding to the target browser.
Optionally, the target difference API records a correspondence between an original function identifier of each function module and a mapping function identifier of each function module in the target browser.
Optionally, if the target function module is an audio function module, the first target resource is an audio file, and if the target function module is a video function module, the first target resource is a video file.
Optionally, the method further comprises:
receiving a second target resource sent by other browsers except the target browser;
And sending the second target resource to the target browser.
In a third aspect of the present invention, there is also provided a communication system, the communication system including a target browser, an instant messaging server, wherein:
the instant messaging server is used for sending a call request aiming at a target function module to the target browser, wherein the call request comprises a first original function identifier of the target function module in the browser matched with the version of the instant messaging server;
the target browser is used for receiving the calling request, determining a mapping function identifier corresponding to the first original function identifier based on the corresponding relation between the original function identifier of each function module and the mapping function identifier of each function module in the target browser, which is recorded in a first target API corresponding to the target browser, and calling the target function module according to the target function identifier to obtain a first target resource;
The instant messaging server is further configured to receive the first target resource.
In a fourth aspect of the present invention, there is also provided a communication apparatus, the apparatus being applied to a target browser, the apparatus comprising:
the system comprises a first receiving module, a second receiving module and a target function module, wherein the first receiving module is used for receiving a call request aiming at the target function module, which is sent by an instant messaging server, and the call request comprises a first original function identifier of the target function module in a browser matched with the version of the instant messaging server;
The target function identification determining module is used for determining a mapping function identification corresponding to the first original function identification based on the corresponding relation between the original function identification of each function module and the mapping function identification of each function module in the target browser, which is recorded in the target application program interface API corresponding to the target browser, and taking the mapping function identification as the target function identification of the target function module in the target browser;
the function calling module is used for calling the target function module according to the target function identifier so as to obtain a first target resource;
and the first sending module is used for sending the first target resource to the instant messaging server.
Optionally, the apparatus further includes:
The second sending module is used for sending a connection request to the instant messaging server before receiving the call request for the target function module sent by the instant messaging server so that the instant messaging server sends a preset interface library to the target browser, wherein the preset interface library records APIs (application program interfaces) corresponding to a plurality of browsers of different types and different versions;
the second receiving module is used for receiving the preset interface library;
And the target API generation module is used for generating a target API corresponding to the target browser according to the preset interface library.
Optionally, the preset interface library records common API parts corresponding to multiple browsers of different types and different versions, and differential API parts corresponding to each browser;
the target API generation module comprises:
a difference API part obtaining submodule, configured to obtain, from the preset interface library, a difference API part corresponding to the type of the target browser and the version number of the target browser, as a target difference API part;
And the target API generation submodule is used for combining the common API part and the target difference API part to obtain a target API corresponding to the target browser.
Optionally, the target difference API records a correspondence between an original function identifier of each function module and a mapping function identifier of each function module in the target browser.
Optionally, if the target function module is an audio function module, the first target resource is an audio file, and if the target function module is a video function module, the first target resource is a video file.
Optionally, the apparatus further includes:
and the third receiving module is used for receiving a second target resource sent by the instant messaging server, wherein the second target resource is a resource sent by other browsers except the target browser and received by the instant messaging server.
In a fifth aspect of the present invention, there is also provided a communication apparatus, the apparatus being applied to an instant messaging server, the apparatus comprising:
The system comprises a target browser, a first sending module, a first resource and a second resource, wherein the target browser is used for sending a call request aiming at a target function module to the target browser, the call request comprises a first original function identifier of the target function module in the browser matched with the version of the instant messaging server, so that the target browser determines a mapping function identifier corresponding to the first original function identifier as the target function identifier of the target function module in the target browser based on the corresponding relation between the original function identifier of each function module and the mapping function identifier of each function module in the target browser recorded in a target API corresponding to the target browser;
and the first receiving module is used for receiving the first target resource.
Optionally, the apparatus further includes:
The second receiving module is used for receiving a connection request sent by the target browser before the call request sent to the target browser for the target function module;
the target browser comprises a first sending module, a second sending module and a target browser, wherein the first sending module is used for sending a preset interface library to the target browser, the preset interface library records common API parts corresponding to a plurality of browsers with different types and different versions and differential API parts corresponding to each browser, so that the target browser receives the preset interface library, obtains the differential API parts corresponding to the types of the target browser and the version numbers of the target browser from the preset interface library and serves as a target differential API part, and combines the common API parts and the target differential API parts to obtain target APIs corresponding to the target browser.
Optionally, the target difference API records a correspondence between an original function identifier of each function module and a mapping function identifier of each function module in the target browser.
Optionally, if the target function module is an audio function module, the first target resource is an audio file, and if the target function module is a video function module, the first target resource is a video file.
Optionally, the apparatus further includes:
the third receiving module is used for receiving second target resources sent by other browsers except the target browser;
and the third sending module is used for sending the second target resource to the target browser.
The embodiment of the invention also provides the electronic equipment which is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the communication methods when executing the program stored in the memory.
The embodiment of the invention also provides a computer readable storage medium, which is characterized in that a computer program is stored in the computer readable storage medium, and the computer program realizes any one of the communication methods when being executed by a processor.
Embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the communication methods described above.
The communication method provided by the embodiment of the invention receives a call request for a target function module sent by an instant messaging server, wherein the call request comprises a first original function identifier of the target function module in a browser matched with a version of the instant messaging server, determines a mapping function identifier corresponding to the first original function identifier based on a corresponding relation between the original function identifier of each function module and the mapping function identifier of each function module in the target browser recorded in a target API corresponding to the target browser, and serves as the target function identifier of the target function module in the target browser, calls the target function module according to the target function identifier to obtain a first target resource, and sends the first target resource to the instant messaging server.
After the original function identification is received, the corresponding target function identification in the target browser can be determined based on the target API, namely, even if the target browser is upgraded, the function identification used for calling the target function module in the upgraded target browser can be determined, and the target browser can call the target function module based on the target function identification to obtain a first target resource, so that data communication between the target browser and the instant messaging server is realized, and communication service interruption is avoided.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1 is a flowchart of a communication method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another communication method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another communication method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a preset interface library according to an embodiment of the present invention;
FIG. 5 is a flow chart of a communication method according to an embodiment of the present invention;
FIG. 6 is a flow chart of another communication method according to an embodiment of the present invention;
fig. 7 is a block diagram of a communication system according to an embodiment of the present invention;
Fig. 8 is a block diagram of a communication device according to an embodiment of the present invention;
fig. 9 is a block diagram of a communication device according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
In the prior art, when a browser performs version upgrade, function identifiers corresponding to all function modules in the browser may change, and when the upgraded browser receives a call request for the function modules sent by an instant messaging server, the corresponding function modules may not be called according to the function identifiers in the call request. And the browser and the instant messaging server cannot communicate data, so that the communication service is interrupted.
In order to solve the above problems, the embodiment of the invention provides a communication method applied to a target browser. Referring to fig. 1, fig. 1 is a flowchart of a communication method according to an embodiment of the present invention, where the method may include the following steps:
s101, receiving a call request for a target function module sent by an instant messaging server.
S102, determining a mapping function identifier corresponding to the first original function identifier based on the corresponding relation between the original function identifiers of the function modules and the mapping function identifiers of the function modules in the target browser, which are recorded in the target API corresponding to the target browser, and taking the mapping function identifier as the target function identifier of the target function module in the target browser.
S103, calling a target function module according to the target function identification to obtain a first target resource.
And S104, sending the first target resource to the instant messaging server.
The call request comprises a first original function identifier of the target function module in the browser matched with the version of the instant messaging server.
According to the communication method provided by the embodiment of the invention, after the original function identification is received, the corresponding target function identification in the target browser can be determined based on the target API, namely, even if the target browser is upgraded, the function identification for calling the target function module in the upgraded target browser can be determined, and the target browser can call the target function module based on the target function identification to obtain the first target resource, so that the data communication between the target browser and the instant messaging server is realized, and the interruption of communication service is avoided.
In one implementation, the target browser may be any type and any version of browser, and each functional module based on WebRTC protocol, such as an audio functional module and a video functional module, is built in the target browser. The target functional module may be any of the functional modules described above. In order to realize the video communication among the browsers, the instant communication server can send a call request for the video function to the target browser, so that the target browser calls the video function module to obtain the video file, the video file is sent to other browsers except the target browser by the instant communication server, and in order to realize the video communication among the browsers, the instant communication server can send a call request for the video function to the target browser, so that the target browser calls the video function module to obtain the video file, the video file is sent to the instant communication server, and the video file is sent to the other browsers except the target browser by the instant communication server.
The function identifier corresponding to the target function module, the representation is in the target browser of the object, an interface number for an interface that invokes the target function module.
According to the manufacturer of the browser, the browser can be divided into different types, for example, the browser A is developed by the manufacturer A of the browser, the browser B is developed by the manufacturer B of the browser, and interfaces for calling the same functional module can be different among different types of browsers. Since the manufacturer of the browser will update the version of the browser, there may be different versions of the same type of browser, for example, the manufacturer a of the browser may develop a browser a, the browser a may have a 1.0 version of browser a, a 1.3 version of browser a, a 2.0 version of browser a, etc., and interfaces for invoking the same function module may be different between the same type of browser but different versions of browser.
For a certain type of browser, the first original function identifier carried in the call request for the target function module sent by the instant messaging server to the browser can be an interface number corresponding to the target function module in a browser of a designated version of the browser.
For example, when deploying an instant messaging server, a browser a with more version 3.0 is currently used, and an audio function module based on WebRTC protocol in the browser a with version 3.0 corresponds to interface 1 and a video function module corresponds to interface 2, then a technician may set an original function identifier in a call request for the audio function module to interface 1 and an original function identifier in a call request for the video function module to interface 2. When the instant communication server sends the calling request aiming at the video function module to the browser A of different versions, the original function of the calling request is identified as an interface 1, and when the instant communication server sends the calling request aiming at the video function module to the browser A of different versions, the original function of the calling request is identified as an interface 2.
In one implementation, the version of the target browser may be a specified version, or may be another version, if the version of the target browser is the specified version, the first original function identifier is the same as the corresponding mapping function identifier, and if the version of the target browser is not the specified version, the first original function identifier may not be the same as the corresponding mapping function identifier.
The technician can use the function identifiers corresponding to the function modules in the browser as mapping function identifiers. The API may record a correspondence between the original function identifier of each function module and the mapping function identifier, and the browser may determine the corresponding mapping function identifier according to the original function identifier of each function module, and call each function module through the corresponding mapping function identifier. Therefore, when the browser upgrades the version, the technician only needs to add the corresponding relation between the original function identifier and the mapping function identifier in the new API corresponding to the upgraded browser, and the upgraded browser can call the function module according to the call request for the function module sent by the new API and the instant messaging server. The call request for the function module sent by the instant messaging server is not required to be modified, and modification and test of program codes in the instant messaging server are avoided.
For example, in the call request of the instant messaging server for the audio function module, the recorded original function is identified as interface 1, and the audio function module corresponds to interface 5 in the target browser. The corresponding relationship between the original function identifier and the mapping function identifier recorded in the target API is the corresponding relationship between the interface 1 and the interface 5. When the target browser receives the request for calling the interface 1, the target browser can confirm that the mapping function interface corresponding to the interface 1 is the interface 5 through the target API, and then call the audio function module through the interface 5.
In one embodiment, the first target resource is an audio file if the target function module is an audio function module, and the first target resource is a video file if the target function module is a video function module.
The resource type of the first target resource is determined by the type of the target function module.
To enable audio communication between browsers, the instant messaging server may send a call request for the audio function module to the target browser. In order to achieve video communication between browsers, the instant messaging server may send a call request for the video function module to the target browser.
In one embodiment, referring to fig. 2, the method may further include, prior to step S101 on the basis of fig. 1:
S105, sending a connection request to the instant messaging server so that the instant messaging server sends a preset interface library to the target browser.
S106, receiving a preset interface library.
And S107, generating a target API corresponding to the target browser according to the preset interface library.
The preset interface library records APIs corresponding to a plurality of browsers of different types and different versions.
In one implementation, the preset interface library may be a JS library created in advance by a technician. A technician can modify the JS library, add APIs of browsers of different types and versions, and expand the application range of the JS library, so that more browsers of different types and versions can communicate data through the instant messaging server.
In one embodiment, a common API portion corresponding to a plurality of browsers of different types and different versions and a differential API portion corresponding to each browser are recorded in a preset interface library.
Referring to fig. 3, on the basis of fig. 2, step S107 includes:
S1071, acquiring a difference API part corresponding to the type of the target browser and the version number of the target browser from a preset interface library as a target difference API part.
And S1072, combining the common API part and the target difference API part to obtain a target API corresponding to the target browser.
Recorded in the preset interface library is the correspondence between the differential API portion and the browser type and browser version.
In one implementation, the common API part is a program code part for implementing the same function for all APIs in the preset interface library, and the program code part with the same function can be used as a parent class of all APIs. The differential API part is a program code part (differential code part) of each API implementing a function different from that of other APIs in the preset interface library, and the differential code part of the API may be regarded as a subclass of the API.
In one embodiment, the target difference API portion records a correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser.
For example, 10 APIs corresponding to the browser are stored in the preset interface library, and each of the 10 APIs has a differential API portion, so that 10 differential API portions can be stored in the preset interface library, and a common API portion of the 10 APIs is stored.
In this embodiment, the APIs in the preset interface library are formed by combining a common API portion and a differential API portion, and only the differential API portion in the APIs corresponding to each browser is different. Therefore, when the browser is subjected to version upgrading, a technician does not need to write the whole program code of the API corresponding to the upgraded browser, only needs to write the program code of the difference API part corresponding to the upgraded browser, and stores the program code into a preset interface library. The updated browser can generate a corresponding API through a preset interface library. The effort to write the program code of the API can be reduced.
Referring to fig. 4, fig. 4 is a schematic diagram of a preset interface library according to an embodiment of the present invention.
Devices represent the preset interface library, HANDLER INTERFACE (processor interface) represents the common API part, chrome58, safari11 represent the differential API part, chrome, safari represents the browser type, and 58, 11 represent the browser version number.
In one embodiment, a second target resource sent by the instant messaging server is received, where the second target resource is a resource sent by a browser other than the target browser and received by the instant messaging server.
The second target resource is an audio file if the instant messaging server sends a call request for the audio function module to any other browser, and is a video file if the instant messaging server sends a call request for the video function module to any other browser.
Any other browser can execute the same steps as the target browser to generate a second target resource, send the second target resource to the instant messaging server, and send the second target resource to the target browser by the instant messaging server.
In one implementation, the target browser may communicate data with any other browser (the third browser) through the instant messaging server, and send audio files or video files to each other. For example, user a uses a target browser to make a voice call or a video call with user B using a third browser.
In another implementation, the target browser may only send audio files or video files to the instant messaging server, and the third browser only receives audio files or video files forwarded by the instant messaging server. For example, when the user a uses the target browser to open live broadcast, the target browser only sends the audio file or the video file to the instant messaging server, and when the user B views live broadcast of the user a through the third browser, the third browser only receives the audio file or the video file forwarded by the instant messaging server.
In another implementation, the target browser may only send audio files or video files to the receiving communication server, and the third browser may only send audio files or video files to the instant communication server. For example, if the user B uses the third browser to open live broadcast, the third browser only sends the audio file or the video file to the instant messaging server, and if the user a views live broadcast of the user B through the target browser, the target browser only receives the audio file or the video file forwarded by the instant messaging server.
Based on the same inventive concept, the present invention also provides a communication method applied to an instant messaging server, referring to fig. 5, fig. 5 is a flowchart of a communication method provided by an embodiment of the present invention, where the method may include the following steps:
s501, sending a call request for a target function module to a target browser.
The calling request comprises a first original function identifier of a target function module in a browser matched with a version of the instant messaging server, the target browser is enabled to determine a mapping function identifier corresponding to the first original function identifier based on a corresponding relation between the original function identifier of each function module and the mapping function identifier of each function module in the target browser, which is recorded in a target API corresponding to the target browser, the mapping function identifier is used as a target function identifier of the target function module in the target browser, the target function module is called according to the target function identifier to obtain a first target resource, and the first target resource is sent to the instant messaging server.
S502, receiving a first target resource.
According to the communication method provided by the embodiment of the invention, after the original function identification is received, the corresponding target function identification in the target browser can be determined based on the target API, namely, even if the target browser is upgraded, the function identification for calling the target function module in the upgraded target browser can be determined, and the target browser can call the target function module based on the target function identification to obtain the first target resource, so that the data communication between the target browser and the instant messaging server is realized, and the interruption of communication service is avoided.
The processing method of the target browser may refer to the description of steps S101 to S104.
In one embodiment, referring to fig. 6, the method may further include, prior to step S501 on the basis of fig. 5:
S503, receiving a connection request sent by the target browser.
S504, sending a preset interface library to the target browser.
The method comprises the steps of recording common API parts corresponding to a plurality of browsers of different types and different versions and differential API parts corresponding to each browser in a preset interface library, enabling a target browser to receive the preset interface library, acquiring the differential API parts corresponding to the types of the target browser and the version numbers of the target browser from the preset interface library to serve as target differential API parts, and combining the common API parts and the target differential API parts to obtain target APIs corresponding to the target browser.
The processing method of the target browser may refer to the description of steps S1071-S1072.
In one embodiment, the target difference API portion records a correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser.
In one embodiment, the first target resource is an audio file if the target function module is an audio function module, and the first target resource is a video file if the target function module is a video function module.
In one embodiment, the method further comprises:
and step one, receiving a second target resource sent by other browsers except the target browser.
And step two, sending a second target resource to the target browser.
In one implementation, the instant messaging server may receive a first target resource of a target browser, and may also send a second target resource of another browser to the target browser, i.e. may implement data communication between the browsers.
Based on the same inventive concept, the invention also provides a communication system. Referring to fig. 7, fig. 7 is a block diagram of a communication system according to an embodiment of the present invention, which includes an instant messaging server 701 and a plurality of browsers (including a browser 7021, a browser 7022, and a browser 7023). The embodiment of the present invention is described by taking 3 browsers as examples, but is not limited to this. The target browser may be any one of the above-described browser 7021, browser 7022, and browser 7023.
The instant communication server 701 is configured to send a call request for a target function module to a target browser, where the call request includes a first original function identifier of the target function module in the browser that matches with a version of the instant communication server;
the system comprises a target browser, a first target resource, a first instant messaging server, a second instant messaging server, a first target resource, a second instant messaging server, a first target function module, a second target function module, a first target function module and a second target resource, wherein the target browser is used for receiving a calling request, and determining a mapping function identifier corresponding to the first original function identifier based on a corresponding relation between an original function identifier of each function module and a mapping function identifier of each function module in the target browser, which is recorded in a first target API corresponding to the target browser, as a target function identifier of the target function module in the target browser;
The instant messaging server 701 is further configured to receive a first target resource.
Based on the communication system provided by the embodiment of the invention, after receiving the original function identifier, the target browser can determine the corresponding target function identifier in the target browser based on the target API, namely, even if the target browser is upgraded, the function identifier for calling the target function module in the upgraded target browser can be determined, and the target browser can call the target function module based on the target function identifier to obtain the first target resource, so that the data communication between the target browser and the instant communication server is realized, and the interruption of communication service is avoided.
Based on the same inventive concept, the embodiment of the present invention further provides a communication device, which is applied to a target browser, referring to fig. 8, fig. 8 is a structural diagram of the communication device provided by the embodiment of the present invention, where the device includes:
The first receiving module 801 is configured to receive a call request for a target function module sent by an instant messaging server, where the call request includes a first original function identifier of the target function module in a browser that matches a version of the instant messaging server;
The target function identifier determining module 802 is configured to determine, based on a correspondence between an original function identifier of each function module and a mapping function identifier of each function module in the target browser, which is recorded in a target application program interface API corresponding to the target browser, a mapping function identifier corresponding to the first original function identifier, and use the mapping function identifier as a target function identifier of the target function module in the target browser;
A function calling module 803, configured to call a target function module according to the target function identifier, so as to obtain a first target resource;
the first sending module 804 is configured to send the first target resource to the instant messaging server.
In one embodiment, the apparatus further comprises:
the second sending module is used for sending a connection request to the instant messaging server before receiving the call request for the target function module sent by the instant messaging server, so that the instant messaging server sends a preset interface library to the target browser;
The second receiving module is used for receiving a preset interface library;
And the target API generation module is used for generating a target API corresponding to the target browser according to the preset interface library.
In one embodiment, a common API portion corresponding to a plurality of browsers of different types and different versions and a differential API portion corresponding to each browser are recorded in a preset interface library;
A target API generation module comprising:
The difference API part acquisition submodule is used for acquiring a difference API part corresponding to the type of the target browser and the version number of the target browser from a preset interface library and taking the difference API part as a target difference API part;
and the target API generation submodule is used for combining the shared API part and the target difference API part to obtain a target API corresponding to the target browser.
In one embodiment, the target difference API portion records a correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser.
In one embodiment, the first target resource is an audio file if the target function module is an audio function module, and the first target resource is a video file if the target function module is a video function module.
In one embodiment, the apparatus further comprises:
The third receiving module is configured to receive a second target resource sent by the instant messaging server, where the second target resource is a resource sent by a browser other than the target browser to the instant messaging server.
Based on the same inventive concept, the embodiment of the present invention further provides a communication device, which is applied to an instant messaging server, referring to fig. 9, fig. 9 is a structural diagram of the communication device provided by the embodiment of the present invention, where the device includes:
The first sending module 901 is used for sending a call request aiming at a target function module to a target browser, wherein the call request comprises a first original function identifier of the target function module in the browser matched with the version of the instant messaging server, so that the target browser determines a mapping function identifier corresponding to the first original function identifier based on a corresponding relation between the original function identifier of each function module and the mapping function identifier of each function module in the target browser recorded in a target API corresponding to the target browser, and takes the mapping function identifier as the target function identifier of the target function module in the target browser;
a first receiving module 902 is configured to receive a first target resource.
In one embodiment, the apparatus further comprises:
the second receiving module is used for receiving a connection request sent by the target browser before a call request sent to the target browser for the target function module;
The system comprises a first sending module, a second sending module and a target browser, wherein the first sending module is used for sending a preset interface library to the target browser, common API parts corresponding to a plurality of browsers of different types and different versions and differential API parts corresponding to each browser are recorded in the preset interface library, so that the target browser receives the preset interface library, acquires the differential API parts corresponding to the types of the target browser and the version numbers of the target browser from the preset interface library and serves as a target differential API part, and combines the common API parts and the target differential API parts to obtain target APIs corresponding to the target browser.
In one embodiment, the target difference API portion records a correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser.
In one embodiment, the first target resource is an audio file if the target function module is an audio function module, and the first target resource is a video file if the target function module is a video function module.
In one embodiment, the apparatus further comprises:
The third receiving module is used for receiving second target resources sent by other browsers except the target browser;
and the third sending module is used for sending the second target resource to the target browser.
The embodiment of the invention also provides an electronic device, as shown in fig. 10, which comprises a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004,
A memory 1003 for storing a computer program;
The processor 1001 is configured to implement the communication method according to any of the above embodiments when executing the program stored in the memory 1003.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor including a central processing unit (Central Processing Unit, CPU), a network Processor (Network Processor, NP), etc., or may be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the communication methods described above.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the communication methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system, apparatus, electronic device, computer readable storage medium, and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (19)

1.一种通信方法,其特征在于,应用于目标浏览器,所述方法包括:1. A communication method, characterized in that it is applied to a target browser, the method comprising: 接收即时通信服务器发送的针对目标功能模块的调用请求;所述调用请求包括:与所述即时通信服务器的版本相匹配的浏览器中,所述目标功能模块的第一原始功能标识;Receiving a call request for a target functional module sent by an instant communication server; the call request includes: a first original functional identifier of the target functional module in a browser that matches the version of the instant communication server; 基于所述目标浏览器对应的目标应用程序接口API中记录的,各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系,确定所述第一原始功能标识对应的映射功能标识,作为所述目标浏览器中所述目标功能模块的目标功能标识;Based on the correspondence between the original function identifiers of each function module and the mapped function identifiers of each function module in the target browser recorded in the target application program interface API corresponding to the target browser, determine the mapped function identifier corresponding to the first original function identifier as the target function identifier of the target function module in the target browser; 按照所述目标功能标识调用所述目标功能模块,以得到第一目标资源;Calling the target function module according to the target function identifier to obtain a first target resource; 向所述即时通信服务器发送所述第一目标资源;Sending the first target resource to the instant messaging server; 在所述接收即时通信服务器发送的针对目标功能模块的调用请求之前,所述方法还包括:Before receiving the call request for the target function module sent by the instant messaging server, the method further includes: 向所述即时通信服务器发送连接请求,以使所述即时通信服务器向所述目标浏览器发送预设接口库;所述预设接口库中记录了不同类型、且不同版本的多个浏览器对应的共有API部分,以及每一浏览器对应的差异API部分;Sending a connection request to the instant communication server so that the instant communication server sends a preset interface library to the target browser; the preset interface library records the common API parts corresponding to multiple browsers of different types and versions, and the difference API parts corresponding to each browser; 接收所述预设接口库;Receiving the preset interface library; 从所述预设接口库中,获取与所述目标浏览器的类型和所述目标浏览器的版本号对应的差异API部分,作为目标差异API部分;Acquire, from the preset interface library, a difference API part corresponding to the type of the target browser and the version number of the target browser as a target difference API part; 对所述共有API部分和所述目标差异API部分进行组合,得到所述目标浏览器对应的目标API。The common API part and the target difference API part are combined to obtain a target API corresponding to the target browser. 2.根据权利要求1所述的方法,其特征在于,所述目标差异API部分记录了各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系。2. The method according to claim 1 is characterized in that the target difference API part records the correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser. 3.根据权利要求1所述的方法,其特征在于,若所述目标功能模块的为音频功能模块,则所述第一目标资源为音频文件;若所述目标功能模块为视频功能模块,则所述第一目标资源为视频文件。3. The method according to claim 1 is characterized in that if the target functional module is an audio functional module, the first target resource is an audio file; if the target functional module is a video functional module, the first target resource is a video file. 4.根据权利要求1所述的方法,其特征在于,所述方法还包括:4. The method according to claim 1, characterized in that the method further comprises: 接收所述即时通信服务器发送的第二目标资源,所述第二目标资源为所述即时通信服务器接收到的除所述目标浏览器以外的其他浏览器发送的资源。A second target resource sent by the instant communication server is received, where the second target resource is a resource sent by a browser other than the target browser and received by the instant communication server. 5.一种通信方法,其特征在于,应用于即时通信服务器,所述方法包括:5. A communication method, characterized in that it is applied to an instant communication server, the method comprising: 向目标浏览器发送针对目标功能模块的调用请求;所述调用请求包括:与所述即时通信服务器的版本相匹配的浏览器中,所述目标功能模块的第一原始功能标识;以使所述目标浏览器接收所述调用请求;基于所述目标浏览器对应的目标API中记录的,各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系,确定所述第一原始功能标识对应的映射功能标识,作为所述目标浏览器中所述目标功能模块的目标功能标识;按照所述目标功能标识调用所述目标功能模块,以得到第一目标资源;向所述即时通信服务器发送所述第一目标资源;Sending a call request for a target functional module to a target browser; the call request includes: a first original functional identifier of the target functional module in a browser that matches the version of the instant communication server; so that the target browser receives the call request; based on the correspondence between the original functional identifiers of each functional module and the mapped functional identifiers of each functional module in the target browser recorded in the target API corresponding to the target browser, determining a mapped functional identifier corresponding to the first original functional identifier as a target functional identifier of the target functional module in the target browser; calling the target functional module according to the target functional identifier to obtain a first target resource; sending the first target resource to the instant communication server; 接收所述第一目标资源;receiving the first target resource; 在所述向目标浏览器发送的针对目标功能模块的调用请求之前,所述方法还包括:Before sending the call request for the target functional module to the target browser, the method further includes: 接收所述目标浏览器发送的连接请求;Receiving a connection request sent by the target browser; 向所述目标浏览器发送预设接口库;所述预设接口库中记录了不同类型、且不同版本的多个浏览器对应的共有API部分,以及每一浏览器对应的差异API部分;以使所述目标浏览器接收所述预设接口库,从所述预设接口库中,获取与所述目标浏览器的类型和所述目标浏览器的版本号对应的差异API部分,作为目标差异API部分;对所述共有API部分和所述目标差异API部分进行组合,得到所述目标浏览器对应的目标API。A preset interface library is sent to the target browser; the preset interface library records the common API part corresponding to multiple browsers of different types and different versions, and the difference API part corresponding to each browser; so that the target browser receives the preset interface library, obtains the difference API part corresponding to the type of the target browser and the version number of the target browser from the preset interface library as the target difference API part; and the common API part and the target difference API part are combined to obtain the target API corresponding to the target browser. 6.根据权利要求5所述的方法,其特征在于,所述目标差异API部分记录了各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系。6. The method according to claim 5, characterized in that the target difference API part records the correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser. 7.根据权利要求5所述的方法,其特征在于,若所述目标功能模块为音频功能模块,则所述第一目标资源为音频文件;若所述目标功能模块为视频功能模块,则所述第一目标资源为视频文件。7. The method according to claim 5 is characterized in that if the target functional module is an audio functional module, the first target resource is an audio file; if the target functional module is a video functional module, the first target resource is a video file. 8.根据权利要求5所述的方法,其特征在于,所述方法还包括:8. The method according to claim 5, characterized in that the method further comprises: 接收除所述目标浏览器以外的其他浏览器发送的第二目标资源;Receiving a second target resource sent by other browsers except the target browser; 向所述目标浏览器发送所述第二目标资源。The second target resource is sent to the target browser. 9.一种通信系统,其特征在于,所述通信系统包括目标浏览器、即时通信服务器,其中:9. A communication system, characterized in that the communication system comprises a target browser and an instant communication server, wherein: 所述即时通信服务器,用于向所述目标浏览器发送针对目标功能模块的调用请求;所述调用请求包括:与所述即时通信服务器的版本相匹配的浏览器中,所述目标功能模块的第一原始功能标识;The instant communication server is used to send a call request for a target functional module to the target browser; the call request includes: a first original functional identifier of the target functional module in a browser that matches the version of the instant communication server; 所述目标浏览器,用于接收所述调用请求;基于所述目标浏览器对应的第一目标API中记录的,各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系,确定所述第一原始功能标识对应的映射功能标识,作为所述目标浏览器中所述目标功能模块的目标功能标识;按照所述目标功能标识调用所述目标功能模块,以得到第一目标资源;向所述即时通信服务器发送所述第一目标资源;The target browser is used to receive the call request; based on the correspondence between the original function identifiers of each function module and the mapped function identifiers of each function module in the target browser recorded in the first target API corresponding to the target browser, determine the mapped function identifier corresponding to the first original function identifier as the target function identifier of the target function module in the target browser; call the target function module according to the target function identifier to obtain a first target resource; and send the first target resource to the instant messaging server; 所述即时通信服务器,还用于接收所述第一目标资源;The instant messaging server is further configured to receive the first target resource; 所述目标浏览器,还用于在所述接收所述调用请求之前,向所述即时通信服务器发送连接请求,以使所述即时通信服务器向所述目标浏览器发送预设接口库;所述预设接口库中记录了不同类型、且不同版本的多个浏览器对应的共有API部分,以及每一浏览器对应的差异API部分;接收所述预设接口库;从所述预设接口库中,获取与所述目标浏览器的类型和所述目标浏览器的版本号对应的差异API部分,作为目标差异API部分;对所述共有API部分和所述目标差异API部分进行组合,得到所述目标浏览器对应的目标API。The target browser is also used to send a connection request to the instant communication server before receiving the call request, so that the instant communication server sends a preset interface library to the target browser; the preset interface library records the common API parts corresponding to multiple browsers of different types and versions, and the difference API parts corresponding to each browser; receive the preset interface library; obtain the difference API part corresponding to the type of the target browser and the version number of the target browser from the preset interface library as the target difference API part; combine the common API part and the target difference API part to obtain the target API corresponding to the target browser. 10.一种通信装置,其特征在于,应用于目标浏览器,所述装置包括:10. A communication device, characterized in that it is applied to a target browser, and the device comprises: 第一接收模块,用于接收即时通信服务器发送的针对目标功能模块的调用请求;所述调用请求包括:与所述即时通信服务器的版本相匹配的浏览器中,所述目标功能模块的第一原始功能标识;A first receiving module is used to receive a call request for a target functional module sent by an instant communication server; the call request includes: a first original functional identifier of the target functional module in a browser that matches the version of the instant communication server; 目标功能标识确定模块,用于基于所述目标浏览器对应的目标应用程序接口API中记录的,各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系,确定所述第一原始功能标识对应的映射功能标识,作为所述目标浏览器中所述目标功能模块的目标功能标识;a target function identifier determination module, configured to determine, based on the correspondence between the original function identifiers of the function modules and the mapped function identifiers of the function modules in the target browser and recorded in the target application program interface API corresponding to the target browser, a mapped function identifier corresponding to the first original function identifier as the target function identifier of the target function module in the target browser; 功能调用模块,用于按照所述目标功能标识调用所述目标功能模块,以得到第一目标资源;A function calling module, used for calling the target function module according to the target function identifier to obtain a first target resource; 第一发送模块,用于向所述即时通信服务器发送所述第一目标资源;A first sending module, used for sending the first target resource to the instant messaging server; 所述装置还包括:The device also includes: 第二发送模块,用于在所述接收即时通信服务器发送的针对目标功能模块的调用请求之前,向所述即时通信服务器发送连接请求,以使所述即时通信服务器向所述目标浏览器发送预设接口库;所述预设接口库中记录了不同类型、且不同版本的多个浏览器对应的共有API部分,以及每一浏览器对应的差异API部分;A second sending module is used to send a connection request to the instant communication server before receiving the call request for the target functional module sent by the instant communication server, so that the instant communication server sends a preset interface library to the target browser; the preset interface library records the common API parts corresponding to multiple browsers of different types and different versions, and the difference API parts corresponding to each browser; 第二接收模块,用于接收所述预设接口库;A second receiving module, used for receiving the preset interface library; 目标API生成模块,包括:Target API generation module, including: 差异API部分获取子模块,用于从所述预设接口库中,获取与所述目标浏览器的类型和所述目标浏览器的版本号对应的差异API部分,作为目标差异API部分;A difference API part acquisition submodule, used to acquire, from the preset interface library, a difference API part corresponding to the type of the target browser and the version number of the target browser as a target difference API part; 目标API生成子模块,用于对所述共有API部分和所述目标差异API部分进行组合,得到所述目标浏览器对应的目标API。The target API generation submodule is used to combine the common API part and the target difference API part to obtain the target API corresponding to the target browser. 11.根据权利要求10所述的装置,其特征在于,所述目标差异API部分记录了各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系。11. The device according to claim 10, characterized in that the target difference API part records the correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser. 12.根据权利要求10所述的装置,其特征在于,若所述目标功能模块的为音频功能模块,则所述第一目标资源为音频文件;若所述目标功能模块为视频功能模块,则所述第一目标资源为视频文件。12. The device according to claim 10 is characterized in that if the target functional module is an audio functional module, the first target resource is an audio file; if the target functional module is a video functional module, the first target resource is a video file. 13.根据权利要求10所述的装置,其特征在于,所述装置还包括:13. The device according to claim 10, characterized in that the device further comprises: 第三接收模块,用于接收所述即时通信服务器发送的第二目标资源,所述第二目标资源为所述即时通信服务器接收到的除所述目标浏览器以外的其他浏览器发送的资源。The third receiving module is used to receive a second target resource sent by the instant communication server, where the second target resource is a resource sent by a browser other than the target browser and received by the instant communication server. 14.一种通信装置,其特征在于,应用于即时通信服务器,所述装置包括:14. A communication device, characterized in that it is applied to an instant messaging server, the device comprising: 第一发送模块,用于向目标浏览器发送针对目标功能模块的调用请求;所述调用请求包括:与所述即时通信服务器的版本相匹配的浏览器中,所述目标功能模块的第一原始功能标识;以使所述目标浏览器基于所述目标浏览器对应的目标API中记录的,各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系,确定所述第一原始功能标识对应的映射功能标识,作为所述目标浏览器中所述目标功能模块的目标功能标识;按照所述目标功能标识调用所述目标功能模块,以得到第一目标资源;向所述即时通信服务器发送所述第一目标资源;A first sending module is used to send a call request for a target functional module to a target browser; the call request includes: a first original functional identifier of the target functional module in a browser that matches the version of the instant communication server; so that the target browser determines a mapped functional identifier corresponding to the first original functional identifier as a target functional identifier of the target functional module in the target browser based on the correspondence between the original functional identifiers of each functional module and the mapped functional identifiers of each functional module in the target browser recorded in a target API corresponding to the target browser; calls the target functional module according to the target functional identifier to obtain a first target resource; and sends the first target resource to the instant communication server; 第一接收模块,用于接收所述第一目标资源;A first receiving module, configured to receive the first target resource; 所述装置还包括:The device also includes: 第二接收模块,用于在所述向目标浏览器发送的针对目标功能模块的调用请求之前,接收所述目标浏览器发送的连接请求;A second receiving module is used to receive a connection request sent by the target browser before sending a call request for the target functional module to the target browser; 第二发送模块,用于向所述目标浏览器发送预设接口库;所述预设接口库中记录了不同类型、且不同版本的多个浏览器对应的共有API部分,以及每一浏览器对应的差异API部分;以使所述目标浏览器接收所述预设接口库,从所述预设接口库中,获取与所述目标浏览器的类型和所述目标浏览器的版本号对应的差异API部分,作为目标差异API部分;对所述共有API部分和所述目标差异API部分进行组合,得到所述目标浏览器对应的目标API。The second sending module is used to send a preset interface library to the target browser; the preset interface library records the common API parts corresponding to multiple browsers of different types and different versions, and the difference API parts corresponding to each browser; so that the target browser receives the preset interface library, obtains the difference API part corresponding to the type of the target browser and the version number of the target browser from the preset interface library, as the target difference API part; and combines the common API part and the target difference API part to obtain the target API corresponding to the target browser. 15.根据权利要求14所述的装置,其特征在于,所述目标差异API部分记录了各功能模块的原始功能标识与所述目标浏览器中各功能模块的映射功能标识之间的对应关系。15. The device according to claim 14, characterized in that the target difference API part records the correspondence between the original function identifier of each function module and the mapped function identifier of each function module in the target browser. 16.根据权利要求14所述的装置,其特征在于,若所述目标功能模块为音频功能模块,则所述第一目标资源为音频文件;若所述目标功能模块为视频功能模块,则所述第一目标资源为视频文件。16. The device according to claim 14 is characterized in that if the target function module is an audio function module, the first target resource is an audio file; if the target function module is a video function module, the first target resource is a video file. 17.根据权利要求16所述的装置,其特征在于,所述装置还包括:17. The device according to claim 16, characterized in that the device further comprises: 第三接收模块,用于接收除所述目标浏览器以外的其他浏览器发送的第二目标资源;A third receiving module, used for receiving a second target resource sent by other browsers except the target browser; 第三发送模块,用于向所述目标浏览器发送所述第二目标资源。The third sending module is used to send the second target resource to the target browser. 18.一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;18. An electronic device, characterized in that it comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; 存储器,用于存放计算机程序;Memory, used to store computer programs; 处理器,用于执行存储器上所存放的程序时,实现权利要求1-4,或,5-8任一所述的方法步骤。A processor, for implementing the method steps described in any one of claims 1-4, or 5-8, when executing a program stored in a memory. 19.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-4,或,5-8任一所述的方法步骤。19. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in any one of claims 1-4, or 5-8 are implemented.
CN202111348553.2A 2021-11-15 2021-11-15 Communication method, system and device Active CN114021062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111348553.2A CN114021062B (en) 2021-11-15 2021-11-15 Communication method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111348553.2A CN114021062B (en) 2021-11-15 2021-11-15 Communication method, system and device

Publications (2)

Publication Number Publication Date
CN114021062A CN114021062A (en) 2022-02-08
CN114021062B true CN114021062B (en) 2025-07-18

Family

ID=80064262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111348553.2A Active CN114021062B (en) 2021-11-15 2021-11-15 Communication method, system and device

Country Status (1)

Country Link
CN (1) CN114021062B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462478A (en) * 2014-12-18 2015-03-25 北京奇虎科技有限公司 Mobile browser client and webpage interacting method, device and client
CN112491943A (en) * 2019-09-12 2021-03-12 北京国双科技有限公司 Data request method, device, storage medium and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8539475B2 (en) * 2009-09-29 2013-09-17 Oracle America, Inc. API backward compatibility checking
US20130275943A1 (en) * 2012-04-11 2013-10-17 Oracle International Corporation Determining interface differences between different versions of an operating system
US9342617B1 (en) * 2015-05-19 2016-05-17 Parrable, Inc. Unique identifiers for browsers
CN106095458B (en) * 2016-06-20 2018-12-11 腾讯科技(深圳)有限公司 The management method and device of plug-in unit in a kind of application program
CN113641341B (en) * 2021-08-20 2023-06-30 烽火通信科技股份有限公司 Dynamic self-adaption method and device of gdbus object interface

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104462478A (en) * 2014-12-18 2015-03-25 北京奇虎科技有限公司 Mobile browser client and webpage interacting method, device and client
CN112491943A (en) * 2019-09-12 2021-03-12 北京国双科技有限公司 Data request method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114021062A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN110716734B (en) Method, device, electronic equipment and medium for upgrading software
CN111538651A (en) Interface testing method, device, server and storage medium
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
CN113885920A (en) Method, device, electronic device and storage medium for hot update of machine learning model
CN109729121A (en) A kind of cloud storage system and the method for realizing self-defining data processing in cloud storage system
CN112468585B (en) Data transmission method and device, electronic equipment and storage medium
CN108874427A (en) A kind of update progress acquisition methods, device and readable storage medium storing program for executing
CN112637085A (en) Flow recording method and device, computer equipment and storage medium
WO2016045082A1 (en) Policy implementation method, device and system
CN113778511A (en) Resource allocation method, device, equipment and storage medium
CN110392080B (en) Deployment method and device based on distributed system and distributed system
CN112579682A (en) Data model change notification method and device, electronic device and storage medium
CN113747200B (en) Video processing method and device, electronic equipment and readable storage medium
CN109194706B (en) Network resource dial testing method and terminal
CN114021062B (en) Communication method, system and device
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN113867778B (en) Image file generation method and device, electronic equipment and storage medium
CN114221996B (en) A service calling method, device, electronic device, and storage medium
CN110221880B (en) Application programming interface calling method, device, equipment and medium
CN112035119B (en) Data deleting method and device
CN110209513B (en) A broadcast registration method, device, device and medium for application program
CN109918895B (en) Method, electronic device, and computer-readable medium for outputting data
CN113391872B (en) Task processing method and device, electronic equipment and storage medium
CN112256646B (en) Method and device for operating file system subdirectory, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant