CN116069403A - Communication expansion method, device, equipment and medium - Google Patents

Communication expansion method, device, equipment and medium Download PDF

Info

Publication number
CN116069403A
CN116069403A CN202111284117.3A CN202111284117A CN116069403A CN 116069403 A CN116069403 A CN 116069403A CN 202111284117 A CN202111284117 A CN 202111284117A CN 116069403 A CN116069403 A CN 116069403A
Authority
CN
China
Prior art keywords
expansion
plug
data
processed
target data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111284117.3A
Other languages
Chinese (zh)
Inventor
钱哨
胡官钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202111284117.3A priority Critical patent/CN116069403A/en
Publication of CN116069403A publication Critical patent/CN116069403A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Abstract

The embodiment of the disclosure relates to a communication expansion method, a device, equipment and a medium, wherein the method is applied to an IOS (operation system) platform of electronic equipment and comprises the following steps: receiving data to be processed through an expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface; and performing expansion processing on the data to be processed through the expansion plug-in to obtain target data and transferring the target data. The target data is sent to the application program and/or the target data is sent to the server through the system session interface. According to the embodiment of the disclosure, the expansion plug-in is added in the IOS operating system platform of the electronic equipment, so that the expansion processing of network requests and/or network responses can be realized, and compared with the related technology, a large number of codes are prevented from being written, the occurrence rate of errors is reduced, and the utilization rate of the codes is improved.

Description

