CN114077456A - Component processing method and device, electronic equipment and storage medium - Google Patents

Component processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114077456A
CN114077456A CN202110951046.1A CN202110951046A CN114077456A CN 114077456 A CN114077456 A CN 114077456A CN 202110951046 A CN202110951046 A CN 202110951046A CN 114077456 A CN114077456 A CN 114077456A
Authority
CN
China
Prior art keywords
component
calling
dart
message
terminal
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
CN202110951046.1A
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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN202110951046.1A priority Critical patent/CN114077456A/en
Publication of CN114077456A publication Critical patent/CN114077456A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources

Landscapes

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

Abstract

The application provides a component processing method, a device, electronic equipment and a storage medium, which are applied to the technical field of computers, wherein the method is applied to a JS end, the JS end is in communication connection with a Dart end through a message channel of a local end, the local end is used for executing a logic program based on a target language, and the method comprises the following steps: when a loading instruction for a component is detected, calling a message sending interface to forward a method calling request for the component to the Dart terminal through a message channel of the local terminal; receiving a processing result sent by the Dart terminal according to the method calling request through a message channel of the local terminal, and loading the component according to the processing result; and when a release request for the component sent by the Dart terminal is received through the message channel, releasing the memory space occupied by the component. The application can smooth the difference of the languages between the platforms, is convenient for project maintenance, and improves the applicability of communication connection between the JS end and the Dart.

Description

