A method and device for processing information
By creating a calling relationship framework between the applet and the associated application, the problem of poor expansion of existing applications for applet development and operation is solved, and more efficient applet development support and scalability is achieved.
Patent Information
- Application Number
- CN202110130615.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-01-29
AI Technical Summary
Existing applications have poor scalability for the development and operation of mini programs, and lack a general framework to manage the interaction between the front-end interface of the mini program and the associated applications.
Provide a method and device for processing information, create a framework for calling relationship between applets and associated applications, determine the corresponding relationship between applets and processing modules through the framework, and enable processing modules to process the synchronous interface or asynchronous interface of applets and multi-processes The business logic of the object.
The ability of associated applications to support mini-program development has been improved, the difficulty of adding new processing modules has been reduced, and the scalability of mini-programs has been improved.
Smart Images

Figure CN113761039B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing information. Background Art
[0002] At present, mini programs are widely used. Mini programs can be used without installation, so users do not need to worry about installing and uninstalling applications, which greatly improves the user experience.
[0003] Mini programs are usually developed based on existing applications. Currently, there is a lack of a general framework for managing the interaction between existing applications and mini program front-end interfaces, resulting in poor scalability of existing applications for the development and operation of mini programs. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for processing information, which can create a framework for the calling relationship between the mini-program and the associated application, and determine the corresponding relationship between the mini-program and the processing module through the framework, so that the processing module processes the synchronous interface or asynchronous interface of the mini-program and the business logic of the multi-process object, thereby improving the ability of the associated application to support the development of the mini-program, reducing the difficulty of adding new processing modules to the associated application, and improving the extensibility of the associated application corresponding to the mini-program.
[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for processing information is provided, characterized in that it includes: receiving input information of a mini-program front-end interface, the input information including an interface identifier; searching for a processing module that matches the interface identifier from a pre-stored module set; if the result of the search indicates that there is no processing module that matches the interface identifier, generating a construction request for the processing module, and sending the construction request for the processing module to a development client, so that the development client creates the processing module based on the construction request and a pre-set module template; receiving the processing module released by the development client, storing the processing module in the module set, and executing the business logic of the processing module based on the input information to realize information processing.
[0006] Optionally, the method for processing information is characterized by further comprising:
[0007] If the search result indicates that there is a processing module matching the interface identifier, the step of executing the business logic of the processing module based on the input information is directly performed.
[0008] Optionally, the method for processing information is characterized by further comprising:
[0009] Parse the interface identifier to determine the processing type corresponding to the mini program front-end interface;
[0010] The step of executing the business logic of the processing module includes: based on the processing type, executing the business logic corresponding to the processing type in the processing module.
[0011] Optionally, the method for processing information is characterized by further comprising:
[0012] The interface identifier indicates any one interface type of a service interface, a page interface, or a component interface.
[0013] Optionally, the method for processing information is characterized in that:
[0014] Parsing the interface identifier to determine the processing type corresponding to the mini-program front-end interface includes: parsing the processing type keyword included in the interface identifier; and determining whether the processing type of the mini-program front-end interface is a synchronous type or an asynchronous type according to the processing type keyword.
[0015] Optionally, the method for processing information is characterized by further comprising:
[0016] Receive a request for adding a new processing module sent by the mini-program front-end interface, wherein the request includes a module identifier of the new processing module;
[0017] Sending the module identifier of the new processing module to a development client, so that the development client creates the new processing module based on the module identifier and a preset module template;
[0018] The new processing module published by the development client is received, and the new processing module is stored in the module set.
[0019] Optionally, the method for processing information is characterized in that:
[0020] The processing module includes one or more process modules, each of which corresponds to a process type and a processing type;
[0021] Executing the business logic of the processing module includes: determining the target process module in the processing module based on the processing type indicated by the interface identifier and the process type corresponding to the mini-program front-end interface; and executing the business logic of the target process module.
[0022] Optionally, the method for processing information is characterized in that:
[0023] The process type includes: any one or more of same process and cross-process.
[0024] Optionally, the method for processing information is characterized in that executing the business logic of the target process module includes:
[0025] In case that the target process module is a cross-process process module, the business logic of the target process module is used to process the serialized information provided by the mini-program front-end interface.
[0026] 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, characterized in that it comprises: an information search module, an information creation module and an information processing module; wherein:
[0027] The information search module is used to receive input information of the mini-program front-end interface, wherein the input information includes an interface identifier; and search for a processing module matching the interface identifier from a pre-stored module set;
[0028] The creation information module is used to generate a construction request for the processing module if the search result indicates that there is no processing module matching the interface identifier, and send the construction request for the processing module to the development client, so that the development client creates the processing module based on the construction request and a preset module template;
[0029] The information processing module is used to receive the processing module published by the development client, store the processing module in the module set, and execute the business logic of the processing module based on the input information to realize information processing.
[0030] Optionally, the device for processing information is characterized in that:
[0031] The creation information module is further used to receive a request for adding a new processing module sent by the mini-program front-end interface, wherein the request includes a module identifier of the new processing module; and send the module identifier of the new processing module to the development client, so that the development client creates the new processing module based on the module identifier and a preset module template;
[0032] The processing information module is further used to receive the new processing module released by the development client, and store the new processing module in the module set.
[0033] To achieve the above-mentioned purpose, according to the third aspect of an embodiment of the present invention, there is provided an electronic device for processing information, characterized in that it includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned methods for processing information.
[0034] To achieve the above-mentioned purpose, according to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any method as described in the above-mentioned method for processing information is implemented.
[0035] An embodiment of the above invention has the following advantages or beneficial effects: it is capable of creating a framework for the calling relationship between the mini-program and the associated application, and the corresponding relationship between the mini-program and the processing module is determined through the framework, so that the processing module processes the synchronous interface or asynchronous interface of the mini-program and the business logic of the multi-process object, thereby improving the ability of the associated application to support the development of the mini-program, reducing the difficulty of adding new processing modules to the associated application, and improving the extensibility of the associated application corresponding to the mini-program.
[0036] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0038] Figure 1 is a flowchart of a method for processing information provided by the first embodiment of the present invention;
[0039] Figure 2 is a schematic diagram of a process of processing information provided by the second embodiment of the present invention;
[0040] Figure 3 is a schematic diagram of the structure of a device for processing information provided by an embodiment of the present invention;
[0041] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0042] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0044] Preferably, the embodiments of the present invention are based on the Android system, and the following examples are described based on the Android system.
[0045] like Figure 1 As shown, an embodiment of the present invention provides a method for processing information, which may include the following steps:
[0046] Step S101: receiving input information of the mini-program front-end interface, the input information including an interface identifier; searching for a processing module matching the interface identifier from a pre-stored module set.
[0047] Specifically, as a mini-program framework engine, it is necessary to define a front-end interactive interface management scheme corresponding to the associated application, and meet the multi-process characteristics of the mini-program or associated application on the client (for example, Android or iOS client); receive input information of the mini-program front-end interface, where, for example, the input information of the mini-program front-end interface is: jsServiceLogin (parameter 1, parameter 2, parameter 3...); where "jsServiceLogin" is an interface identifier; further, the interface identifier indicates any one of the interface types of the service interface, page interface, and component interface. For example: "jsServiceLogin" indicates the interface type associated with the service interface, "jsP ageLogin" indicates the interface type associated with the page interface, and "jsButtonLogin" indicates the interface type associated with the component interface. The subsequent processing flow of the input information of any one of the interface types of the service interface, page interface, and component interface is similar. The present 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.
[0048] Furthermore, a processing module matching the interface identifier is searched from a pre-stored module set; the pre-stored module set includes one or more processing modules that provide information processing capabilities for the mini-program, for example: the associated application AAA includes a login processing module (for example: LoginModule), an account processing module (for example: accountModule), etc.; for another example: the interface identifier of the front-end interface of the mini-program is "jsServiceLogin", then the processing module matching 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, database, etc.). After receiving the interface request, according to the interface identifier, the correspondence of the pre-stored interface identifier is used, wherein: the correspondence is determined by a preset interface or module naming rule, for example, the rule is that the interface identifier contains the same keyword as the module identifier, and getModuleName() is used to search for a processing module matching "jsSer viceLogin" (for example, the matching processing module is: LoginModule). You can further use getNativeMethod() to obtain the local processing module provided by the Android system to implement the corresponding function; that is, search for a processing module that matches the interface identifier from a pre-stored module set.
[0049] Step S102: If the search result indicates that there is no processing module matching the interface identifier, a construction request for the processing module is generated and sent to a development client, so that the development client creates the processing module based on the construction request and a preset module template.
[0050] Specifically, a processing module matching the interface identifier is searched from a pre-stored module set. If the result of the search indicates that there is no processing module matching the interface identifier, a construction request for the processing module is generated, and the construction request for the processing module is sent to the development client. For example, if the interface identifier is jsServiceFaceRecognition and a processing module matching the keyword "FaceRecognition" is not 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 pre-set module template, for example, creating a processing module corresponding to FaceRecognition. When creating a processing module, the development client can implement the code of the processing module according to a pre-set module template, wherein the pre-set template module can include a base class AbstractMantoModule and various methods contained in the base class. The present invention does not limit the specific form and content of the template module. Taking the base class as a module template as an example, creating a processing module includes: implementing the base class AbstractMantoModule and the methods contained in the base class. Examples of methods contained in the base class AbstractMantoModule are shown in Table 1. The description of each method is consistent with the "Method Description" in Table 1 and is not repeated here:
[0051] method Method Description injectJsApiMethod Register front-end interface initData Calling initialization parameters handleMethod Methods for handling asynchronous interface types handleMethodSync Methods for handling synchronous interface types handleResult Processing jump result data getModuleName Get the processing module corresponding to the interface getNativeMethod Get the local method contained in the processing module module
[0052] Table 1
[0053] Step S103: receiving the processing module published by the development client, storing the processing module in the module set, and executing the business logic of the processing module based on the input information to realize information processing.
[0054] Specifically, after the client creates the processing module as described in step S102, the processing module published by the development client is received and stored in the module set; the description of the module set is consistent with step S101 and will not be repeated here.
[0055] Furthermore, based on the input information of the mini-program front-end interface, the business logic of the corresponding processing module is executed to realize information processing, for example: if the input information is login information, the login business logic of the corresponding login module is executed to realize the processing of the mini-program login information, and the processing result information is returned to the mini-program front-end interface (for example: using the handleResult method). If the login information has a matching processing module in the pre-stored processing module set, the step of executing the business logic of the login based on the login information is directly executed, that is, if the result of the search indicates that there is a processing module that matches the interface identifier, the step of executing the business logic of the processing module based on the input information is directly executed.
[0056] Furthermore, according to the functions and application scenarios implemented by the mini program, the processing type of the mini program front-end interface can be synchronous or asynchronous. The mini program front-end interface input information includes an interface identifier, and the interface identifier is parsed to determine the processing type corresponding to the mini program front-end interface; for example: interface identifier 1 is jsServiceLoginAsync, and interface identifier 2 is js ServiceLoginSync; parsing interface identifier 1 to obtain the processing type keyword as "Async" (indicating an asynchronous processing type), parsing interface identifier 2 to obtain the processing type keyword as "Sync" (indicating a synchronous processing type), that is, parsing the interface identifier to determine the processing type corresponding to the mini program front-end interface includes: parsing the processing type keyword included in the interface identifier; determining whether the processing type of the mini program front-end interface is a synchronous type or an asynchronous type based on the processing type keyword.
[0057] Furthermore, the step of executing the business logic of the processing module includes: based on the processing type, executing the business logic corresponding to the processing type in the processing module. For example, the methods included in the processing module (LoginModule) include handleMethod and handleMethodSync. If the processing type obtained by parsing based on interface identifier 1 is asynchronous, the business logic of handleMethod is executed; if the processing type obtained by parsing based on interface identifier 2 is synchronous, the business logic of handleMethodSync is executed.
[0058] Furthermore, the processing module includes one or more process modules, each of which corresponds to a process type and a processing type; the process types include: any one or more of the same process and cross-process. Specifically, based on the business scenario, the interface of the processing module creates (i.e., includes) different process modules: same process module (for example: indicated as a same process method); cross-process module (for example: indicated as a cross-process method), and determines the target process module in combination with the process type (for example: same process, cross-process) and the processing type (for example: synchronous, asynchronous); preferably, the processing module may include the following types of target process modules, as shown in the example in Table 2, where the main process is the process of the associated application corresponding to the mini program, and the current process of the mini program is the process of the mini program:
[0059]
[0060] Table 2
[0061] Further, executing the business logic of the processing module includes: determining the target process module in the processing module based on the processing type indicated by the interface identifier and the process type corresponding to the mini-program front-end interface; executing the business logic of the target process module. Specifically, executing the business logic of the target process module. For example: the interface identifier of the mini-program front-end interface is jsServiceLoginSync, the processing type indicated by the interface identifier is Sync (synchronous type), and the process type corresponding to the mini-program front-end interface is cross-process, wherein cross-process is a process calling another process so as to realize data interaction between different processes, for example: Login is the business logic executed in the main process where the associated application is located. For the mini-program process, calling the Login module is a cross-process call, and further determining the target process module in the processing module, for example: determining the target process module corresponding to jsServiceLoginSync in the Login processing module as AcrossProcessSyncModule (as shown in the example of Table 2), which is used to process cross-process calls, handleMethodSync is synchronously executed in the main process; and using handle MethodSync to execute the business logic of the target process module to realize data interaction about login information between the mini-program and the main process.
[0062] Furthermore, executing the business logic of the target process module includes: in the case where the target process module is a cross-process process module, using the business logic of the target process module to process the serialized information provided by the mini-program front-end interface. Specifically, based on the example in Table 2, when the target process module is cross-process, it is necessary to process data calls between processes, for example: the cross-process solution can use the AIDL (Android Interface Definition Language) and Binder mechanism (inter-process communication mechanism in the Android system) provided by Android; in the case of defining the main process task and the corresponding sub-process task, the process switching is realized by passing a serializable processing class through the AIDL interface.
[0063] The following example illustrates the process of processing information of the target process module (combined with the target process module described in Table 2), wherein the method names described in the following examples are all schematic names:
[0064] 1) Taking the cross-process synchronous call of the corresponding AcrossProcessSyncModule target process module as an example, an example of the information processing process is: first, the parameters contained in the mini-program front-end input information are pre-processed and returned (for example: returned in bundle format) through the initialization (for example: init Data) method, and the mini-program process initiates a request in a cross-process manner, such as using the sendSync method to send a request to the main process, passing the serialized processing class (for example: processwork class), and the main process parses the serialized processing class through the inter-process communication scheme (for example: the messenger provided by the Android system), wherein the serialized processing class can be a binary data stream. It can be understood that the efficiency and accuracy of data transmission between processes are improved through serialized data transmission, that is, the business logic of the target process module is used to process the serialized information provided by the mini-program front-end interface; further, the main process executes the runInMain method, and executes the handlerMethod Sync method corresponding to the synchronization in the runInMain method to run the business logic of the interface. The running result is processed by constructing the bundle format processing data, calling the sendToSub method to call back the mini-program process, and directly executing the runInMain method in the mini-program process. nInSub, and construct the result in runInSub and return it to the front end.
[0065] 2) Taking the AcrossProcessModule target process module corresponding to the cross-process asynchronous call as an example, an example of the information processing process is: first, the parameters contained in the mini-program front-end input information are pre-processed and returned (for example: returned in bundle format) through the initialization method (for example: initData). At this time, the mini-program process initiates a request in a cross-process manner, for example, using the sendAsync method to call the main process, passing the serialized processing class, that is, using the business logic of the target process module to process the serialized information provided by the mini-program front-end interface. Further, the main process parses the processing class through the inter-process communication solution (for example: the messenger provided by the Android system), and executes the runInMain method. In the runInMain method, the handlerMethod method corresponding to the asynchronous operation is executed to run the business logic of the interface. The running result is obtained by constructing data in bundle format, a callback method (callback), and calling the sendToSub method to call back the mini-program process. In the mini-program process, runInSub is executed through the messenger, and the result is constructed and returned to the front end.
[0066] 3) Taking the InProcessModule target process module corresponding to the asynchronous call of the same process as an example, an example of the information processing flow is: first, the parameters contained in the input information of the mini program front end are pre-processed and returned through initialization (for example: initData) (for example: returned in bundle format), and the handlerMethod method corresponding to the asynchronous operation is executed in this process to run the interface logic. The operation result is constructed by constructing data in bundle format and a callback method (callback), and the result is constructed and returned to the front end.
[0067] 4) Taking the LaunchForResultModule target process module corresponding to the same process call as an example, an example of the information processing process is: first, the parameters contained in the input information of the mini program front end are pre-processed and returned through initialization (for example: initData) (for example: returned in bundle format), and the corresponding asynchronous handlerMethod method is executed in this process, and the method of starting a new page is executed, for example: startActivityForResult. After the new page is completed and closed, it is called back to LaunchForResultModule with the onResult method, and the handleResul t method is executed to process the returned result. Finally, the parameters in bundle format are returned, and the constructed result is returned to the front end.
[0068] 5) Taking the InProcessSyncModule target process module corresponding to the same process synchronous call as an example, firstly, the parameters contained in the input information of the applet front end are preprocessed and returned through initialization (for example: initData) (for example: returned in bundle format), and the corresponding synchronous handlerMethodSync method is executed in this process to run the interface logic. The running result is directly returned by constructing data in bundle format, and the constructed result is returned to the front end.
[0069] like Figure 2 As shown, an embodiment of the present invention provides a method for processing information, which may include the following steps:
[0070] Step S201: receiving a request for adding a new processing module sent by the mini-program front-end interface, wherein the request includes a module identifier of the new processing module.
[0071] Specifically, when the mini program needs to call the processing module of an associated application (i.e., the host application of the mini program), but the current associated application does not include the processing module, it can receive a request for adding a new processing module sent by the mini program front-end interface, for example: the newly added processing module is face recognition, wherein the request includes the module identifier of the new processing module, for example: the request includes the module identifier FaceRecognition, and the keyword of the module identifier can be obtained by parsing the text of the request for adding a new processing module sent by the mini program front-end interface.
[0072] Step S202: Send the module identifier of the new processing module to the development client, so that the development client creates the new processing module based on the module identifier and a preset module template.
[0073] Specifically, the creation of the new processing module is consistent with the description of creating the processing module in step S102, which will not be repeated here.
[0074] Step S203: receiving the processing module published by the development client, storing the processing module in the module set, and executing the business logic of the processing module based on the input information to realize information processing.
[0075] Specifically, the description of storing a new processing module and implementing information processing using the processing module is consistent with the description of step S103 and will not be repeated here.
[0076] like Figure 3 As shown, an embodiment of the present invention provides a device 300 for processing information, comprising: an information search module 301, an information creation module 302 and an information processing module 303; wherein,
[0077] The information search module 301 is used to receive input information of the mini-program front-end interface, wherein the input information includes an interface identifier; and search for a processing module matching the interface identifier from a pre-stored module set;
[0078] The creation information module 302 is used to generate a construction request for the processing module if the search result indicates that there is no processing module matching the interface identifier, and send the construction request for the processing module to the development client, so that the development client creates the processing module based on the construction request and a preset module template;
[0079] The processing information module 303 is used to receive the processing module published by the development client, store the processing module in the module set, and execute the business logic of the processing module based on the input information to realize information processing.
[0080] Optionally, the creation information module is also used to receive a request for adding a new processing module sent by the mini-program front-end interface, the request including the module identifier of the new processing module; and send the module identifier of the new processing module to the development client so that the development client creates the new processing module based on the module identifier and a pre-set module template.
[0081] Optionally, the processing information module is further used to receive the new processing module published by the development client, and store the new processing module in the module set.
[0082] An embodiment of the present invention also provides an electronic device for processing information, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0083] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in any of the above embodiments is implemented.
[0084] Figure 4 An exemplary system architecture 400 is shown to which the method for processing information or the apparatus for processing information according to the embodiments of the present invention can be applied.
[0085] like Figure 4As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0086] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Terminal devices 401, 402, 403 can be installed with various client applications, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0087] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0088] Server 405 may be a server that provides various services, such as a background management server that provides support for client applications used by users using terminal devices 401, 402, and 403. The background management server may process the service requests received from the mini-programs or mini-program-related applications, and feed back the result data corresponding to the service requests to the terminal devices.
[0089] It should be noted that the method for processing information provided in the embodiment of the present invention is generally executed by the terminal devices 401 , 402 , 403 , and accordingly, the apparatus for processing information is generally arranged in the terminal devices 401 , 402 , 403 .
[0090] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0091] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0092] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which 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 part 508 to a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0093] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0094] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0095] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0096] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor. For example, they may be described as follows: a processor includes an information search module, an information creation module, and an information processing module. Among them, the names of these modules do not constitute a limitation on the module itself in certain circumstances. For example, the information processing module may also be described as a "module that determines a target processing module for processing the input information according to the input information of the mini-program front-end interface."
[0098] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes: receiving input information of the mini-program front-end interface, the input information includes an interface identifier; searching for a processing module matching the interface identifier from a pre-stored module set; if the result of the search indicates that there is no processing module matching the interface identifier, generating a construction request for the processing module, and sending the construction request for the processing module to a development client, so that the development client creates the processing module based on the construction request and a pre-set module template; receiving the processing module published by the development client, storing the processing module in the module set, and executing the business logic of the processing module based on the input information to realize information processing.
[0099] It can be seen that the embodiments of the present invention can create a framework for the calling relationship between the mini-program and the associated application, and determine the corresponding relationship between the mini-program and the processing module through the framework, so that the processing module processes the synchronous interface or asynchronous interface of the mini-program and the business logic of the multi-process object, thereby improving the ability of the associated application to support the development of the mini-program, reducing the difficulty of adding new processing modules to the associated application, and improving the extensibility of the associated application corresponding to the mini-program.
[0100] The above specific implementations do not constitute a limitation on the protection scope of the present 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 substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing information, characterized in that include: Receive input information of the mini-program front-end interface, wherein the input information includes an interface identifier; Searching for a processing module that matches the interface identifier from a pre-stored module set; wherein the pre-stored module set includes one or more processing modules that provide the mini-program with information processing capabilities; If the result of the search indicates that there is no processing module matching the interface identifier, generating a construction request for the processing module, and sending the construction request for 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; receiving the processing module published by the development client, and storing the processing module in the module set; Based on the input information of the mini-program front-end interface, the business logic of the processing module that matches the interface identifier of the input information is executed to implement the information processing of the mini-program, and the processing result information is returned to the mini-program front-end interface.
2. The method according to claim 1, characterized in that Further including: If the search result indicates that there is a processing module matching the interface identifier, Directly execute the steps of executing the business logic of the processing module based on the input information.
3. The method according to claim 1 or 2, characterized in that: Further including: Parse the interface identifier to determine the processing type corresponding to the mini program front-end interface; The step of executing the business logic of the processing module includes: Based on the processing type, the business logic corresponding to the processing type in the processing module is executed.
4. The method according to claim 1, characterized in that Further including: The interface identifier indicates any one interface type of a service interface, a page interface, or a component interface.
5. The method according to claim 3, characterized in that: Parsing the interface identifier to determine the processing type corresponding to the mini-program front-end interface includes: Parsing out the processing type keyword included in the interface identifier; According to the processing type keyword, determine whether the processing type of the mini-program front-end interface is a synchronous type or an asynchronous type.
6. The method according to claim 1, characterized in that Further including: Receive a request for adding a new processing module sent by the mini-program front-end interface, wherein the request includes a module identifier of the new processing module; Sending the module identifier of the new processing module to a development client, so that the development client creates the new processing module based on the module identifier and a preset module template; The new processing module published by the development client is received, and the new processing module is stored in the module set.
7. The method according to claim 3, characterized in that The processing module includes one or more process modules, each of which corresponds to a process type and a processing type; 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 mini-program front-end interface; Execute the business logic of the target process module.
8. The method according to claim 7, characterized in that The process type includes: any one or more of same process and cross-process.
9. The method according to claim 7, characterized in that: Executing the business logic of the target process module includes: In case the target process module is a cross-process process module, The business logic of the target process module is used to process the serialized information provided by the mini-program front-end interface.
10. A device for processing information, characterized in that: include: Find information module, create information module and process information module; among them, The information search module is used to receive input information of the mini-program front-end interface, wherein the input information includes an interface identifier; and search for a processing module matching the interface identifier from a pre-stored module set; wherein the pre-stored module set includes one or more processing modules that provide the mini-program with information processing capabilities; The creation information module is used to generate a construction request for the processing module if the search result indicates that there is no processing module matching the interface identifier, and send the construction request for the processing module to the 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 is used to receive the processing module released by the development client, store the processing module in the module set, and based on the input information of the mini-program front-end interface, execute the business logic of the processing module that matches the interface identifier of the input information, implement the information processing of the mini-program, and return the processing result information to the mini-program front-end interface.
11. The device according to claim 10, characterized in that The creation information module is further used to receive a request for adding a new processing module sent by the mini-program front-end interface, wherein the request includes a module identifier of the new processing module; and send the module identifier of the new processing module to the development client, so that the development client creates the new processing module based on the module identifier and a preset module template; The processing information module is further used to receive the new processing module released by the development client, and store the new processing module in the module set.
12. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Applet generation method and device
CN110727431A
Service access method and device, storage medium and electronic device
CN112016912A