Communication expansion method, device, equipment and medium
Technical Field
The disclosure relates to the field of communication technologies, and in particular, to a communication expansion method, device, equipment and medium.
Background
With the continuous development of internet technology and intelligent devices, access to networks through applications in the devices is becoming an increasingly popular function.
Currently, an IOS operating system platform of an electronic device can provide a protocol stack of a basic hypertext transfer protocol (Hyper Transfer protocol, HTTP) for network access, but once complex communication services are involved, a large amount of codes are often required to be written to achieve a desired function or target because an extension mechanism is not provided, so that the workload is high and the possibility of errors is high.
Disclosure of Invention
In order to solve the technical problems described above or at least partially solve the technical problems described above, the present disclosure provides a communication extension method, apparatus, device, and medium.
The embodiment of the disclosure provides a communication extension method, which is applied to an IOS operating system platform of electronic equipment and comprises the following steps:
receiving data to be processed through an expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface;
and carrying out expansion processing on the data to be processed through the expansion plug-in unit to obtain target data and forwarding the target data.
The embodiment of the disclosure also provides a communication expansion device, which is arranged on an IOS operating system platform of the electronic equipment and comprises:
the data receiving module is used for receiving data to be processed through the expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface;
and the expansion processing module is used for carrying out expansion processing on the data to be processed through the expansion plug-in to obtain target data and forwarding the target data.
The embodiment of the disclosure also provides an electronic device, which comprises: a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the instructions to implement a communication extension method as provided in an embodiment of the disclosure.
The present disclosure also provides a computer-readable storage medium storing a computer program for executing the communication expansion method as provided by the embodiments of the present disclosure.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: according to the communication expansion scheme provided by the embodiment of the disclosure, an IOS (operation on site) operating system platform of the electronic device receives data to be processed through an expansion plug-in, the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface, and the expansion plug-in is used for carrying out expansion processing on the data to be processed to obtain target data and forwarding the target data. By adopting the technical scheme, the expansion processing of the network request and/or the network response can be realized by adding the expansion plug-in the IOS operating system platform of the electronic equipment, and compared with the related technology, the method and the device have the advantages of avoiding writing a large number of codes, reducing the occurrence rate of errors and improving the utilization rate of the codes.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart of a communication expansion method according to an embodiment of the disclosure;
fig. 2 is a flow chart of another communication expansion method according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of a communication extension provided by an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a communication expansion device according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
In order to solve the problems of large workload and high error rate when the related technology performs a complex communication expansion function in an IOS operating system platform of an electronic device, an embodiment of the disclosure provides a communication expansion method, and the method is described below with reference to specific embodiments.
Fig. 1 is a schematic flow chart of a communication expansion method provided in an embodiment of the disclosure, where the method may be performed by a communication expansion device, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method is applied to an IOS operating system platform of an electronic device, and includes:
step 101, receiving data to be processed through an expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface.
Among other things, the extension plug-in (plug in) may be a computer application that can interact with the host application to provide specific functionality. Because the underlying architecture in the IOS operating system platform of the electronic device is closed-source, the function expansion cannot be realized by modifying the underlying architecture, and in the embodiment of the disclosure, the expansion plug-in can be added above the original HTTP protocol stack by using the application program interfaces (Application Programming Interface, APIs) which are already opened therein.
The data to be processed may include a network Request and/or a network response, where the network Request may be an HTTP Request (HTTP Request) sent by an application program, and in the embodiment of the present disclosure, the application program may be a program configured in the extension plug-in, that is, the application program may be configured in the extension plug-in according to a service requirement or a permission, so that the extension plug-in may support the application program. The number and type of applications of the embodiments of the present disclosure are not limited, and the number of applications may be one or more. The network Response may be an HTTP Response (HTTP Response) returned by the server based on the network request, and may be obtained from a system session interface, which is also called a callback interface of a universal resource locator session (url), and is an interface used for obtaining the network Response from the server in the IOS system.
In the embodiment of the disclosure, the electronic device can receive the network request sent by the electronic device from the application program through the pre-added expansion plug-in, and/or receive the network response returned by the electronic device from the system session interface. That is, the expansion plug-in may include two input interfaces, one for receiving a network request sent by an application, and the other for obtaining a network response from the server through the system session interface.
And 102, performing expansion processing on the data to be processed through an expansion plug-in to obtain target data and forwarding the target data.
The expansion process can be understood as a function added on the basis of the existing functions, and can be a function of some complex communication services, which is specifically set according to actual requirements. The target data may be data after processing the above-described network request and/or network response.
In the embodiment of the present disclosure, performing expansion processing on data to be processed through an expansion plug-in to obtain target data, including: and responding to the registration of a plurality of function plugins in the expansion plugins, and respectively carrying out expansion processing on the data to be processed through each function plugin to obtain target data.
The function plug-in may be a plug-in included in the extension plug-in for implementing a specific special function, and the extension plug-in may include one or more function plug-ins, where each function plug-in may implement a corresponding function. In an embodiment of the present disclosure, the functional plug-in includes at least one of: the system comprises a log processing plug-in, a parameter injection plug-in, an interception request plug-in and a cache plug-in, wherein the log processing plug-in can be used for outputting logs; the parameter injection plug-in can be used for injecting preset parameters in a network request or a network response by modifying, and the preset parameters can be set according to actual conditions; the interception request plug-in can be used for intercepting preset requests, and the preset requests can be illegal or requests which do not meet preset requirements; the cache plug-in may be used to cache the requested data for later use. The functional plug-ins described above are examples only and are not intended to be limiting.
When a plurality of function plugins are registered in the expansion plugins, the electronic device can process the data to be processed through each function plugin respectively when the data to be processed is subjected to expansion processing, so as to obtain target data, wherein the target data can be the data processed by the plurality of function plugins.
In one embodiment of the present disclosure, performing expansion processing on data to be processed through each functional plug-in to obtain target data may include: according to the registration sequence of the plurality of function plug-ins or the priority sequence of the plurality of function plug-ins, the data to be processed is expanded through each function plug-in sequence, and target data is obtained.
The priority order of the plurality of function plugins may be preset according to factors such as functions or service requirements of the function plugins, and is not particularly limited. When the electronic equipment processes the data to be processed through each functional plug-in, the electronic equipment can process the data to be processed through each functional plug-in sequence according to the registration sequence of the functional plug-ins to obtain target data; or, the data to be processed can be processed sequentially through the functional plug-ins according to the preset priority order of the functional plug-ins, so as to obtain the target data.
Optionally, when each function plug-in performs processing, whether to send the processed data to the next function plug-in for processing can be determined according to the processing result, and if not, the data after the current processing can be directly determined as target data; otherwise, continuing to send the processed data to the next functional plug-in for processing. For example, when the interception request plugin determines that the current network request is an illegal request, it may be determined that the data after processing is not transmitted, and the processing result is directly taken as target data.
In an embodiment of the present disclosure, forwarding the target data may include: when the data to be processed is a network request, the target data is sent to an application program; and when the data to be processed is network response, the target data is sent to the server through the system session interface.
After the electronic equipment performs expansion processing on the data to be processed through the expansion plug-in to obtain target data, if the target data corresponds to a network request, the target data can be sent to a system session interface, and the system session interface sends the target data to a server; if the target data corresponds to a network response, the target data may be sent to an application.
According to the communication expansion scheme provided by the embodiment of the disclosure, an IOS (operation on site) operating system platform of the electronic device receives data to be processed through an expansion plug-in, the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface, the data to be processed is subjected to expansion processing through a functional plug-in registered in the expansion plug-in advance, and target data is obtained and forwarded. By adopting the technical scheme, the expansion processing of the network request and/or the network response can be realized by adding the expansion plug-in the IOS operating system platform of the electronic equipment, and compared with the related technology, the method and the device have the advantages of avoiding writing a large number of codes, reducing the occurrence rate of errors and improving the utilization rate of the codes.
In some embodiments, the communication expansion method may further include, prior to receiving the data to be processed through the expansion plug-in: and calling a system interface to install an extension plug-in, and registering at least one function plug-in the extension plug-in.
The electronic device may invoke the system interface to install the extension plug-in at the system level, after which at least one functional plug-in may be registered in the extension plug-in for subsequent use.
In some embodiments, the communication extension method may further include: and sending an expansion processing notification to the application program and the system session interface through the expansion plug-in, wherein the expansion processing notification is used for enabling the application program to send a network request to the expansion plug-in and enabling the system session interface to send a network response to the expansion plug-in.
After the electronic equipment installs the expansion plug-in, the expansion plug-in can send an expansion processing notification to the application program and the system session interface, so that the application program sends all network requests to the expansion plug-in, but not to the system session interface; and causing the system session interface to return all network responses to the expansion plug-in without sending directly to the application.
Optionally, the application program may further determine whether extension processing is required before sending the network request, and if it is determined that extension processing is not required, may directly send the network request to the system session interface; if expansion processing is required, a network request may be sent to the expansion plug-in.
In the above scheme, the expansion plug-in can be pre-installed in the IOS operating system platform of the electronic device, and both the network request and the network response can be set to send the expansion plug-in, so that the expansion processing can be quickly realized later.
Fig. 2 is a flow chart of another communication expansion method provided in an embodiment of the present disclosure, where the embodiment specifically describes the communication expansion method based on the embodiment. As shown in fig. 2, the method includes:
step 201, calling a system interface to install an extension plug-in, and registering at least one function plug-in the extension plug-in.
Wherein the functional plug-in comprises at least one of the following: the system comprises a log processing plug-in, a parameter injection plug-in, an interception request plug-in and a cache plug-in.
Step 202, sending an expansion processing notification to the application program and the system session interface through the expansion plug-in.
The expansion processing notification is used for enabling the application program to send a network request to the expansion plug-in and enabling the system session interface to send a network response to the expansion plug-in. The number of the application programs is a plurality of the application programs, and the application programs are configured in the expansion plug-in.
Step 203, receiving data to be processed through the expansion plug-in.
The data to be processed includes network requests sent by the application and/or network responses sent by the system session interface.
And 204, responding to the registration of a plurality of function plugins in the expansion plugins, and respectively carrying out expansion processing on the data to be processed through each function plugin to obtain target data.
Optionally, the expanding processing is performed on the data to be processed through each functional plug-in unit to obtain target data, including: according to the registration sequence of the plurality of function plug-ins or the priority sequence of the plurality of function plug-ins, the data to be processed is expanded through each function plug-in sequence, and target data is obtained.
After step 204, step 205 and/or step 206 may be performed, specifically according to the actual situation. Step 206 may be performed for data corresponding to the network request in the target data; and step 205 may be performed for data corresponding to the network response in the target data.
Step 205, the target data is sent to the application program.
And 206, transmitting the target data to the server through the system session interface.
For example, fig. 3 is a schematic diagram of a communication extension provided by an embodiment of the disclosure, as shown in fig. 3, a communication process after an IOS operating system platform of an electronic device adds an extension plug-in may include: firstly, creating a network Request (HTTP Request) by an application program in a service layer, then, carrying out expansion processing by an expansion plug-in (Plugin), wherein the expansion plug-in can call each function plug-in sequence according to a registration sequence to process, each function plug-in can determine whether to continue to carry out processing by a subsequent function plug-in according to a processing result, and the network Request can be sent to a corresponding server by a lower system Session (URL Session) interface after the expansion plug-in finishes processing.
Similar to fig. 3, when the system Session (URL Session) interface receives the processing result network Response (HTTP Response) from the server, the processing manner of the network request is consistent, and the processing is performed by the extension plug-in first and then is passed to the application program of the service layer to complete the subsequent service.
The expansion plug-in mainly comprises two input interfaces, one interface is used for receiving a network request and can perform expansion processing, such as recording logs related to the request, injecting general parameters and processing illegal requests, and after the network request is processed, the expansion plug-in is sent out through a system session interface and waits for response; the other interface is used for returning network response, when the request is sent, the expansion plug-in obtains the processing result network response through the callback interface of the system session interface, and then expansion processing can be carried out, for example, a response log, an analysis result and the like can be recorded, and when the network response is processed, the expansion plug-in can be returned to an upper layer for use.
According to the scheme, a set of extensible mechanism is realized on the basis of the existing interface to improve programming experience, and the occurrence rate of errors is reduced. When the service layer initiates the request call, the request firstly enters the expansion plug-in, then the request is processed through various functional plug-ins registered in advance, and the request is sent out through an interface provided by the bottom layer system after the processing is completed. The same procedure is used for the received response. By utilizing the mechanism, complex expansion functions such as parameter injection, request interception, log and the like can be easily realized, a large number of template codes are prevented from being written, the possibility of errors is reduced, and the utilization rate of the codes is improved.
According to the communication expansion scheme provided by the embodiment of the disclosure, an IOS (operation on site) operating system platform of the electronic device receives data to be processed through an expansion plug-in, the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface, the data to be processed is subjected to expansion processing through a functional plug-in registered in the expansion plug-in advance, and target data is obtained and forwarded. By adopting the technical scheme, the expansion processing of the network request and/or the network response can be realized by adding the expansion plug-in the IOS operating system platform of the electronic equipment, and compared with the related technology, the method and the device have the advantages of avoiding writing a large number of codes, reducing the occurrence rate of errors and improving the utilization rate of the codes.
Fig. 4 is a schematic structural diagram of a communication expansion device according to an embodiment of the present disclosure, where the device may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 4, the apparatus is disposed on an IOS operating system platform of an electronic device, and includes:
a data receiving module 401, configured to receive data to be processed through an extension plug-in, where the data to be processed includes a network request sent by an application program and/or a network response sent by a system session interface;
and the expansion processing module 402 is configured to perform expansion processing on the data to be processed through the expansion plug-in, obtain target data, and forward the target data.
Optionally, the expansion processing module 402 includes a processing unit, specifically configured to:
and responding to the plurality of functional plugins registered in the expansion plugins, and respectively carrying out expansion processing on the data to be processed through each functional plugin to obtain target data.
Optionally, the processing unit is specifically configured to:
and according to the registration sequence of the plurality of functional plugins or the priority sequence of the plurality of functional plugins, expanding the data to be processed through each functional plugin in sequence to obtain target data.
Optionally, the functional plug-in includes at least one of: the system comprises a log processing plug-in, a parameter injection plug-in, an interception request plug-in and a cache plug-in.
Optionally, the device further comprises a plug-in installation module for: before receiving the data to be processed by the expansion plug-in,
and calling a system interface to install the expansion plugin, and registering at least one function plugin in the expansion plugin.
Optionally, the device further includes a notification module, configured to:
and sending an expansion processing notification to the application program and the system session interface through the expansion plug-in, wherein the expansion processing notification is used for enabling the application program to send a network request to the expansion plug-in and enabling the system session interface to send a network response to the expansion plug-in.
Optionally, the number of the application programs is a plurality of application programs, and the application programs are configured in the expansion plugin.
Optionally, the expansion processing module 402 includes a forwarding unit, configured to:
when the data to be processed is the network request, the target data is sent to the application program;
and when the data to be processed is the network response, the target data is sent to a server through the system session interface.
The communication expansion device provided by the embodiment of the disclosure can execute the communication expansion method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
The disclosed embodiments also provide a computer program product comprising a computer program/instructions which, when executed by a processor, implement the communication extension method provided by any of the embodiments of the disclosure.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. Referring now in particular to fig. 5, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. When the computer program is executed by the processing device 501, the above-described functions defined in the communication expansion method of the embodiment of the present disclosure are performed.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving data to be processed through an expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface; and carrying out expansion processing on the data to be processed through the expansion plug-in unit to obtain target data and forwarding the target data.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In accordance with one or more embodiments of the present disclosure, the present disclosure provides a communication extension method applied to an IOS operating system platform of an electronic device, including:
receiving data to be processed through an expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface;
and carrying out expansion processing on the data to be processed through the expansion plug-in unit to obtain target data and forwarding the target data.
According to one or more embodiments of the present disclosure, in a communication extension method provided by the present disclosure, the extension plug-in performs extension processing on the data to be processed to obtain target data, where the method includes:
and responding to the plurality of functional plugins registered in the expansion plugins, and respectively carrying out expansion processing on the data to be processed through each functional plugin to obtain target data.
According to one or more embodiments of the present disclosure, in a communication expansion method provided by the present disclosure, expansion processing is performed on the data to be processed through each functional plug-in unit, to obtain target data, including:
and according to the registration sequence of the plurality of functional plugins or the priority sequence of the plurality of functional plugins, expanding the data to be processed through each functional plugin in sequence to obtain target data.
According to one or more embodiments of the present disclosure, in the communication extension method provided by the present disclosure, the functional plugin includes at least one of the following: the system comprises a log processing plug-in, a parameter injection plug-in, an interception request plug-in and a cache plug-in.
In accordance with one or more embodiments of the present disclosure, in a communication extension method provided by the present disclosure, before receiving data to be processed through an extension plug-in, the method further includes:
and calling a system interface to install the expansion plugin, and registering at least one function plugin in the expansion plugin.
In accordance with one or more embodiments of the present disclosure, in a communication extension method provided by the present disclosure, the method further includes:
and sending an expansion processing notification to the application program and the system session interface through the expansion plug-in, wherein the expansion processing notification is used for enabling the application program to send a network request to the expansion plug-in and enabling the system session interface to send a network response to the expansion plug-in.
According to one or more embodiments of the present disclosure, in the communication extension method provided by the present disclosure, the number of application programs is a plurality of application programs, and the application programs are configured in the extension plug-in.
According to one or more embodiments of the present disclosure, in the communication extension method provided by the present disclosure, the forwarding the target data includes:
when the data to be processed is the network request, the target data is sent to the application program;
and when the data to be processed is the network response, the target data is sent to a server through the system session interface.
According to one or more embodiments of the present disclosure, there is provided a communication extension apparatus provided to an IOS operating system platform of an electronic device, including:
the data receiving module is used for receiving data to be processed through the expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface;
and the expansion processing module is used for carrying out expansion processing on the data to be processed through the expansion plug-in to obtain target data and forwarding the target data.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the expansion processing module includes a processing unit, and specifically is configured to:
and responding to the plurality of functional plugins registered in the expansion plugins, and respectively carrying out expansion processing on the data to be processed through each functional plugin to obtain target data.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the processing unit is specifically configured to:
and according to the registration sequence of the plurality of functional plugins or the priority sequence of the plurality of functional plugins, expanding the data to be processed through each functional plugin in sequence to obtain target data.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the functional plug-in includes at least one of the following: the system comprises a log processing plug-in, a parameter injection plug-in, an interception request plug-in and a cache plug-in.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the device further includes a plug-in installation module, configured to: before receiving the data to be processed by the expansion plug-in,
and calling a system interface to install the expansion plugin, and registering at least one function plugin in the expansion plugin.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the device further includes a notification module, configured to:
and sending an expansion processing notification to the application program and the system session interface through the expansion plug-in, wherein the expansion processing notification is used for enabling the application program to send a network request to the expansion plug-in and enabling the system session interface to send a network response to the expansion plug-in.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the number of application programs is a plurality of application programs, and the application programs are configured in the expansion plug-in.
According to one or more embodiments of the present disclosure, in the communication expansion device provided by the present disclosure, the expansion processing module includes a forwarding unit, configured to:
when the data to be processed is the network request, the target data is sent to the application program;
and when the data to be processed is the network response, the target data is sent to a server through the system session interface.
According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement any of the communication extension methods provided in the present disclosure.
According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium storing a computer program for performing any one of the communication extension methods provided by the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (11)