Component processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a component processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of network technology, various application platforms begin to focus on developing unique application development frameworks, so that the application platforms can meet various requirements of the platforms.
In the related art, only a set of unique API (Application Programming Interface) is usually developed to implement communication connection between a Flutter engine (a page development engine) and a JS (JavaScript, a lightweight, interpreted, or just-in-time compiled Programming language) engine, which cannot support mutual communication of component data between engines in other language logics, thereby greatly reducing the applicability of communication between the Flutter engine and the JS engine.
Disclosure of Invention
The component processing method, the component processing device, the electronic device and the computer readable storage medium provided by the embodiment of the application aim to solve the technical problem that the applicability of communication between a Flutter engine and a JS engine is greatly reduced as far as possible because the related technology cannot support mutual communication of component data between engines under other language logics.
The embodiment of the application provides a component processing method, which is applied to a JS end, wherein the JS end is in communication connection with a Dart end through a message channel of a local end, the local end is used for executing a logic program based on a target language, and the method comprises the following steps:
when a loading instruction for a component is detected, calling a message sending interface to forward a method calling request for the component to the Dart terminal through a message channel of the local terminal;
receiving a processing result sent by the Dart terminal according to the method calling request through a message channel of the local terminal, and loading the component according to the processing result;
and when a release request for the component sent by the Dart terminal is received through the message channel, releasing the memory space occupied by the component.
Optionally, the message sending interface is connected with a message sending module;
the calling a message sending interface to forward a method calling request for the component to the Dart terminal through a message channel of the local terminal includes:
and calling a message sending interface to enable the message sending module to generate a method calling request based on the target language and forward the method calling request to the Dart terminal through a message channel of the local terminal.
Optionally, the invoking a message sending interface includes:
and when the component is an extension component, calling a target calling message sending interface corresponding to the extension component, wherein the target calling message sending interface comprises at least two sub-calling message sending interfaces.
Optionally, the JS head is run on a sub-thread independent of the main thread, the main thread being used to run the Flutter logic program.
Optionally, before detecting a load instruction for a component, and invoking a message sending interface to forward a method call request for the component to the Dart terminal through a message channel of the local terminal, the method further includes:
and converting the program file acquired from the Flutter end into a JS format, wherein the program file corresponding to each component is provided with an independent JS file respectively.
The embodiment of the application provides a component processing apparatus, is applied to the JS end, the JS end is connected with Dart end communication through the message channel of the local end, the local end is used for carrying out the logic program based on the target language, the apparatus includes:
the sending module is used for calling a message sending interface to forward a device calling request for the component to the Dart terminal through a message channel of the local terminal when a loading instruction for the component is detected;
the loading module is used for receiving a processing result sent by the Dart end according to the device calling request through a message channel of the local end and loading the component according to the processing result;
and the release module is used for releasing the memory space occupied by the component when receiving a release request for the component sent by the Dart end through the message channel.
Optionally, the message sending interface is connected with a message sending module;
a sending module, further configured to:
and calling a message sending interface to enable the message sending module to generate a device calling request based on the target language and forward the device calling request to the Dart terminal through a message channel of the local terminal.
Optionally, the sending module is further configured to:
and when the component is an extension component, calling a target calling message sending interface corresponding to the extension component, wherein the target calling message sending interface comprises at least two sub-calling message sending interfaces.
Optionally, the JS head is run on a sub-thread independent of the main thread, the main thread being used to run the Flutter logic program.
Optionally, the sending module is further configured to:
and converting the program file acquired from the Flutter end into a JS format, wherein the program file corresponding to each component is provided with an independent JS file respectively.
An embodiment of the present application provides an electronic device, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the component handling method described above.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the component processing method according to the above claims.
According to the component processing method and device, the electronic device and the computer readable storage medium, the connection and communication between the JS end and the Dart end are achieved through the message channel provided by the local end based on the target language, so that the message channel can be customized for different languages based on actual requirements, the language difference between platforms can be smoothed, project maintenance is facilitated, and the applicability of communication connection between the JS end and the Dart is improved.
Drawings
FIG. 1 schematically illustrates a flow chart of steps of a component handling method in an embodiment of the present application;
FIG. 2 schematically illustrates one of the principle flow diagrams of a component handling method in an embodiment of the present application;
FIG. 3 schematically illustrates a second schematic flow chart of a component handling method in an embodiment of the present application;
fig. 4 schematically shows a block diagram of a component handling apparatus in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 schematically shows a flowchart of steps of a component processing method provided in an embodiment of the present application, where the component processing method is applied to a JS client, where the JS client is communicatively connected to a Dart client through a message channel of a local client, where the local client is configured to execute a target language-based logic program, and the method includes:
step 101, when a load instruction for a component is detected, a message sending interface is called to forward a method call request for the component to the Dart terminal through a message channel of the local terminal.
In the embodiment of the application, the JS end is an electronic device or a processing unit for processing the logic program based on the JS format, and can convert the logic execution part based on the Flutter engine into the JS format for processing, so that the logic program of the Flutter engine can be edited at the JS end, and a dynamic function of a program code of the Flutter engine is realized. It can be understood that although the Flutter engine can render and generate the interface, since the Flutter engine does not support dynamic use and the readability and edibility of the encapsulation language used by the Flutter engine are poor, the program code of the Flutter engine needs to be converted into the JS format, so that the user can edit the components in the interface conveniently. The component is a functional module with an interface layout function, and may be a commonly-used interface style component, or a Widget (Widget) commonly used by a Flutter engine, and may be specifically set according to actual requirements, which is not limited herein. The Dart (a computer programming language suitable for the Flutter engine) end refers to an electronic device or a processing unit for executing a Dart-language-based program code, and is responsible for rendering and generating components and processing logic programs related to other components. The local (Native) end is an electronic device or a processing unit that can execute program codes based on a target language, where the target language may be a program language independent of JS and Dart languages, such as Fair language, and the Message Channel (Message Channel) refers to a dedicated data transmission Channel provided by the local end, which may be in the form of an API (Application Programming Interface), and is mainly responsible for data forwarding between the JS end and the Dart end, where the Message Channel is borne by the local end, and the JS end and Dart only need to complete registration at the local end to realize data transmission using the Message Channel.
In some embodiments of the application, when detecting a load instruction for a component input by a user or other equipment, the JS end may call a message sending interface provided by the local end, so as to send a method call request to be sent to the local end first, and after processing the method call request based on a logic program in, for example, a Fair language, the local end forwards the method call request to the Dart end through a message channel, thereby implementing data transmission from the JS end to the Dart end.
And 102, receiving a processing result sent by the Dart terminal according to the method calling request through a message channel of the local terminal, and loading the component according to the processing result.
In the embodiment of the application, after receiving the method invocation request, the Dart end executes the Flutter logic program corresponding to the component to generate a processing result, and then delivers the processing result to the local end through the message channel, and the local end continues to process the processing result based on the logic program of, for example, the Fair language, and returns the processing result to the JS end, thereby implementing data transmission from the Dart end to the JS end.
Step 103, when a release request for the component sent by the Dart end is received through the message channel, releasing the memory space occupied by the component.
In this embodiment of the application, the release logic is usually initiated by a Dart end, when determining that the memory space occupied by the component needs to be released, the Dart end may send a release request to the local end by calling a release function on release (), after the local end forwards the release request to the JS end, the local object of the JS end shows the corresponding JS object according to the component identifier of the component, and then the local end also releases the corresponding JS object, thereby completing the release process of the memory space of the component.
Specifically, referring to fig. 2, a schematic diagram of a component processing method provided in the present application is shown. The JS end sends a calling request to the local end through a Message Channel (Fair Message Channel) according to the received Message, the local end executes a processing logic based on Fair language to the calling request through a processing unit (Fair Js Loader) to obtain a processing Message, then the local end sends the processed calling request to the Dart end through a Message Channel (Fair JS router), then a scheduling unit (Fair Plugin Dispatcher) of the Dart end distributes the calling request to each plug-in the Dart end through the Message Channel (Fair Message Channel) to process to obtain a processing result, and then the JS end returns to the JS end according to the sending path, and the JS end continues to record components according to the processing result.
According to the embodiment of the application, the connection and communication between the JS end and the Dart end are realized through the message channel provided by the local end based on the target language, so that the message channel can be customized for different languages based on actual requirements, the difference of the languages between platforms can be smoothed, the project maintenance is facilitated, and the applicability of the communication connection between the JS end and the Dart is improved.
Optionally, the message sending interface is connected to a message sending module, and step 101 includes: and calling a message sending interface to enable the message sending module to generate a method calling request based on the target language and forward the method calling request to the Dart terminal through a message channel of the local terminal.
In the embodiment of the present application, it is considered that a user needs to call a function in a Dart end through a JS end in an actual development process, but a function interface that needs to be called may not be known due to unknown target language such as Fair language, and the like, so that the message sending function of the call request is integrated and packaged into a unified message sending module in the embodiment of the present application, and the user only needs to know an interface address of the function that needs to be called, so that the function data can be conveniently obtained from the Dart end by calling the interface in the message sending module.
In some embodiments of the present application, the message sending module can be a computer storage medium disposed in the JS client, which can be invoked by client internal messaging; of course, the message sending interface can be called by remote calling through an electronic device arranged outside the JS end. Of course, the setting mode of the message sending module may be determined according to actual requirements, and is not limited herein.
Optionally, the step 101 includes: and when the component is an extension component, calling a target calling message sending interface corresponding to the extension component, wherein the target calling message sending interface comprises at least two sub-calling message sending interfaces.
In the embodiment of the application, certainly, in order to facilitate a user to more conveniently and quickly perform third-party expansion on the function in the Dart terminal, the message sending module provided in the embodiment of the application can also be obtained by user-defined packaging, and the user only needs to specify an interface, so that when the user needs to call an expansion component, the user only needs to call a target corresponding to the expansion component to call the message sending interface, and the function expansion can be conveniently realized. Specifically, a user can package a plurality of sub-call message sending interfaces into one target call message sending interface through custom setting, so that when the JS receives a call request for the target call message sending interface, at least two target call message sending interfaces associated with the target call message sending interface are generated based on the at least two target call message sending interfaces, and the at least two method call requests are forwarded to the Dart terminal through the local terminal, so that the Dart respectively returns at least two processing results required by the extension component according to the at least two method call requests.
Optionally, the JS head is run on a sub-thread independent of the main thread, the main thread being used to run the Flutter logic program.
In the embodiment of the application, referring to fig. 3, in order to avoid performance consumption on Flutter layout resources, the Flutter layout resources can be independently operated by a main thread, a JS engine in a JS end can be put into a sub-thread independent of the main thread to operate for a long time, and communication is performed through customized JS-bridge communication, so that the JS engine and the Flutter engine can operate in double threads, mutual interference is avoided, and the influence of the JS engine on the rendering efficiency of the Flutter engine is avoided.
Optionally, before the step 101, the method further comprises: and converting the program file acquired from the Flutter end into a JS format, wherein the program file corresponding to each component is provided with an independent JS file respectively.
In the embodiment of the application, in order to realize the dynamic requirement for the Flutter engine, the logic code of the Flutter end needs to be converted into the code in the JS format, and the JS end is used to analyze and process the relevant logic program. In order to ensure the independence of each interface, each component or widget corresponds to one JS file, so that different components or widgets can act on different JS scopes, and the communication of messages and the configuration of related resources are facilitated.
Fig. 4 schematically illustrates a component processing apparatus 20 provided in an embodiment of the present application, which is applied to a JS client that is communicatively connected to a Dart client through a message channel of the local client, where the local client is configured to execute a target language-based logic program, and the apparatus includes:
a sending module 201, configured to, when a load instruction for a component is detected, invoke a message sending interface to forward a device call request for the component to the Dart terminal through a message channel of the local terminal;
a loading module 202, configured to receive, through the message channel of the local end, a processing result sent by the Dart end according to the device call request, and load the component according to the processing result;
a releasing module 203, configured to release the memory space occupied by the component when receiving, through the message channel, a release request for the component sent by the Dart end.
Optionally, the message sending interface is connected with a message sending module 201;
the sending module 201 is further configured to:
a message sending interface is called, so that the message sending module 201 generates a device call request based on the target language, and forwards the device call request to the Dart terminal through a message channel of the local terminal.
Optionally, the sending module 201 is further configured to:
and when the component is an extension component, calling a target calling message sending interface corresponding to the extension component, wherein the target calling message sending interface comprises at least two sub-calling message sending interfaces.
Optionally, the JS head is run on a sub-thread independent of the main thread, the main thread being used to run the Flutter logic program.
Optionally, the sending module 201 is further configured to:
and converting the program file acquired from the Flutter end into a JS format, wherein the program file corresponding to each component is provided with an independent JS file respectively.
According to the embodiment of the application, the connection and communication between the JS end and the Dart end are realized through the message channel provided by the local end based on the target language, so that the message channel can be customized for different languages based on actual requirements, the difference of the languages between platforms can be smoothed, the project maintenance is facilitated, and the applicability of the communication connection between the JS end and the Dart is improved.
An embodiment of the present application provides an electronic device, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the component handling method described above.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the component processing method according to the above claims.
According to the method and the device, the index content in the index bar is adjusted by adapting to the layout sizes of the list control and the navigation control in the navigation interface, so that the index content can still be completely displayed when the layout sizes of the navigation control and the list control are changed.
Preferably, an embodiment of the present application further provides an electronic device, including: the processor, the memory, and the computer program stored in the memory and capable of running on the processor, when executed by the processor, implement the processes of the above-mentioned information processing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not described here again.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the information processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, 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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, the present embodiments are not limited to the above-described embodiments, which are merely illustrative and not restrictive, and it will be apparent to those of ordinary skill in the art that many more modifications and variations can be made without departing from the spirit of the present disclosure and the scope of the appended claims.
Those of ordinary skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed in the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. The component processing method is applied to a JS end, the JS end is in communication connection with a Dart end through a message channel of a local end, the local end is used for executing a logic program based on a target language, and the method comprises the following steps:
when a loading instruction for a component is detected, calling a message sending interface to forward a method calling request for the component to the Dart terminal through a message channel of the local terminal;
receiving a processing result sent by the Dart terminal according to the method calling request through a message channel of the local terminal, and loading the component according to the processing result;
and when a release request for the component sent by the Dart terminal is received through the message channel, releasing the memory space occupied by the component.
2. The method of claim 1, wherein a message sending module is connected to the message sending interface;
the calling a message sending interface to forward a method calling request for the component to the Dart terminal through a message channel of the local terminal includes:
and calling a message sending interface to enable the message sending module to generate a method calling request based on the target language and forward the method calling request to the Dart terminal through a message channel of the local terminal.
3. The method of claim 2, wherein invoking the messaging interface comprises:
and when the component is an extension component, calling a target calling message sending interface corresponding to the extension component, wherein the target calling message sending interface comprises at least two sub-calling message sending interfaces.
4. The method of claim 1, wherein the JS head is run on a child thread independent of a main thread, the main thread being used to run a Flutter logic program.
5. The method of claim 1, wherein before detecting a load instruction for a component, invoking a messaging interface to forward a method call request for the component to the Dart terminal through a message channel of the local terminal, the method further comprises:
and converting the program file acquired from the Flutter end into a JS format, wherein the program file corresponding to each component is provided with an independent JS file respectively.
6. The utility model provides a component processing apparatus, its characterized in that is applied to JS end, JS end is through the message channel and the Dart end communication connection of local end, the local end is used for carrying out the logic program based on the target language, the device includes:
the sending module is used for calling a message sending interface to forward a device calling request for the component to the Dart terminal through a message channel of the local terminal when a loading instruction for the component is detected;
the loading module is used for receiving a processing result sent by the Dart end according to the device calling request through a message channel of the local end and loading the component according to the processing result;
and the release module is used for releasing the memory space occupied by the component when receiving a release request for the component sent by the Dart end through the message channel.
7. The apparatus of claim 6, wherein the message sending interface is connected with a message sending module;
a sending module, further configured to:
and calling a message sending interface to enable the message sending module to generate a device calling request based on the target language and forward the device calling request to the Dart terminal through a message channel of the local terminal.
8. The apparatus of claim 7, wherein the sending module is further configured to:
and when the component is an extension component, calling a target calling message sending interface corresponding to the extension component, wherein the target calling message sending interface comprises at least two sub-calling message sending interfaces.
9. The apparatus of claim 6, wherein the JS peer runs on a child thread separate from a main thread used to run a Flutter logic program.
10. The apparatus of claim 6, wherein the sending module is further configured to:
and converting the program file acquired from the Flutter end into a JS format, wherein the program file corresponding to each component is provided with an independent JS file respectively.
11. An electronic device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the component handling method according to any of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, realizes the steps of the component processing method according to any one of claims 1 to 5.
CN202110951046.1A 2021-08-18 2021-08-18 Component processing method and device, electronic equipment and storage medium Pending CN114077456A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110951046.1A CN114077456A (en) 2021-08-18 2021-08-18 Component processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110951046.1A CN114077456A (en) 2021-08-18 2021-08-18 Component processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114077456A true CN114077456A (en) 2022-02-22

