[go: up one dir, main page]

CN114077456B - 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
CN114077456B
CN114077456B CN202110951046.1A CN202110951046A CN114077456B CN 114077456 B CN114077456 B CN 114077456B CN 202110951046 A CN202110951046 A CN 202110951046A CN 114077456 B CN114077456 B CN 114077456B
Authority
CN
China
Prior art keywords
component
dart
local
message
message channel
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.)
Active
Application number
CN202110951046.1A
Other languages
Chinese (zh)
Other versions
CN114077456A (en
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/CN114077456B/en
Publication of CN114077456A publication Critical patent/CN114077456A/en
Application granted granted Critical
Publication of CN114077456B publication Critical patent/CN114077456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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, an electronic device 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, a message sending interface is called to forward a method calling request for the component to the Dart end through a message channel of the local end; receiving a processing result sent by the Dart terminal according to the method call request through a message channel of the local terminal, and loading the component according to the processing result; and when receiving a release request for the component sent by the Dart end through the message channel, releasing the memory space occupied by the component. The method can smooth the language difference 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 method and an apparatus for processing a component, an electronic device, and a storage medium.
Background
With the development of network technology, various application platforms are focusing on developing unique application development frameworks, so that the application platforms can be suitable for various requirements of the platforms in daily life.
In the related art, only a set of unique APIs ((Application Programming Interface, application program interface)) is usually developed to implement communication connection between the Flutter engine (a page development engine) and the JS (JavaScript, a lightweight, interpreted or just-in-time compiled programming language with function priority) engine, so that mutual communication of component data between the engines under other language logic cannot be supported, and the applicability of communication between the Flutter engine and the JS engine is greatly reduced.
Disclosure of Invention
The embodiment of the application provides a component processing method, a device, electronic equipment and a computer readable storage medium, which aim to solve the technical problem that the applicability of communication between Flutter engines and JS engines is greatly reduced because the mutual communication of component data between engines under other language logics cannot be supported in the related art as far as possible.
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, and 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, a message sending interface is called to forward a method calling request for the component to the Dart end through a message channel of the local end;
Receiving a processing result sent by the Dart terminal according to the method call request through a message channel of the local terminal, and loading the component according to the processing result;
And when receiving a release request for the component sent by the Dart end 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 call message sending interface is configured to forward a method call request for the component to the Dart end through a message channel of the local end, and 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 forwarding the method calling request to the Dart end through a message channel of the local end.
Optionally, the calling message sending interface includes:
when the component is an expansion component, a target call message sending interface corresponding to the expansion component is called, and the target call message sending interface comprises at least two sub call message sending interfaces.
Optionally, the JS-terminal is running based on a sub-thread independent of the main thread, and the main thread is used to run Flutter logical programs.
Optionally, before detecting a load instruction for a component, invoking a message sending interface to forward a method invocation request for the component to the Dart end through a message channel of the local end, the method further comprises:
And converting the program files obtained from the Flutter end into JS format, wherein the program files corresponding to the components are respectively provided with independent JS files.
The embodiment of the application provides a component processing device, 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 device comprises:
The sending module is used for calling a message sending interface to forward a device calling request for the component to the Dart end through a message channel of the local end 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 the 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;
the sending module is further used for:
And calling a message sending interface to enable the message sending module to generate a device calling request based on the target language, and forwarding the device calling request to the Dart end through a message channel of the local end.
Optionally, the sending module is further configured to:
when the component is an expansion component, a target call message sending interface corresponding to the expansion component is called, and the target call message sending interface comprises at least two sub call message sending interfaces.
Optionally, the JS-terminal is running based on a sub-thread independent of the main thread, and the main thread is used to run Flutter logical programs.
Optionally, the sending module is further configured to:
And converting the program files obtained from the Flutter end into JS format, wherein the program files corresponding to the components are respectively provided with independent JS files.
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, which when executed by the processor, performs the steps of the component processing method described above.
Embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the component processing method as described in the above claims.
According to the component processing method, the device, the electronic equipment and the computer readable storage medium, the connection communication between the JS end and the Dart end is 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 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 application;
FIG. 2 schematically illustrates one of the principle flow diagrams of a component handling method in an embodiment of the application;
FIG. 3 schematically illustrates a second schematic flow diagram of a component handling method in an embodiment of the application;
fig. 4 schematically shows a block diagram of a component handling apparatus in an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are 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.
Fig. 1 schematically illustrates a step flow chart of a component processing method provided by an embodiment of the present application, which is applied to a JS terminal, where the JS terminal is communicatively connected to a Dart terminal through a message channel of a local terminal, and the local terminal is configured to execute a logic program based on a target language, and the method includes:
Step 101, when a loading instruction for a component is detected, a message sending interface is called to forward a method calling request for the component to the Dart end through a message channel of the local end.
In the embodiment of the application, the JS end is an electronic device or a processing unit for processing a logical program based on a JS format, and can convert a logical execution part based on a Flutter engine into the JS format for processing, so that the logical program of the Flutter engine can be edited at the JS end, and the function of dynamically processing the program code of the Flutter engine is realized. It will be appreciated that the Flutter engine, while rendering the generated interface, is desirable to convert the Flutter engine program code to JS format, since the Flutter engine does not support dynamic use and the packaging language used by the Flutter engine is poorly readable and editable, thereby facilitating editing of the components in the interface by the user. The component refers to a functional module with an interface layout function, and may be a common interface style component, or may be a Widget (Widget) commonly used by Flutter engines, which may be specifically set according to actual requirements, and is not limited herein. The Dart (a computer programming language suitable for Flutter engine) side refers to an electronic device or processing unit for executing program code based on the Dart language, responsible for rendering the logic program related to generating components and processing other components. The local (Native) side is an electronic device or processing unit that can execute program code based on a target language, which may be a program language independent of JS language and Dart language, such as Fair language, etc., and the message channel (MESSAGE CHANNEL) refers to a dedicated data transmission channel provided by the local side, which may be in the form of an API (Application Programming Interface, application program interface), mainly responsible for data forwarding between the JS side and the Dart side, which is carried by the local side, and which can be used by the JS side and the Dart only to complete registration at the local side.
In some embodiments of the present application, when the JS terminal detects a load instruction for a component input by a user or other devices, the JS terminal may first send a method call request to be sent to the local terminal by calling a message sending interface provided by the local terminal, and after the local terminal processes the method call request based on a logic program, for example, a fairlanguage, the local terminal forwards the method call request to the Dart terminal through a message channel, thereby implementing data transmission from the JS terminal to the Dart terminal.
Step 102, receiving a processing result sent by the Dart end according to the method call request through the message channel of the local end, and loading the component according to the processing result.
In the embodiment of the application, the Dart terminal executes Flutter logic programs corresponding to the component to generate a processing result after receiving the method call request, then the processing result is transmitted to the local terminal through the message channel, the local terminal continues to process the processing result based on the logic programs such as the Fair language, and the processing result is returned to the JS terminal, so that the data transmission from the Dart terminal to the JS terminal is realized.
And step 103, when receiving a release request for the component sent by the Dart end through the message channel, releasing the memory space occupied by the component.
In the embodiment of the application, the release logic is usually initiated by the Dart terminal, when the Dart determines that the memory space occupied by the component needs to be released, the Dart can send a release request to the local terminal by calling the release function on release (), after the local terminal forwards the release request to the JS terminal, the local object of the JS terminal shows the corresponding JS object according to the component identifier of the component, and then the local terminal also releases the corresponding JS object, so that the release flow of the memory space of the component is completed.
Specifically, referring to fig. 2, a schematic diagram of a component processing method provided by the present application is shown. The JS terminal sends a method call request to the local terminal through a message channel (FAIR MESSAGE CHANNEL) according to the received message, the local terminal executes processing logic based on the Fair language through a processing unit (Fair Js Loader) to obtain a processed message, the local terminal sends the processed method call request to the Dart terminal through a message channel (FAIR MESSAGE CHANNEL) through a sending unit (Fair JS Flutter Engine), a scheduling unit (Fair Plugin Dispatcher) of the Dart terminal processes each plug-in the Dart terminal through a message channel (FAIR MESSAGE CHANNEL) to obtain a processing result, the processing result is returned to the JS terminal according to a sending path, and the JS terminal continuously records the components according to the processing result.
According to the embodiment of the application, the connection communication between the JS terminal and the Dart terminal is realized through the message channel provided by the local terminal 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 the communication connection between the JS terminal and the Dart is improved.
Optionally, a message sending module is connected to the message sending interface, and the 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 forwarding the method calling request to the Dart end through a message channel of the local end.
In the embodiment of the application, considering that the user needs to call the function in the Dart terminal through the JS terminal in the actual development process, the user can not know the interface of the function to be called possibly because the target language such as Fair language is not known, so the user only needs to know the interface address of the function to be called by integrating and packaging the message sending function of the call request into a unified message sending module, and the function data can be conveniently obtained from the Dart terminal by calling the interface in the message sending module.
In some embodiments of the present application, the message sending module may be a computer storage medium disposed in the JS terminal, and the message sending interface may be invoked by internal message communication of the terminal; of course, the electronic device may be an electronic device other than the JS terminal, and the message sending interface may be invoked by remote call. Of course, the setting mode of the message sending module can be specifically determined according to actual requirements, and is not limited herein.
Optionally, the step 101 includes: when the component is an expansion component, a target call message sending interface corresponding to the expansion component is called, and the target call message sending interface comprises at least two sub call message sending interfaces.
In the embodiment of the application, the message sending module provided by the embodiment of the application can be obtained by user-defined encapsulation, and the user only needs to specify an interface, so that the user can conveniently realize function expansion by only calling a target call message sending interface corresponding to the expansion component when the user needs to call the expansion component, so that the user can conveniently realize the third-party expansion of the function in the Dart terminal conveniently. Specifically, the user can package the plurality of sub-call message sending interfaces into one target call message sending interface through the custom setting, so that the JS generates at least two method call requests based on at least two target call message sending interfaces associated with the target call message sending interfaces when receiving a call request for the target call message sending interface, and forwards the at least two method call requests to the Dart end through the local end, thereby enabling the Dart to respectively return at least two processing results required by the expansion component according to the at least two method call requests.
Optionally, the JS-terminal is running based on a sub-thread independent of the main thread, and the main thread is used to run Flutter logical programs.
In the embodiment of the application, referring to fig. 3, in order to avoid performance consumption of Flutter layout resources, flutter layout resources can be independently operated by a main thread, and 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 can be performed through custom JS-bridge communication, so that the JS engine and Flutter engine can operate in two threads without mutual interference, 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 includes: and converting the program files obtained from the Flutter end into JS format, wherein the program files corresponding to the components are respectively provided with independent JS files.
In the embodiment of the application, in order to realize the dynamic requirement of Flutter engine, the logic code of Flutter end needs to be converted into the code of JS format, and the JS end is used for analyzing and processing related logic programs. In order to ensure the independence of each interface, each component or widget can be corresponding 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 terminal, where the JS terminal is communicatively connected to a Dart terminal through a message channel of a local terminal, and the local terminal is configured to execute a logic program based on a target language, 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 invocation request for the component to the Dart end through a message channel of the local end;
The loading module 202 is configured to receive, through a 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;
and the releasing module 203 is 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, a message sending module 201 is connected to the message sending interface;
The sending module 201 is further configured to:
A message sending interface is invoked, so that the message sending module 201 generates a device calling request based on the target language, and forwards the device calling request to the Dart end through a message channel of the local end.
Optionally, the sending module 201 is further configured to:
when the component is an expansion component, a target call message sending interface corresponding to the expansion component is called, and the target call message sending interface comprises at least two sub call message sending interfaces.
Optionally, the JS-terminal is running based on a sub-thread independent of the main thread, and the main thread is used to run Flutter logical programs.
Optionally, the sending module 201 is further configured to:
And converting the program files obtained from the Flutter end into JS format, wherein the program files corresponding to the components are respectively provided with independent JS files.
According to the embodiment of the application, the connection communication between the JS terminal and the Dart terminal is realized through the message channel provided by the local terminal 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 the communication connection between the JS terminal 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, which when executed by the processor, performs the steps of the component processing method described above.
Embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the component processing method as described in the above claims.
The embodiment of the application adjusts the index content in the index column 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, the embodiment of the present application further provides an electronic device, including: the processor, the memory, the computer program stored in the memory and capable of running on the processor, the computer program realizes each process of the above information processing method embodiment when executed by the processor, and can achieve the same technical effect, and for avoiding repetition, the description is omitted here.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the above information processing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here. The computer readable storage medium is, for example, a Read-Only Memory (ROM), a random access Memory (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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with 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 solution. 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 will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in 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 this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (12)

1. The component processing method is characterized by being 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 target language is a program language independent of the JS language and the Dart language, and the method comprises the following steps:
When a loading instruction for a component is detected, a message sending interface is called to forward a method calling request for the component to the Dart end through a message channel of the local end, wherein the message channel refers to a special data transmission channel in an API form provided by the local end, the JS end and the Dart end are required to finish registration at the local end, and the local end processes the method calling request based on a logic program of a target language and then forwards the method calling request to the Dart end;
Receiving a processing result sent by the Dart terminal according to the method call request through a message channel of the local terminal, and loading the component according to the processing result;
And when receiving a release request for the component sent by the Dart end through the message channel, releasing the memory space occupied by the component.
2. The method according to claim 1, wherein a messaging module is connected to the messaging interface;
The call message sending interface is configured to forward a method call request for the component to the Dart end through a message channel of the local end, and 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 forwarding the method calling request to the Dart end through a message channel of the local end.
3. The method of claim 2, wherein the invoking the messaging interface comprises:
when the component is an expansion component, a target call message sending interface corresponding to the expansion component is called, and the target call message sending interface comprises at least two sub call message sending interfaces.
4. The method of claim 1, wherein the JS-port is run based on a child thread independent of a main thread used to run Flutter logical programs.
5. The method of claim 1, wherein before detecting a load instruction for a component, invoking a messaging interface to forward a method invocation request for the component to the Dart via the message channel of the local side, the method further comprises:
And converting the program files obtained from the Flutter end into JS format, wherein the program files corresponding to the components are respectively provided with independent JS files.
6. A component processing apparatus, which is applied to a JS terminal, the JS terminal is communicatively connected to a Dart terminal through a message channel of a local terminal, the local terminal is configured to execute a logic program based on a target language, and the target language is a program language independent of the JS language and the Dart language, the apparatus includes:
The device comprises a sending module, a receiving module and a receiving module, wherein the sending module is used for calling a message sending interface to forward a device calling request of a component to the Dart end through a message channel of the local end, the message channel is a special data transmission channel in an API form provided by the local end, the JS end and the Dart end are required to finish registration at the local end, and the local end processes the device calling request based on a logic program of a target language and then forwards the device calling request to the Dart end;
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 the release request for the component sent by the Dart end through the message channel.
7. The apparatus of claim 6, wherein a messaging module is coupled to the messaging interface;
the sending module is further used for:
And calling a message sending interface to enable the message sending module to generate a device calling request based on the target language, and forwarding the device calling request to the Dart end through a message channel of the local end.
8. The apparatus of claim 7, wherein the transmitting module is further configured to:
when the component is an expansion component, a target call message sending interface corresponding to the expansion component is called, and the target call message sending interface comprises at least two sub call message sending interfaces.
9. The apparatus of claim 6, wherein the JS-port is operated on a sub-thread independent of a main thread used to operate Flutter logical programs.
10. The apparatus of claim 6, wherein the transmitting module is further configured to:
And converting the program files obtained from the Flutter end into JS format, wherein the program files corresponding to the components are respectively provided with independent JS files.
11. An electronic device, comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the component processing method according to any one of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the component handling method according to any of claims 1 to 5.
CN202110951046.1A 2021-08-18 2021-08-18 Component processing method and device, electronic equipment and storage medium Active CN114077456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110951046.1A CN114077456B (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 CN114077456B (en) 2021-08-18 2021-08-18 Component processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114077456A CN114077456A (en) 2022-02-22
CN114077456B true CN114077456B (en) 2024-07-05

Family

ID=80283285

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN114077456B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064593A (en) * 2021-04-12 2021-07-02 深圳市活力天汇科技股份有限公司 Method and device for dynamic mobile APP, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7600252B2 (en) * 2004-06-08 2009-10-06 Dartdevices Interop Corporation System method and model for social security interoperability among intermittently connected interoperating devices
CN112256421B (en) * 2020-11-12 2024-06-18 Oppo广东移动通信有限公司 Communication processing method, device, storage medium and electronic equipment
CN112667263B (en) * 2021-01-05 2025-02-07 北京城市网邻信息技术有限公司 Dynamic update method, device, electronic device and storage medium of Flutter component
CN113031932B (en) * 2021-03-11 2023-10-20 腾讯科技(深圳)有限公司 Project development method, apparatus, electronic device and storage medium
CN113094138B (en) * 2021-04-19 2024-09-10 京东方科技集团股份有限公司 Interface display method and device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064593A (en) * 2021-04-12 2021-07-02 深圳市活力天汇科技股份有限公司 Method and device for dynamic mobile APP, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114077456A (en) 2022-02-22

Similar Documents

Publication Publication Date Title
CN109213611B (en) Cross-process communication method, device, terminal and storage medium
KR101366402B1 (en) Virtual execution system for resource-constrained devices
EP3143498B1 (en) Code service for language-independent dispatch
US10207190B2 (en) Technologies for native game experience in web rendering engine
AU2019256257B2 (en) Processor core scheduling method and apparatus, terminal, and storage medium
US20140298318A1 (en) Computer-executable application packaging method, computer-executable device and storage media performing the same
US20130283251A1 (en) Canonical Mechanism for Securely Assembling Features into a Mobile Application
CN113297566A (en) Sandbox implementation method, sandbox implementation device, sandbox implementation equipment and storage medium
US11699073B2 (en) Network off-line model processing method, artificial intelligence processing device and related products
CN113360807B (en) Page display method and device of mixed-mode mobile application and related equipment
CN111143010A (en) Terminal device control method, terminal device, and storage medium
EP3872630B1 (en) Request processing method and apparatus, electronic device, and computer storage medium
CN110825383B (en) Video interaction method and device and computer readable storage medium
CN118535273A (en) Customized container engine, method, host and medium
CN114077456B (en) Component processing method and device, electronic equipment and storage medium
EP3188071B1 (en) Application accessing control method and device
KR101254756B1 (en) Method of creating virtual machine compatible with multiple operating system, and program recording media for virtual machine
US8276165B2 (en) Continuation-based runtime callback invocation
CN114090134A (en) Data interaction method and device, storage medium and electronic equipment
CN111522536A (en) Method for calling programming language and related equipment thereof
CN113867920B (en) Task processing method, device, electronic equipment and medium
CN114416381A (en) Processing resource over-partitioning method, device, equipment and storage medium
US20140033053A1 (en) Method for executing widgets in a processing device
CN111240679B (en) Page development method and system
CN114153513A (en) Component starting 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
GR01 Patent grant
GR01 Patent grant