CN116700784A - Task processing method, device, equipment and storage medium - Google Patents

Task processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116700784A
CN116700784A CN202310740254.6A CN202310740254A CN116700784A CN 116700784 A CN116700784 A CN 116700784A CN 202310740254 A CN202310740254 A CN 202310740254A CN 116700784 A CN116700784 A CN 116700784A
Authority
CN
China
Prior art keywords
target
language
client
dynamic link
link library
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
CN202310740254.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.)
Hangzhou Ansiyuan Technology Co ltd
Original Assignee
Hangzhou Ansiyuan 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 Hangzhou Ansiyuan Technology Co ltd filed Critical Hangzhou Ansiyuan Technology Co ltd
Priority to CN202310740254.6A priority Critical patent/CN116700784A/en
Publication of CN116700784A publication Critical patent/CN116700784A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a task processing method, a task processing device, task processing equipment and a storage medium. In the task processing method, a communication plug-in of a first running environment developed in a first language can be used as a communication bridge between a client and a universal capability application, and the communication plug-in can communicate with the client developed by a development tool of the first running environment. Meanwhile, the original program file of the universal capability application can be compiled into a dynamic link library file corresponding to the second language by utilizing the internal connection between the first language and the second language, so that the communication plug-in can execute the dynamic link library file. For the communication plug-in, on one hand, communication connection with a client developed by a development tool provided by a first running environment can be realized based on the connection between the first language and the first running environment; on the other hand, the communication plug-in can be in communication connection with the universal capability application based on the connection between the first language and the second language, so that message transmission between the client and the universal capability application is realized.

Description