1. A method of communication extension, comprising an IOS operating system platform for an electronic device, comprising:
receiving data to be processed through an expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface;
and carrying out expansion processing on the data to be processed through the expansion plug-in unit to obtain target data and forwarding the target data.
2. The method according to claim 1, wherein performing expansion processing on the data to be processed by the expansion plug-in to obtain target data includes:
and responding to the plurality of functional plugins registered in the expansion plugins, and respectively carrying out expansion processing on the data to be processed through each functional plugin to obtain target data.
3. The method according to claim 2, wherein the expanding the data to be processed by each functional plug-in unit to obtain target data includes:
and according to the registration sequence of the plurality of functional plugins or the priority sequence of the plurality of functional plugins, expanding the data to be processed through each functional plugin in sequence to obtain target data.
4. The method of claim 2, wherein the functional plug-in comprises at least one of: the system comprises a log processing plug-in, a parameter injection plug-in, an interception request plug-in and a cache plug-in.
5. The method of claim 1, wherein prior to receiving the data to be processed by the expansion plug-in, the method further comprises:
and calling a system interface to install the expansion plugin, and registering at least one function plugin in the expansion plugin.
6. The method of claim 5, wherein the method further comprises:
and sending an expansion processing notification to the application program and the system session interface through the expansion plug-in, wherein the expansion processing notification is used for enabling the application program to send a network request to the expansion plug-in and enabling the system session interface to send a network response to the expansion plug-in.
7. The method of claim 1, wherein the number of applications is a plurality and the applications are programs configured in the expansion plug-in.
8. The method of claim 1, wherein forwarding the target data comprises:
when the data to be processed is the network request, the target data is sent to the application program;
and when the data to be processed is the network response, the target data is sent to a server through the system session interface.
9. A communication extension apparatus, characterized in that the IOS operating system platform provided in an electronic device comprises:
the data receiving module is used for receiving data to be processed through the expansion plug-in, wherein the data to be processed comprises a network request sent by an application program and/or a network response sent by a system session interface;
and the expansion processing module is used for carrying out expansion processing on the data to be processed through the expansion plug-in to obtain target data and forwarding the target data.
10. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the communication extension method of any one of the preceding claims 1-8.
11. A computer readable storage medium, characterized in that the storage medium stores a computer program for executing the communication extension method according to any one of the preceding claims 1-8.
CN202111284117.3A 2021-11-01 2021-11-01 Communication expansion method, device, equipment and medium Pending CN116069403A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111284117.3A CN116069403A (en) 2021-11-01 2021-11-01 Communication expansion method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111284117.3A CN116069403A (en) 2021-11-01 2021-11-01 Communication expansion method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116069403A true CN116069403A (en) 2023-05-05

