CN113761039A - Method and device for processing information - Google Patents

Method and device for processing information Download PDF

Info

Publication number
CN113761039A
CN113761039A CN202110130615.6A CN202110130615A CN113761039A CN 113761039 A CN113761039 A CN 113761039A CN 202110130615 A CN202110130615 A CN 202110130615A CN 113761039 A CN113761039 A CN 113761039A
Authority
CN
China
Prior art keywords
module
processing module
processing
interface
information
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
CN202110130615.6A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110130615.6A priority Critical patent/CN113761039A/en
Publication of CN113761039A publication Critical patent/CN113761039A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • 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/953Querying, e.g. by the use of web search engines

Abstract

The invention discloses a method and a device for processing information, and relates to the technical field of computers. One embodiment of the method comprises: the framework of the calling relationship between the applet and the associated application can be created, and the corresponding relationship between the applet and the processing module is determined through the framework, so that the processing module processes the synchronous interface or the asynchronous interface of the applet and the service logic of the multi-process object, thereby improving the capability of the associated application for supporting the development of the applet, reducing the difficulty of adding a new processing module to the associated application, and improving the expansibility of the associated application corresponding to the applet.

Description

Method and device for processing information
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing information.
Background
At present, applets are widely applied, and the applets have the characteristic of being used without installation, so that a user does not need to care about the problem of installation and uninstallation of applications, and user experience is improved to a greater extent.
Applets are usually developed based on existing applications, and currently, due to the lack of a general framework for managing interaction between the existing applications and the front-end interfaces of the applets, the development and running expansibility of the existing applications to the applets are poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing information, which can create a framework of a call relationship between an applet and an associated application, and determine a corresponding relationship between the applet and a processing module through the framework, so that the processing module processes a synchronous interface or an asynchronous interface of the applet and a service logic of a multi-process object, thereby improving an ability of the associated application to support development of the applet, reducing a difficulty of adding a new processing module to the associated application, and improving an extensibility of the associated application corresponding to the applet.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of processing information, including: receiving input information of a front-end interface of the small program, wherein the input information comprises an interface identifier; searching a processing module matched with the interface identifier from a pre-stored module set; if the searched result indicates that the processing module matched with the interface identifier does not exist, generating a construction request of the processing module, and sending the construction request of the processing module to a development client, so that the development client creates the processing module based on the construction request and a preset module template; and receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
Optionally, the method for processing information is further characterized by:
and if the searched result indicates that the processing module matched with the interface identifier exists, directly executing the step of executing the service logic of the processing module based on the input information.
Optionally, the method for processing information is further characterized by:
analyzing the interface identification and determining a processing type corresponding to the front-end interface of the small program;
the step of executing the business logic of the processing module comprises: and executing the business logic corresponding to the processing type in the processing module based on the processing type.
Optionally, the method for processing information is further characterized by:
the interface identification indicates any interface type of a service interface, a page interface and a component interface.
Optionally, the method of processing information, characterized in that,
analyzing the interface identifier, and determining the processing type corresponding to the front-end interface of the applet, wherein the processing type comprises the following steps: analyzing the processing type key words included in the interface identification; and determining the processing type of the front-end interface of the small program to be a synchronous type or an asynchronous type according to the processing type keyword.
Optionally, the method for processing information is further characterized by:
receiving a request for adding a new processing module sent by a front-end interface of an applet, wherein the request comprises a module identifier of the new processing module;
sending the module identification of the new processing module to a development client, so that the development client creates the new processing module based on the module identification and a preset module template;
and receiving the new processing module issued by the development client, and storing the new processing module into the module set.
Optionally, the method of processing information, characterized in that,
the processing module comprises one or more process modules, and each process module corresponds to one process type and one processing type;
executing the business logic of the processing module, comprising: determining a target process module in the processing module based on the processing type indicated by the interface identifier and the process type corresponding to the front-end interface of the applet; and executing the business logic of the target process module.
Optionally, the method of processing information, characterized in that,
the process types include: any one or more of co-process and cross-process.
Optionally, the method for processing information, where executing the business logic of the target process module, includes:
and aiming at the condition that the target process module is a cross-process module, processing serialized information provided by the front-end interface of the small program by using the service logic of the target process module.
To achieve the above object, according to a second aspect of an embodiment of the present invention, there is provided an apparatus for processing information, including: the information searching module, the information creating module and the information processing module are arranged in the information processing module; wherein the content of the first and second substances,
the searching information module is used for receiving input information of a front-end interface of the applet, wherein the input information comprises an interface identifier; searching a processing module matched with the interface identifier from a pre-stored module set;
the creation information module is used for generating a construction request of the processing module and sending the construction request of the processing module to a development client if the searched result indicates that the processing module matched with the interface identifier does not exist, so that the development client creates the processing module based on the construction request and a preset module template;
the processing information module is used for receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
Optionally, the apparatus for processing information is characterized in that,
the information creating module is further configured to receive a request for adding a new processing module, which is sent by a front-end interface of an applet, where the request includes a module identifier of the new processing module; sending the module identification of the new processing module to a development client, so that the development client creates the new processing module based on the module identification and a preset module template;
the processing information module is further configured to receive the new processing module issued by the development client, and store the new processing module in the module set.
To achieve the above object, according to a third aspect of embodiments of the present invention, there is provided an electronic device for processing information, comprising: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method as in any one of the above methods of processing information.
To achieve the above object, according to a fourth aspect of embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the method as set forth in any one of the methods of processing information described above.
One embodiment of the above invention has the following advantages or benefits: the framework of the calling relationship between the applet and the associated application can be created, and the corresponding relationship between the applet and the processing module is determined through the framework, so that the processing module processes the synchronous interface or the asynchronous interface of the applet and the service logic of the multi-process object, thereby improving the capability of the associated application for supporting the development of the applet, reducing the difficulty of adding a new processing module to the associated application, and improving the expansibility of the associated application corresponding to the applet.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with specific embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow chart diagram of a method for processing information according to a first embodiment of the present invention;
FIG. 2 is a flow chart illustrating information processing according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for processing information according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use with a terminal device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Preferably, the embodiment of the present invention is based on the android system, and the following example is described based on the android system.
As shown in fig. 1, an embodiment of the present invention provides a method for processing information, which may include the following steps:
step S101: receiving input information of a front-end interface of the small program, wherein the input information comprises an interface identifier; and searching the processing module matched with the interface identifier from a pre-stored module set.
Specifically, as an applet framework engine, a front-end interactive interface management scheme corresponding to an associated application needs to be defined, and characteristics of multiple processes and the like of an applet or the associated application on a client (for example, an android or iOS client) are satisfied; receiving input information of the front-end interface of the applet, wherein the input information of the front-end interface of the applet is, for example: jsServiceLogin (parameter 1, parameter 2, parameter 3 …); wherein the jsServiceLogin is an interface identifier; further, the interface identification indicates any one interface type of a service interface, a page interface and a component interface. For example: "jsservicelog" indicates an interface type associated with the service interface, "jsP agenlog" indicates an interface type associated with the page interface, "js button login" indicates an interface type associated with the component interface, and the subsequent processing flow of the input information of any one of the service interface, the page interface, and the component interface is similar. The invention does not limit the specific content and setting format of the input information and the specific content and setting format of the interface identifier.
Further, searching a processing module matched with the interface identifier from a pre-stored module set; the pre-stored module set includes one or more processing modules for providing the applet with information processing capability, for example: the associated application AAA comprises a login processing module (such as Lo ginModule), an account processing module (such as account module) and the like; another example is: the interface identifier of the front-end interface of the applet is "jsservicelog", then the processing module which is matched with the interface identifier is searched for as "LoginModule", it can be understood that the module identifier of the processing module can be saved in a set (stored in a file, a database, etc.), after receiving the interface request, according to the interface identifier, the corresponding relation of the prestored interface identifier is utilized, wherein: the corresponding relation is determined by a preset interface or module naming rule, for example, the rule is that the interface identifier contains a keyword which is the same as the module identifier, a processing module matched with the 'jsSer viseLogin' is searched through getModuleName () (for example, the matched processing module is LoginModule), and a local processing module provided by the android system can be further obtained by utilizing getNativemethod (), so that the corresponding function is realized; i.e. finding the processing module matching the interface identification from a pre-stored set of modules.
Step S102: and if the searched result indicates that the processing module matched with the interface identifier does not exist, generating a construction request of the processing module, and sending the construction request of the processing module to a development client, so that the development client creates the processing module based on the construction request and a preset module template.
Specifically, a processing module matching the interface identifier is searched from a pre-stored module set, if the search result indicates that there is no processing module matching the interface identifier, a construction request of the processing module is generated, and the construction request of the processing module is sent to a development client, for example: the interface identifier is jsservicefaceregistration, if no processing module matching the keyword "faceregistration" is found in the pre-stored module set, a construction request is generated and sent to the development client, so that the development client creates the processing module based on the construction request and a preset module template, for example: and creating a processing module corresponding to the FaceRecognition. When the development client creates the processing module, the development client can realize the code of the processing module according to the preset module template, wherein the preset template module can comprise a base class abstract ManToModule and all methods contained by the base class. Taking the base class as an example of the module template, creating the processing module comprises: the method for implementing the base class abstract Mantomodule and the method included in the base class are shown in Table 1, and the description of each method is consistent with the "method description" in Table 1, and is not repeated here:
Method description of the method
injectJsApiMethod Registration front-end interface
initData Invoking initialization parameters
handleMethod Method for processing asynchronous interface type
handleMethodSync Method for processing synchronous interface type
handleResult Processing skip result data
getModuleName Processing module corresponding to acquisition interface
getNativeMethod Local method for acquiring content contained in processing module
TABLE 1
Step S103: and receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
Specifically, after the client creates a processing module as described in step S102, the processing module issued by the development client is received and stored in the module set; the description of the module set is consistent with step S101, and is not repeated here.
Further, based on the input information of the front-end interface of the applet, the business logic of the corresponding processing module is executed, and information processing is realized, for example: and the input information is login information, login service logic of a corresponding login module is executed, the processing of the applet login information is realized, and processing result information is returned to the applet front-end interface (for example, a handleResult method is utilized). And if the login information has a processing module matched with the processing module in the pre-stored processing module set, directly executing the step of executing the logged service logic based on the login information, namely, if the searched result indicates that the processing module matched with the interface identifier exists, directly executing the step of executing the service logic of the processing module based on the input information.
Further, according to the functions and application scenarios realized by the small program, the processing type of the front-end interface of the small program can be synchronous or asynchronous, the input information of the front-end interface of the small program comprises an interface identifier, the interface identifier is analyzed, and the processing type corresponding to the front-end interface of the small program is determined; for example: the interface identifier 1 is jsServiceLoginAsync, and the interface identifier 2 is jsServiceLoginSync; analyzing the interface identifier 1 to obtain that the processing type keyword is "Async" (indicated as an asynchronous processing type), and analyzing the interface identifier 2 to obtain that the processing type keyword is "Sync" (indicated as a synchronous processing type), that is, analyzing the interface identifier to determine the processing type corresponding to the applet front-end interface, including: analyzing the processing type key words included in the interface identification; and determining the processing type of the front-end interface of the small program to be a synchronous type or an asynchronous type according to the processing type keyword.
Further, the step of executing the business logic of the processing module comprises: and executing the business logic corresponding to the processing type in the processing module based on the processing type. For example, the following examples: the method included in the processing module (LoginModule) includes handlemethodand, if the processing type obtained by analysis based on the interface identifier 1 is asynchronous, executing the business logic of h andleMethod; and if the processing type obtained by analyzing based on the interface identification 2 is synchronous, executing the service logic of handlemethodSync.
Still further, the processing module comprises one or more process modules, and each process module corresponds to one process type and one processing type; the process types include: any one or more of co-process and cross-process. Specifically, based on the business scenario, the interface of the processing module creates (i.e., contains) different process modules: a co-process module (e.g., indicating a co-process method); a cross-process module (for example, indicating a cross-process method), and determining a target process module according to the process type (for example, same process and cross process) and the processing type (for example, synchronization and asynchronous); preferably, the processing module may include the following types of target process modules, for example, as shown in table 2, where the main process is a process of an associated application corresponding to the applet, and the current process of the applet is a process of the applet:
Figure RE-GDA0003032429680000091
TABLE 2
Further, executing the business logic of the processing module includes: determining a target process module in the processing module based on the processing type indicated by the interface identifier and the process type corresponding to the front-end interface of the applet; and executing the business logic of the target process module. Specifically, the business logic of the target process module is executed. For example: the interface identifier of the front-end interface of the applet is jsServiceLoginSync, the processing type indicated by the interface identifier is Sync (synchronous type), and the process type corresponding to the front-end interface of the applet is cross-process, wherein the cross-process calls another process for one process so as to realize data interaction among different processes, for example: l ogin is a business logic executed in a host process where an associated application is located, for an applet process, calling a Login module is a cross-process call, and further determining a target process module in the processing module, for example: determining a target process module corresponding to jsServiceLoginSync in the Login processing module as AcrossProcessSyncModule (shown as an example in Table 2) for processing cross-process call, wherein handleMethodSync is synchronously executed in a main process; and executing the business logic of the target process module by using the handle MethodSync so as to realize the data interaction between the applet and the main process about the login information.
Further, executing the business logic of the target process module includes: and aiming at the condition that the target process module is a cross-process module, processing serialized information provided by the front-end interface of the small program by using the service logic of the target process module. Specifically, as can be seen from the example in table 2, when the target process module is a cross-process, a data call between processes needs to be processed, for example: the cross-process scheme can use AIDL (android Interface Definition Language) provided by android and a Binder mechanism (which is an inter-process communication mechanism in an android system); under the condition of defining main process task and correspondent subprocess task, it can transfer the serializable processing class, and can implement process switching by AIDL interface.
The following illustrates a flow of processing information of a target process module (the target process module described in conjunction with table 2), where names of methods described in the following examples are schematic names:
1) taking the cross-process synchronous call of the corresponding AcrossProcessSyncModule target process module as an example, one example of the information processing flow is as follows: firstly, parameters contained in front-end input information of the small program are preprocessed and returned (for example, returned in a bundle format) through an initialization (for example, initdata) method, a request is initiated by a small program process in a cross-process mode, for example, the request is sent to a main process by using a sendSync method, a serialized processing class (for example, a pr ocesswork class) is transmitted, the main process analyzes the serialized processing class through an inter-process communication scheme (for example, messenger provided by an android system), wherein the serialized processing class can be a binary Data stream, and it can be understood that through serialized Data transmission, the efficiency and the accuracy of Data transmission between processes are improved, namely, the serialized information provided by a front-end interface of the small program is logically processed by using the service of a target process module; further, the main process executes a runInMain method, a handlemethodsyncyc method corresponding to synchronization is executed in the runInMain method, the service logic of an interface is operated, the operation result calls a sendToSub method to call back an applet process by constructing processing data in a bundle format, the ru nInSub is directly executed in the applet process, and the construction result in the runInSub is returned to the front end.
2) Taking the across-process asynchronous call of the corresponding AcrossProcessModule target process module as an example, an example of the information processing flow is as follows: firstly, parameters contained in the front-end input information of the applet are preprocessed and returned (for example, returned in a b undle format) through an initialization (for example, initData) method, at the moment, a request is initiated by the applet process in a cross-process mode, for example, a sendasyc method is used for calling a main process, a serialized processing class is transmitted, namely, the serialized information provided by the front-end interface of the applet is processed by using the service logic of the target process module, further, the main process analyzes the processing class through a scheme of inter-process communication (for example, messenger provided by an android system), and executes a runInMain method, executes a handlemethod corresponding to asyd in the runInMain method, runs the service logic of the interface, runs the result, and calls a callback method (callk callback) to the applet process by constructing data in a bundle format, executes runinb in the applet, and constructs the results back to the front end.
3) Taking the inprocess module target process module corresponding to the synchronous asynchronous call as an example, an example of the information processing flow is as follows: firstly, parameters contained in the front-end input information of the applet are preprocessed and returned (for example, returned in a bundle format) through initialization (for example, initData), a handlemethod method corresponding to asynchronization is executed in the process, interface logic is operated, and the constructed result is returned to the front end through constructing data in the bundle format and a callback method (callback).
4) Taking the LaunchForResultModule target process module corresponding to the same process call as an example, one example of the information processing flow is as follows: firstly, parameters contained in the front-end input information of the applet are preprocessed and returned (for example, returned in a bundle format) through initialization (for example, initData), a handlemethod method corresponding to asynchronization is executed in the process, and a method for starting a new page is executed, for example: and after the new page is closed after operation is finished, calling back the new page into a LauncForResultModule by an onResult method, executing a handleResult method to process a return result, finally returning a parameter in a bundle format, and returning a construction result to the front end.
5) Taking the example of synchronously calling the corresponding InProcessSyncModule target process module with the process, first, through initialization (for example: initData) preprocesses the parameters contained in the applet front-end input information and returns (e.g.: returning in bundle format), executing a method corresponding to the synchronous handler method Sync in the process, operating interface logic, constructing and directly returning the data in the bundle format by the operation result, and returning the constructed result to the front end
As shown in fig. 2, an embodiment of the present invention provides a method for processing information, which may include the following steps:
step S201: receiving a request for adding a new processing module sent by an applet front-end interface, wherein the request comprises a module identifier of the new processing module.
In particular, when an applet needs to call a processing module of an associated application (i.e. the host application of the applet), but the current associated application does not include the processing module, a request sent by the applet front-end interface to add a new processing module may be received, for example: the newly added processing module is face recognition, wherein the request includes a module identifier of the new processing module, such as: the request comprises a module identifier of FaceRecognition, and keywords of the module identifier can be obtained by analyzing a text of a request for adding a new processing module, which is sent by a front-end interface of the applet.
Step S202: and sending the module identification of the new processing module to a development client, so that the development client creates the new processing module based on the module identification and a preset module template.
Specifically, the creation of the new processing module is consistent with the description of the creation processing module in step S102, and is not described herein again.
Step S203: and receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
Specifically, the description about storing a new processing module and using the processing module to realize information processing is consistent with the description of step S103, and is not repeated here.
As shown in fig. 3, an embodiment of the present invention provides an apparatus 300 for processing information, including: a search information module 301, a create information module 302 and a process information module 303; wherein the content of the first and second substances,
the information searching module 301 is configured to receive input information of a front-end interface of an applet, where the input information includes an interface identifier; searching a processing module matched with the interface identifier from a pre-stored module set;
the creation information module 302 is configured to generate a construction request of the processing module if the search result indicates that there is no processing module matching the interface identifier, and send the construction request of the processing module to a development client, so that the development client creates the processing module based on the construction request and a preset module template;
the processing information module 303 is configured to receive the processing module issued by the development client, store the processing module in the module set, and execute a service logic of the processing module based on the input information to implement information processing.
Optionally, the creating information module is further configured to receive a request for adding a new processing module, where the request includes a module identifier of the new processing module, and the request is sent by an applet front-end interface; and sending the module identification of the new processing module to a development client, so that the development client creates the new processing module based on the module identification and a preset module template.
Optionally, the processing information module is further configured to receive the new processing module issued by the development client, and store the new processing module in the module set.
An embodiment of the present invention further provides an electronic device for processing information, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method provided by any of the above embodiments.
Embodiments of the present invention further provide a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method provided in any of the above embodiments.
Fig. 4 shows an exemplary system architecture 400 of a method of processing information or an apparatus for processing information to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves to provide a medium for communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have various client applications installed thereon, such as an e-mall client application, a web browser application, a search-type application, an instant messaging tool, a mailbox client, and the like.
The terminal devices 401, 402, 403 may be various electronic devices having display screens and supporting various client applications, including but not limited to smart phones, tablet computers, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server providing support for client applications used by users with the terminal devices 401, 402, 403. The background management server can process the received service request of the applet or the applet-related application, and feed back result data corresponding to the service request to the terminal equipment.
It should be noted that the method for processing information provided by the embodiment of the present invention is generally executed by the terminal devices 401, 402, and 403, and accordingly, the apparatus for processing information is generally disposed in the terminal devices 401, 402, and 403.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can 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 section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as an internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the 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 computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the central processing unit (CP U) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present invention, 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 invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart 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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules and/or units described in the embodiments of the present invention may be implemented by software, and may also be implemented by hardware. The described modules and/or units may also be provided in a processor, and may be described as: a processor includes a lookup information module, a create information module, and a process information module. The names of these modules do not limit the module itself in some cases, and for example, the processing information module may be further described as a module for determining a target processing module for processing input information according to the input information of the applet front-end interface.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving input information of a front-end interface of the small program, wherein the input information comprises an interface identifier; searching a processing module matched with the interface identifier from a pre-stored module set; if the searched result indicates that the processing module matched with the interface identifier does not exist, generating a construction request of the processing module, and sending the construction request of the processing module to a development client, so that the development client creates the processing module based on the construction request and a preset module template; and receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
Therefore, the embodiment of the invention can establish a framework of the calling relationship between the small program and the associated application, and the corresponding relationship between the small program and the processing module is determined through the framework, so that the processing module processes the synchronous interface or the asynchronous interface of the small program and the service logic of the multi-process object, thereby improving the capability of the associated application for supporting the development of the small program, reducing the difficulty of adding a new processing module to the associated application, and improving the expansibility of the associated application corresponding to the small program.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A method of processing information, comprising:
receiving input information of a front-end interface of the small program, wherein the input information comprises an interface identifier;
searching a processing module matched with the interface identifier from a pre-stored module set;
if the searched result indicates that the processing module matched with the interface identifier does not exist, generating a construction request of the processing module, and sending the construction request of the processing module to a development client, so that the development client creates the processing module based on the construction request and a preset module template;
and receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
2. The method of claim 1, further comprising:
if the result of the lookup indicates that there is a processing module matching the interface identification,
and directly executing the step of executing the business logic of the processing module based on the input information.
3. The method of claim 1 or 2, further comprising:
analyzing the interface identification and determining a processing type corresponding to the front-end interface of the small program;
the step of executing the business logic of the processing module comprises:
and executing the business logic corresponding to the processing type in the processing module based on the processing type.
4. The method of claim 1, further comprising:
the interface identification indicates any interface type of a service interface, a page interface and a component interface.
5. The method of claim 3,
analyzing the interface identifier, and determining the processing type corresponding to the front-end interface of the applet, wherein the processing type comprises the following steps:
analyzing the processing type key words included in the interface identification;
and determining the processing type of the front-end interface of the small program to be a synchronous type or an asynchronous type according to the processing type keyword.
6. The method of claim 1, further comprising:
receiving a request for adding a new processing module sent by a front-end interface of an applet, wherein the request comprises a module identifier of the new processing module;
sending the module identification of the new processing module to a development client, so that the development client creates the new processing module based on the module identification and a preset module template;
and receiving the new processing module issued by the development client, and storing the new processing module into the module set.
7. The method of claim 3,
the processing module comprises one or more process modules, and each process module corresponds to one process type and one processing type;
executing the business logic of the processing module, comprising:
determining a target process module in the processing module based on the processing type indicated by the interface identifier and the process type corresponding to the front-end interface of the applet;
and executing the business logic of the target process module.
8. The method of claim 7,
the process types include: any one or more of co-process and cross-process.
9. The method of claim 7, wherein executing the business logic of the target process module comprises:
for the case where the target process module is a cross-process module,
and processing the serialized information provided by the front-end interface of the small program by using the service logic of the target process module.
10. An apparatus for processing information, comprising: the information searching module, the information creating module and the information processing module are arranged in the information processing module; wherein the content of the first and second substances,
the searching information module is used for receiving input information of a front-end interface of the applet, wherein the input information comprises an interface identifier; searching a processing module matched with the interface identifier from a pre-stored module set;
the creation information module is used for generating a construction request of the processing module and sending the construction request of the processing module to a development client if the searched result indicates that the processing module matched with the interface identifier does not exist, so that the development client creates the processing module based on the construction request and a preset module template;
the processing information module is used for receiving the processing module issued by the development client, storing the processing module into the module set, and executing the service logic of the processing module based on the input information to realize information processing.
11. The apparatus of claim 10,
the information creating module is further configured to receive a request for adding a new processing module, which is sent by a front-end interface of an applet, where the request includes a module identifier of the new processing module; sending the module identification of the new processing module to a development client, so that the development client creates the new processing module based on the module identification and a preset module template;
the processing information module is further configured to receive the new processing module issued by the development client, and store the new processing module in the module set.
12. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202110130615.6A 2021-01-29 2021-01-29 Method and device for processing information Pending CN113761039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110130615.6A CN113761039A (en) 2021-01-29 2021-01-29 Method and device for processing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110130615.6A CN113761039A (en) 2021-01-29 2021-01-29 Method and device for processing information