Family

ID=80283285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110951046.1A Pending CN114077456A (en) 2021-08-18 2021-08-18 Component processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114077456A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050289383A1 (en) * 2004-06-08 2005-12-29 Daniel Illowsky System and method for interoperability application driven error management and recovery among intermittently coupled interoperable electronic devices
CN112256421A (en) * 2020-11-12 2021-01-22 Oppo广东移动通信有限公司 Communication processing method, communication processing device, storage medium and electronic equipment
CN112667263A (en) * 2021-01-05 2021-04-16 北京城市网邻信息技术有限公司 Dynamic updating method and device of Flutter component, electronic equipment and storage medium
CN113031932A (en) * 2021-03-11 2021-06-25 腾讯科技(深圳)有限公司 Project development method and device, electronic equipment and storage medium
CN113064593A (en) * 2021-04-12 2021-07-02 深圳市活力天汇科技股份有限公司 Method and device for dynamic mobile APP, computer equipment and storage medium
CN113094138A (en) * 2021-04-19 2021-07-09 京东方科技集团股份有限公司 Interface display method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050289383A1 (en) * 2004-06-08 2005-12-29 Daniel Illowsky System and method for interoperability application driven error management and recovery among intermittently coupled interoperable electronic devices
CN112256421A (en) * 2020-11-12 2021-01-22 Oppo广东移动通信有限公司 Communication processing method, communication processing device, storage medium and electronic equipment
CN112667263A (en) * 2021-01-05 2021-04-16 北京城市网邻信息技术有限公司 Dynamic updating method and device of Flutter component, electronic equipment and storage medium
CN113031932A (en) * 2021-03-11 2021-06-25 腾讯科技(深圳)有限公司 Project development method and device, electronic equipment and storage medium
CN113064593A (en) * 2021-04-12 2021-07-02 深圳市活力天汇科技股份有限公司 Method and device for dynamic mobile APP, computer equipment and storage medium
CN113094138A (en) * 2021-04-19 2021-07-09 京东方科技集团股份有限公司 Interface display method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10207190B2 (en) Technologies for native game experience in web rendering engine
CN106462407B (en) Code services for language independent scheduling
CN108536538A (en) Processor core dispatching method, device, terminal and storage medium
US20060265469A1 (en) XML based scripting framework, and methods of providing automated interactions with remote systems
CN108021400B (en) Data processing method and device, computer storage medium and equipment
AU2019256257B2 (en) Processor core scheduling method and apparatus, terminal, and storage medium
CN111274019B (en) Data processing method, device and computer readable storage medium
CN110187986B (en) Command management method, system, device and computer readable storage medium
US11699073B2 (en) Network off-line model processing method, artificial intelligence processing device and related products
CN109582317B (en) Method and apparatus for debugging hosted applications
CN111078316B (en) Layout file loading method and device, storage medium and electronic equipment
CN108153533B (en) Method and device for making installation program, and method and device for installing program
CN105847319A (en) Mobile terminal network request method and system
CN110825383A (en) Video interaction method and device and computer readable storage medium
CN111338769A (en) Data processing method and device and computer readable storage medium
CN110839079B (en) BI node execution method, device, equipment and medium in workflow system
CN114077456A (en) Component processing method and device, electronic equipment and storage medium
EP3188071B1 (en) Application accessing control method and device
CN110825373A (en) Dynamic method and device for mobile terminal
CN107092601B (en) Resource file construction method, resource file application method and device
CN114064176A (en) View interaction method and device, electronic equipment and computer readable medium
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN110262912B (en) Calling method and device for procedure call gRPC
Zhang et al. A webpage offloading framework for smart devices
CN112714148A (en) Interface configuration method, device, equipment and medium

Legal Events

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