Family

ID=86170349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111284117.3A Pending CN116069403A (en) 2021-11-01 2021-11-01 Communication expansion method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116069403A (en)

Similar Documents

Publication Publication Date Title
CN111432001B (en) Method, apparatus, electronic device and computer readable medium for jumping scenes
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111324376B (en) Function configuration method, device, electronic equipment and computer readable medium
CN112269959A (en) Display content control method and device, readable medium and electronic equipment
CN113761097B (en) Map tile loading method, device, equipment and medium for browser end
CN111460432B (en) On-line document authority control method, device, equipment and computer readable medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN110855655B (en) Information verification method, device, equipment and storage medium
CN110619101A (en) Method and apparatus for processing information
CN111444457B (en) Data release method and device, storage medium and electronic equipment
CN111309323B (en) Parameter initialization method and device and electronic equipment
CN116069403A (en) Communication expansion method, device, equipment and medium
CN113518183A (en) Camera calling method and device and electronic equipment
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN111367590A (en) Interrupt event processing method and device
CN113032046A (en) Method, device and equipment for repairing so file and storage medium
CN111538717A (en) Data processing method and device, electronic equipment and computer readable medium
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN110099122B (en) Method and apparatus for sending network request
CN112486826B (en) Test method, test device, electronic equipment and computer readable medium
CN111694679B (en) Message processing method and device and electronic equipment
CN111626787B (en) Resource issuing method, device, medium and equipment
CN113157365B (en) Program running method, program running device, electronic equipment and computer readable medium
CN114513548B (en) Directional call information processing method and device

Legal Events

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