Publications (1)

Publication Number Publication Date
CN113761039A true CN113761039A (en) 2021-12-07

Family

ID=78786533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110130615.6A Pending CN113761039A (en) 2021-01-29 2021-01-29 Method and device for processing information

Country Status (1)

Country Link
CN (1) CN113761039A (en)

Similar Documents

Publication Publication Date Title
CN109766148B (en) Method and apparatus for processing interface method calls
CN112527649A (en) Test case generation method and device
CN110471848B (en) Method and device for dynamically returning message
CN113076153B (en) Interface calling method and device
CN111478781B (en) Message broadcasting method and device
CN110706093A (en) Accounting processing method and device
CN114500481A (en) Service request processing method, system and device
CN111522617A (en) Method and device for maintaining system and electronic equipment
CN112948138A (en) Method and device for processing message
CN110705271A (en) System and method for providing natural language processing service
CN114896244A (en) Method, device and equipment for configuring database table and computer readable medium
CN113761039A (en) Method and device for processing information
CN114625458A (en) Page data processing method and device, electronic equipment and storage medium
CN114417318A (en) Third-party page jumping method and device and electronic equipment
CN113779018A (en) Data processing method and device
CN113760343A (en) Method and device for processing service request
CN113779122A (en) Method and apparatus for exporting data
CN113760487A (en) Service processing method and device
CN110858240A (en) Front-end module loading method and device
CN112306984A (en) Data source routing method and device
CN112131287A (en) Method and device for reading data
CN113766437B (en) Short message sending method and device
CN113765868B (en) Service processing method and device
CN115630836A (en) Service processing method and device, electronic equipment and storage medium
CN114721609A (en) Method and device for printing file, electronic equipment and computer readable 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