Task processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a task processing method, device, apparatus, and storage medium.
Background
In some computer product development scenarios, generic program components, i.e., generic capability applications, may be developed in accordance with the generic functionality of different client programs. Different types of client applications can call the universal capability application to use the corresponding universal functions, so that sharing of the universal functions can be realized, and development cost of the client applications is reduced.
However, in some cases, the generic capability application and the client application are developed in different computer languages, and the client program and the generic capability application cannot communicate with each other, so that the generic capability cannot be effectively shared. Therefore, a new solution is to be proposed.
Disclosure of Invention
Aspects of the present application provide a task processing method, apparatus, device, and storage medium for enabling client programs developed in different computer languages to communicate messages with a general-purpose capability application.
The embodiment of the application provides a task processing method, which comprises the following steps: the communication plug-in responds to a call request of a client to a specified interface, and obtains interface parameters of the specified interface; the communication plug-in is a plug-in of a first running environment developed by adopting a first language; the client is developed based on a development tool of the first running environment; determining a target universal capability application to be called and a target task to be executed according to the interface parameters; determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first language is an extended language of the second language; and calling a method in the target dynamic link library file to execute the target task.
Optionally, the method further comprises: monitoring an execution result of the target task returned by the target universal capability application; and returning the execution result to the client.
Optionally, determining the target dynamic link library file corresponding to the target generic capability application from a plurality of dynamic link library files includes: determining the type of an operating system where the client is located; and selecting the target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files matched with the type of the operating system.
Optionally, invoking a method in the target dynamic link library file to execute the target task includes: determining the service type of the client applied to the target universal capability; according to the service type, calling a method in the target dynamic link library file to execute the target task; the service types include: synchronous call services, asynchronous call services, and/or asynchronous snoop services.
Optionally, before determining the service type of the client applied to the target generic capability, the method further includes: receiving a service registration request sent by the client; the service registration request includes: the identification of the target general-purpose capability application and the corresponding service mode; and registering synchronous call service, asynchronous call service and/or asynchronous monitoring service of the client to the target universal capability application according to the identification of the target universal capability application and the corresponding service mode.
Optionally, the first operating environment includes: the Node JavaScript environment, the development tool of the first running environment includes: an Electron framework, the second language comprising: and C, the third language comprises: golang language.
Optionally, the client includes: an instant messaging client; the target generic capability application includes: an initialization component, a message destruction component, a messaging component, a creation group chat component, or a modification avatar component.
The embodiment of the application also provides a task processing device, which comprises: the receiving module is used for responding to a call request of a client to a specified interface and acquiring interface parameters of the specified interface; the task processing device is developed based on a first running environment; the client is developed based on a development tool of a first running environment; the determining module is used for determining a target general-purpose capability application to be called and a target task to be executed according to the interface parameters; determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first operation environment is developed based on the expansion language of the second language; and the calling module is used for calling the method in the target dynamic link library file to execute the target task.
The embodiment of the application also provides electronic equipment, which comprises: a memory and a processor; the memory is used for storing one or more computer instructions; the processor is configured to execute the one or more computer instructions to: the steps in the method provided by the embodiment of the application are executed.
The embodiment of the application also provides a computer readable storage medium storing a computer program, which when executed by a processor can implement the steps in the method provided by the embodiment of the application.
In the task processing method provided by the embodiment of the application, the communication plug-in of the first running environment developed in the first language can be used as a communication bridge between the client and the universal capability application, and the communication plug-in can be communicated with the client developed by the development tool of the first running environment. Meanwhile, the original program file of the universal capability application can be compiled into a dynamic link library file corresponding to the second language by utilizing the internal connection between the first language and the second language, so that the communication plug-in can execute the dynamic link library file. For the communication plug-in, on one hand, communication connection with a client developed by a development tool provided by a first running environment can be realized based on the connection between the first language and the first running environment; on the other hand, the communication plug-in can be in communication connection with the universal capability application based on the connection between the first language and the second language, so that message transmission between the client and the universal capability application is realized. Therefore, the adaptability of the universal capability application to various different clients is improved, and the development cost of the clients and the repeated development cost of the universal capability application are reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a task processing method according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a task processing method according to another exemplary embodiment of the present application;
FIG. 3 is a schematic diagram of a task processing device according to an exemplary embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two, but does not exclude the case of at least one.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a commodity or system comprising such elements.
In some typical scenarios, the generic capability application is developed in a different computer language than the client application, and no messaging is possible between the client program and the generic capability application. In view of the foregoing technical problems, in some embodiments of the present application, a solution is provided, and in the following, the technical solutions provided by the embodiments of the present application are described in detail with reference to the accompanying drawings.
FIG. 1 is a flow chart of a task processing method according to an exemplary embodiment of the present application, which may include the steps shown in FIG. 1:
step 101, a communication plug-in responds to a call request of a client to a specified interface, and obtains interface parameters of the specified interface; the communication plug-in is a plug-in of a first running environment developed by adopting a first language; the client is developed based on a development tool of the first running environment.
And 102, determining a target universal capability application to be called and a target task to be executed according to the interface parameters.
Step 103, determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first language is an extended language of the second language.
And 104, calling a method in the target dynamic link library file to execute the target task.
The execution body of the embodiment may be a communication plug-in, which is used for information transmission between the client and the general-purpose capability application. The client may include any client program running on the terminal device side, such as an instant messaging client, an e-commerce client, a short video client, etc., which is not limited in this embodiment. The universal capability application can be developed after extracting the universal capability of the client, and can be operated on a server of the universal capability platform for the client to use. In this embodiment, the communication plug-in is customized and developed based on the communication requirements between the client and the generic capability application, and the communication plug-in can implement message transmission between the client and the generic capability application based on the customized and developed communication protocol. The communication plug-in may be run on a terminal device where the client is located, or may be run on a server where the general capability is located, which is not limited in this embodiment.
The client is developed based on a development tool of a first running environment, and the first running environment can be a program running environment developed by any development language (namely, a first language). For example, the first running environment may be a Node JavaScript (Node JS for short) development environment developed by c++ language. A development tool is a set of tightly coupled code libraries that are used to simplify programming in a given language. Taking the Node JS environment as an example, the development tool of the first operating environment may include: an Electron frame tool. Desktop applications developed based on the Electron frame tool may be referred to as Electron applications. Wherein the generic capability application is unable to communicate directly with a client developed with a development tool employing the first operating environment.
In this embodiment, a communication plug-in of the first operating environment may be developed in the first language, where the communication plug-in is capable of providing a communication interface (i.e., a designated interface) to a client developed by a development tool of the first operating environment, so as to implement communication with the client through the designated interface.
Meanwhile, the original program file of the universal capability application can be compiled into a dynamic link library file corresponding to the second language by utilizing the internal connection between the first language and other languages (namely the second language), and the method in the universal capability application is exposed in the form of the dynamic link library file corresponding to the first language, so that the communication plug-in can execute the dynamic link library file. For the communication plug-in, on one hand, communication connection with a client developed by a development tool provided by a first running environment can be realized based on the connection between the first language and the first running environment; on the other hand, the communication plug-in can be in communication connection with the universal capability application based on the connection between the first language and the second language, so that message transmission between the client and the universal capability application is realized.
In this embodiment, the internal links of the first language and the second language may be: the first language is an expansion language of the second language, namely, the first running environment is developed based on the expansion language of the second language. For example, continuing to take the first operating environment as the Node JS environment as an example, the Node JS environment is developed by the c++ language, which is an extended upgrade language of the C language. Therefore, the original program file of the universal capability application can be converted into a C language file, and the communication plugin of the Node JS environment is developed by adopting the C++ language, so that on one hand, the communication plugin of the Node JS environment developed based on the C++ language can execute the method of the universal capability application exposed by the C file. On the other hand, the communication plugin of the Node JS environment and the electronic application of the Node JS environment can communicate based on the Node JS environment. Based on the method, the communication plug-in is used as a bridge, so that the call of the Electron application to the C file corresponding to the universal capability application is realized, the call of the client and the universal capability application is further realized, and the development cost of the client and the repeated development cost of the universal capability application are reduced.
The universal capability platform can provide various universal capability applications, and the various universal capability applications can correspond to a plurality of dynamic link library files. For example, in an instant messaging scenario, when the client is implemented as an instant messaging client, the generic capability applications provided by the generic capability platform may include, but are not limited to: at least one of an initialization component, a message destruction component, a messaging component, a creation group chat component, and a modification avatar component. For another example, in an e-commerce shopping scenario, when the client is implemented as a shopping client, the generic capability application provided by the generic capability platform may include, but is not limited to: the system comprises at least one of a commodity inventory calculating component, a commodity picture identifying component, a robot customer service automatic question-answering component and a logistics tracking component. Any of the capability components described above may be developed in a third language that is different from the first and second languages. Alternatively, the third language may be the Golang language or other programming language different from the first and second languages. In this embodiment, the original program file of any one of the universal capability applications may be compiled into a dynamic link library file corresponding to the second language, so that the communication plug-in can execute the dynamic link library file.
When the communication plug-in determines the use requirement of the client on the target universal capability application, the communication plug-in can determine the target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files. Each dynamic link library file has an identification identifier corresponding to the universal capability application, and the communication plug-in unit can determine a target dynamic link library file of the target universal capability application from the plurality of dynamic link library files according to the identifier of the target universal capability application. After the target dynamic link library file is removed from the top, the communication plug-in can call the method in the target dynamic link library file to execute the target task of the client. For example, taking an instant messaging scenario as an example, if the target task is a message receiving task, the communication plug-in may invoke a method in a dynamic link library corresponding to the message receiving component to execute the message receiving task. If the target task is a message destroying task, the communication plug-in can call a method in the message destroying assembly to execute the message destroying task.
In some alternative embodiments, the client may be implemented as a desktop program running on a different operating system. After development of the generic capability application is completed, the original program code of the generic capability application may be compiled into a dynamically linked library file that matches the different operating systems. For example, a dynamic link library file matching MacOS (operating system) (e.g., a dynamic link library file with a suffix of. So and a dynamic link library file with a suffix of. H), a dynamic link library file matching WindowsOS (operating system), etc. (e.g., a dynamic link library file with a suffix of. Dll and a dynamic link library file with a suffix of. H). Accordingly, when the communication plug-in determines a target dynamic link library file corresponding to the target general-purpose capability application from the plurality of dynamic link library files, the type of the operating system where the client is located can be determined, and the target dynamic link library file corresponding to the target general-purpose capability application is selected from the plurality of dynamic link library files matched with the type of the operating system. For example, if the client runs on the MacOS, the communication plug-in may select a target dynamic link library file corresponding to the target generic capability application from the MacOS-matched dynamic link library files to meet the usage requirements of the client.
In some optional embodiments, the communication plug-in may further monitor the execution result of the target task returned by the target generic capability application, and return the execution result to the client. In some embodiments, the execution results returned by the target generic capability application may be directly parsed by the client. For example, the target generic capability application returns the execution result in the form of a Json (JavaScript Object Notation, json object profile) string. After the communication plug-in monitors the Json character string returned by the target general capability application, the Json character string can be sent to the client side so that the client side can analyze the Json character string. In other embodiments, when the execution result returned by the target generic capability application cannot be directly parsed by the client, the communication plug-in may convert the execution result according to the encoding rule of the second language after monitoring the execution result of the target task returned by the target generic capability application, and return the converted execution result to the client. Furthermore, the client can identify the processing result of the target general-purpose capability application on the target task based on the converted execution result.
In some alternative embodiments, the communication plug-in, when invoking a method in the target dynamic link library file to perform the target task, may determine a service type for the target generic capability application, which may include: synchronous call services, asynchronous call services, and/or asynchronous snoop services. The communication plug-in can call the method in the target dynamic link library file to execute the target task according to the service type. For example, if the service type is an asynchronous call service, the communication plug-in may call the method in the target dynamic link library file in an asynchronous manner to execute the target task; if the service type is synchronous calling service, the communication plug-in can call a method in the target dynamic link library file in a synchronous mode to execute a target task; if the service type is asynchronous monitoring service, the communication plug-in can asynchronously call the method in the target dynamic link library file to execute the monitoring operation of the target task. Based on this implementation, the communication plug-in enables synchronous communication as well as asynchronous communication between the client and the target generic capability application.
In some embodiments, the service type of the target generic capability application is determined by the target generic capability application. For example, a certain generic capability application is designed as a component capable of asynchronously providing services, and another generic capability application is designed as a component capable of synchronously providing services, which is not limited by the present embodiment.
In other embodiments, the service type of the target generic capability application is determined by the client at the time of registration with the service. In registering for service, optionally, the communication plug-in may receive a service registration request sent by the client, where the service registration request may include: identification of the target generic capability application and corresponding service mode; the service mode may include at least one of a synchronous call mode, an asynchronous call mode, and an asynchronous listening mode. According to the identification of the target general-purpose capability application and the corresponding service mode, the communication plug-in unit can register synchronous call service, asynchronous call service and/or asynchronous monitoring service of the client to the target general-purpose capability application. Based on the implementation mode, the client can actively register the service and the service type of the target universal capability application at the communication plug-in, and differentiated and customized universal capability services can be realized to different clients, so that the requirements of different clients are met.
Fig. 2 is a further exemplary illustration of a processing flow of the task processing method provided by the embodiment of the present application, where, as shown in fig. 2, a client to be communicated is an Electron application and a Golang application (a generic capability application developed based on Golang language). The Electron application and the Golang application communicate through a communication protocol provided by a communication plug-in. The communication plugin is a Node JS plugin developed by adopting C++ language. As shown in fig. 2, after the Electron application is initialized, a load method of a communication protocol provided by the communication plug-in may be called to initialize the Golang application. After the Golang application completes initialization, the initialization result is notified to the Electron application through a communication protocol. The Electron application registers an active call service and a listening service to the Golang application through async (asynchronous call method), sync (synchronous call method), asyncProcess (asynchronous listening method) of a communication protocol. After the Golang application obtains the registration result, a calling result is returned to the electronic application through a communication protocol. Before the Electron application exits, the method of unloading the communication protocol can be called to exit the Golang application, and the Golang application can send a notification of successful unloading to the Electron application after the exit is successful.
It should be noted that, the execution subjects of each step of the method provided in the above embodiment may be the same device, or the method may also be executed by different devices. For example, the execution subject of steps 101 to 104 may be device a; for another example, the execution subject of steps 101 and 102 may be device a, and the execution subject of step 103 may be device B; etc.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that the operations may be performed out of the order in which they appear herein or performed in parallel, the sequence numbers of the operations such as 101, 102, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Fig. 3 is a schematic structural view of a task processing device according to an exemplary embodiment of the present application, and as shown in fig. 3, the task processing device includes:
a receiving module 301, configured to obtain interface parameters of a specified interface in response to a call request of a client to the specified interface; the task processing device is developed based on a first running environment; the client is developed based on a development tool of the first running environment.
A determining module 302, configured to determine, according to the interface parameter, a target generic capability application to be invoked and a target task to be executed; determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first operating environment is developed based on an extended language of the second language.
And the calling module 303 is used for calling the method in the target dynamic link library file to execute the target task.
Optionally, the calling module 303 is further configured to: monitoring an execution result of the target task returned by the target universal capability application; and returning the execution result to the client.
Optionally, the determining module 302 is specifically configured to, when determining, from the plurality of dynamic link library files, a target dynamic link library file corresponding to the target generic capability application: determining the type of an operating system where the client is located; and selecting the target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files matched with the type of the operating system.
Optionally, the calling module 303 is specifically configured to, when calling the method in the target dynamic link library file to execute the target task: determining the service type of the client applied to the target universal capability; according to the service type, calling a method in the target dynamic link library file to execute the target task; the service types include: synchronous call services, asynchronous call services, and/or asynchronous snoop services.
Optionally, the apparatus further comprises: registration module 304. A registration module 304, configured to receive a service registration request sent by the client before determining a service type of the client to the target generic capability application; the service registration request includes: the identification of the target general-purpose capability application and the corresponding service mode; and registering synchronous call service, asynchronous call service and/or asynchronous monitoring service of the client to the target universal capability application according to the identification of the target universal capability application and the corresponding service mode.
Optionally, the first operating environment includes: the Node JavaScript environment, the development tool of the first running environment includes: an Electron framework, the second language comprising: and C, the third language comprises: golang language.
Optionally, the client includes: an instant messaging client; the target generic capability application includes: an initialization component, a message destruction component, a messaging component, a creation group chat component, or a modification avatar component.
In this embodiment, on the one hand, the task processing device may implement communication connection with a client developed by a development tool provided by the first operating environment based on the connection between the first language and the first operating environment; on the other hand, the task processing device can be in communication connection with the universal capability application based on the connection between the first language and the second language, so that message transmission between the client and the universal capability application is realized. Therefore, the adaptability of the universal capability application to various different clients is improved, and the development cost of the clients and the repeated development cost of the universal capability application are reduced.
Fig. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application, and as shown in fig. 4, the electronic device includes: memory 401, processor 402, and communication component 403.
Memory 401 is used to store computer programs and may be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on an electronic device.
A processor 402 coupled with the memory 401 for executing a computer program in the memory 401 for: responding to a call request of a client to a designated interface, and acquiring interface parameters of the designated interface; the communication plug-in is a plug-in of a first running environment developed by adopting a first language; the client is developed based on a development tool of the first running environment; determining a target universal capability application to be called and a target task to be executed according to the interface parameters; determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first language is an extended language of the second language; and calling a method in the target dynamic link library file to execute the target task.
Optionally, the processor 402 is further configured to: monitoring an execution result of the target task returned by the target universal capability application; and returning the execution result to the client.
Optionally, the processor 402 is specifically configured to, when determining, from the plurality of dynamic link library files, a target dynamic link library file corresponding to the target generic capability application: determining the type of an operating system where the client is located; and selecting the target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files matched with the type of the operating system.
Optionally, the processor 402 is specifically configured to, when invoking the method in the target dynamic link library file to execute the target task: determining the service type of the client applied to the target universal capability; according to the service type, calling a method in the target dynamic link library file to execute the target task; the service types include: synchronous call services, asynchronous call services, and/or asynchronous snoop services.
Optionally, before determining the service type of the client application to the target generic capability, the processor 402 is further configured to: receiving a service registration request sent by the client; the service registration request includes: the identification of the target general-purpose capability application and the corresponding service mode; and registering synchronous call service, asynchronous call service and/or asynchronous monitoring service of the client to the target universal capability application according to the identification of the target universal capability application and the corresponding service mode.
Optionally, the first operating environment includes: the Node JavaScript environment, the development tool of the first running environment includes: an Electron framework, the second language comprising: and C, the third language comprises: golang language.
Optionally, the client includes: an instant messaging client; the target generic capability application includes: an initialization component, a message destruction component, a messaging component, a creation group chat component, or a modification avatar component.
Further, as shown in fig. 4, the electronic device further includes: power supply component 404, and the like. Only some of the components are schematically shown in fig. 4, which does not mean that the electronic device only comprises the components shown in fig. 4.
The Memory 401 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random-Access Memory (SRAM), electrically erasable programmable Read-Only Memory (EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
Wherein the communication component 403 is configured to facilitate communication between the device in which the communication component is located and other devices, either in a wired or wireless manner. In one exemplary embodiment, the communication component may be implemented based on near field communication (Near Field Communication, NFC) technology, radio frequency identification (Radio Frequency Identification, RFID) technology, infrared data association (Infrared Data Association, irDA) technology, ultra wideband (Ultra Wide Band, UWB) technology, bluetooth (Bluetooth), and other technologies.
Wherein the power supply component 404 is configured to provide power to various components of the device in which the power supply component is located. The power components may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the devices in which the power components are located.
In this embodiment, on the one hand, communication connection between the communication plug-in and the client developed by the development tool provided by the first operating environment may be implemented based on the connection between the first language and the first operating environment; on the other hand, the communication plug-in can be in communication connection with the universal capability application based on the connection between the first language and the second language, so that message transmission between the client and the universal capability application is realized. Therefore, the adaptability of the universal capability application to various different clients is improved, and the development cost of the clients and the repeated development cost of the universal capability application are reduced.
Accordingly, the present application also provides a computer readable storage medium storing a computer program, where the computer program is executed to implement the steps executable by the electronic device in the above method embodiments.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM (Compact Disc Read-Only Memory), optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (Central Processing Unit, CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (Parallel Random Access Machine, PRAM), static Random Access Memory (SRAM), dynamic random access memory (Dynamic Random Access Memory, DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only compact disc read only memory (CD-ROM), digital versatile disks (Digital Video Disc, DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by the computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method of task processing, comprising:
the communication plug-in responds to a call request of a client to a specified interface, and obtains interface parameters of the specified interface; the communication plug-in is a plug-in of a first running environment developed by adopting a first language; the client is developed based on a development tool of the first running environment;
determining a target universal capability application to be called and a target task to be executed according to the interface parameters;
determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first language is an extended language of the second language;
and calling a method in the target dynamic link library file to execute the target task.
2. The method as recited in claim 1, further comprising:
monitoring an execution result of the target task returned by the target universal capability application;
and returning the execution result to the client.
3. The method of claim 1, wherein determining a target dynamic link library file corresponding to the target generic capability application from a plurality of dynamic link library files comprises:
determining the type of an operating system where the client is located;
and selecting the target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files matched with the type of the operating system.
4. The method of claim 1, wherein invoking the method in the target dynamic link library file to perform the target task comprises:
determining the service type of the client applied to the target universal capability;
according to the service type, calling a method in the target dynamic link library file to execute the target task; the service types include: synchronous call services, asynchronous call services, and/or asynchronous snoop services.
5. The method of claim 4, further comprising, prior to determining the type of service the client applies to the target generic capability:
receiving a service registration request sent by the client; the service registration request includes: the identification of the target general-purpose capability application and the corresponding service mode;
and registering synchronous call service, asynchronous call service and/or asynchronous monitoring service of the client to the target universal capability application according to the identification of the target universal capability application and the corresponding service mode.
6. The method of any of claims 1-4, wherein the first operating environment comprises: the Node JavaScript environment, the development tool of the first running environment includes: an Electron framework, the second language comprising: and C, the third language comprises: golang language.
7. The method according to any of claims 1-4, wherein the client comprises: an instant messaging client; the target generic capability application includes: an initialization component, a message destruction component, a messaging component, a creation group chat component, or a modification avatar component.
8. A task processing device, comprising:
the receiving module is used for responding to a call request of a client to a specified interface and acquiring interface parameters of the specified interface; the task processing device is developed based on a first running environment; the client is developed based on a development tool of a first running environment;
the determining module is used for determining a target general-purpose capability application to be called and a target task to be executed according to the interface parameters; determining a target dynamic link library file corresponding to the target universal capability application from a plurality of dynamic link library files; the plurality of dynamic link library files are obtained by compiling a plurality of original program files of a plurality of universal capability applications developed in a third language by adopting a second language; the first operation environment is developed based on the expansion language of the second language;
and the calling module is used for calling the method in the target dynamic link library file to execute the target task.
9. An electronic device, comprising: a memory and a processor;
the memory is used for storing one or more computer instructions;
the processor is configured to execute the one or more computer instructions to: performing the steps of the method of any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, characterized in that the computer program is capable of implementing the task processing method according to any one of claims 1-8 when executed by a processor.
CN202310740254.6A 2023-06-20 2023-06-20 Task processing method, device, equipment and storage medium Pending CN116700784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310740254.6A CN116700784A (en) 2023-06-20 2023-06-20 Task processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310740254.6A CN116700784A (en) 2023-06-20 2023-06-20 Task processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116700784A true CN116700784A (en) 2023-09-05

Family

ID=87838977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310740254.6A Pending CN116700784A (en) 2023-06-20 2023-06-20 Task processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116700784A (en)

Similar Documents

Publication Publication Date Title
CN107203419B (en) Method, device and system for calling among modules in application program
CN102681854B (en) Service execution method, server and computer system
US9760415B2 (en) Code service for language-independent dispatch
CN110365751B (en) Service processing method, device and equipment of gateway system
Lagaillardie et al. Implementing multiparty session types in rust
CN111290866A (en) Service processing method and device
CN113918232B (en) Algorithm service calling method, device, server and storage medium
CN110928548B (en) Data processing method and device
CN109145238A (en) Card display method and device and mobile device
CN110944018A (en) Rpc communication method, device and medium based on annotation and dynamic proxy
CN113612686A (en) Traffic scheduling method and device and electronic equipment
CN114416224B (en) Method and device for calling micro service under multi-micro service environment
CN109828830B (en) Method and apparatus for managing containers
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
EP3879795A1 (en) Method and apparatus for acquiring information, device, medium and computer program product
CN112559124A (en) Model management system and target operation instruction processing method and device
CN116700784A (en) Task processing method, device, equipment and storage medium
CN111988429A (en) Algorithm scheduling method and system
CN112346882A (en) Method and apparatus for transmitting information
CN112445504A (en) Equipment firmware upgrading method, device and system
CN114416165A (en) Interface publishing method, system, computer equipment and storage medium
CN113946489A (en) Data acquisition method, system, device and storage medium
CN110581826B (en) Core network communication method, device and system
CN116501365B (en) Resource calling method, device and equipment based on algorithm platform
CN111435320A (en) Data processing method and device

Legal Events

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