Communication methods, devices, electronic equipment, and media in the Flutter system
By using a message encoder to convert data into binary format and configuring system interfaces during data communication between the Flutter system and the local system, the problem of low communication efficiency caused by different data types is solved, achieving efficient data transmission and legality monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2026-03-06
AI Technical Summary
Because the Flutter system and the local system support different data types, data communication efficiency is low, requiring manual logic conversion to ensure normal communication.
When a communication requirement is detected, the data to be processed is converted into binary communication data through a message encoder, and a matching conversion rule is selected according to the communication type. System interface information is then configured to realize data transmission.
It improves the efficiency of data communication between the Flutter system and the local system, simplifies the operation process, and ensures the legality and validity of data transmission.
Smart Images

Figure CN116567073B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data communication technology, and in particular to a communication method, apparatus, electronic device and medium for the Flutter system. Background Technology
[0002] With the rapid development of smart terminal processing technology, various internet-based system business platforms are increasingly being deployed in user service business processes. These include systems such as Flutter, Android, and iOS.
[0003] Flutter is an open-source user interface (UI) toolkit from Google that helps developers efficiently build beautiful, multi-platform applications using a single codebase, supporting mobile, web, desktop, and embedded systems. In related technologies, business users utilize Flutter to implement various functionalities on native systems, including Android and iOS. Understandably, to achieve these functionalities on a smart device, some data communication between Flutter and the native system is usually required.
[0004] However, due to the limitation that the two systems each support different data types, manual logical conversion is required during communication to ensure normal data exchange between the two systems. This also reduces the efficiency of business processing. Summary of the Invention
[0005] This application provides a communication method, apparatus, electronic device, and medium for the Flutter system. It addresses the problem in related technologies where data communication between two systems is inefficient due to each supporting different data types.
[0006] According to one aspect of the embodiments of this application, a communication method for a Flutter system is provided, applied in a smart terminal where a Flutter system and a local system are deployed, the method comprising:
[0007] When a communication requirement is detected between the Flutter system and the local system, the pending data of the sending object is obtained, wherein the sending object is one of the Flutter system and the local system;
[0008] The data to be processed is sent to the message encoder, and the communication type corresponding to the communication requirement is obtained. The communication type includes at least one of parameter communication type, event communication type and character communication type.
[0009] Select a conversion rule that matches the communication type, and based on the message encoder and the conversion rule, convert the data to be processed into communication data in the binary format;
[0010] The communication data is sent to a receiving object, which is another object in the Flutter system and the local system besides the sending object.
[0011] Optionally, in another embodiment based on the method described above in this application, after converting the data to be processed into the communication data in the binary format, the method further includes:
[0012] Detect the first communication permission corresponding to the sending object, and detect the second communication permission corresponding to the receiving object;
[0013] When it is determined that the first communication permission and the second communication permission are short-term interaction permissions, a timed clearing flag matching the short-term interaction permission is configured for the communication data.
[0014] Optionally, in another embodiment based on the method described above in this application, sending the communication data to the receiving object includes:
[0015] If the receiving object is detected to be the local system, a system interface matching the local system is selected;
[0016] Configure the interface information, input parameter information, output parameter information, and return code information corresponding to the system interface;
[0017] The communication data is sent to the receiving object through the system interface configured with the interface information.
[0018] Optionally, in another embodiment based on the method described above in this application, before selecting a system interface that matches the local system, the method further includes:
[0019] Configure the forwarding test case code corresponding to the system interface;
[0020] Add the forwarding use case code to the interface document corresponding to the system interface, wherein the forwarding use case code is used to define forwarding rules for the system interface.
[0021] Optionally, in another embodiment based on the method described above in this application, after obtaining the data to be processed from the sending object, the process includes:
[0022] Add the access address corresponding to the receiving object to the parameter field of the data to be processed; and / or add the access time period corresponding to the receiving object; and / or add the character parameter description corresponding to the receiving object.
[0023] Optionally, in another embodiment based on the method described above in this application, before sending the data to be processed to the message encoder, the following steps are included:
[0024] Activate the first message encoder pre-deployed in the operating system, wherein the first message encoder is a message encoder specifically designed to handle the communication requirements in the Flutter system or the local system; or,
[0025] The second message encoder, which is pre-deployed in the smart terminal, is activated. The second message encoder is the message encoder in the smart terminal that uniformly processes message encoding functions.
[0026] Optionally, in another embodiment based on the method described above in this application, the local system is at least one of an Android system and an iOS system.
[0027] According to another aspect of the embodiments of this application, a communication device for a Flutter system is provided, applied in a smart terminal where a Flutter system and a local system are deployed, the device comprising:
[0028] The detection module is configured to obtain the pending data of the sending object when a communication requirement is detected between the Flutter system and the local system, wherein the sending object is one of the Flutter system and the local system;
[0029] The acquisition module is configured to send the data to be processed to the message encoder and acquire the communication type corresponding to the communication requirement, wherein the communication type includes at least one of parameter communication type, event communication type and character communication type;
[0030] The processing module is configured to select a conversion rule that matches the communication type, and convert the data to be processed into communication data in the binary format based on the message encoder and the conversion rule;
[0031] The sending module is configured to send the communication data to a receiving object, which is another entity in the Flutter system and the local system.
[0032] According to another aspect of the embodiments of this application, an electronic device is provided, comprising:
[0033] Memory, used to store executable instructions; and
[0034] A display for communicating with the memory to execute the executable instructions to perform any of the above-described communication methods of the Flutter system.
[0035] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided for storing computer-readable instructions, which, when executed, perform the operation of any of the communication methods of the Flutter system described above.
[0036] In this application, when a communication requirement is detected between the Flutter system and the local system, the pending data of the sending object (either the Flutter system or the local system) is obtained. The pending data is then sent to a message encoder to obtain the communication type corresponding to the communication requirement. A conversion rule matching the communication type is selected, and based on the message encoder and the conversion rule, the pending data is converted into binary communication data. Finally, the communication data is sent to the receiving object (the other of the Flutter system and the local system). By applying the technical solution of this application, a technical solution can be achieved that, when a communication requirement is detected between the Flutter system and the local system, the sending data from the sending system is converted into binary data that both systems can understand based on its communication type before being sent to the receiving system. This avoids the problem of low efficiency in data communication caused by different data types supported by the two systems in related technologies. Furthermore, the message encoder can be used to monitor the legality of the data transmitted between the two systems.
[0037] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0038] The accompanying drawings, which form part of this specification, illustrate embodiments of this application and, together with the description, serve to explain the principles of this application.
[0039] This application can be more clearly understood with reference to the accompanying drawings and the following detailed description, wherein:
[0040] Figure 1 This illustration shows a schematic diagram of a communication method for a Flutter system according to an embodiment of this application;
[0041] Figure 2 A flowchart illustrating a communication method for a Flutter system according to an embodiment of this application is shown.
[0042] Figure 3 This invention provides a schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0043] Figure 4 This illustration shows a schematic diagram of the structure of an electronic device according to an embodiment of this application;
[0044] Figure 5 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation
[0045] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0046] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0047] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this application or its application or use.
[0048] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0049] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0050] Furthermore, the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.
[0051] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0052] The following is combined Figures 1-2 This application describes a communication method for a Flutter system according to exemplary embodiments thereof. It should be noted that the following application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.
[0053] This application also proposes a communication method, device, electronic device, and medium for the Flutter system.
[0054] Figure 1 A schematic flowchart illustrating a communication method for a Flutter system according to an embodiment of this application is shown. Figure 1 As shown, this method is applied to smart terminals that have deployed both the Flutter system and a local system, including:
[0055] S101, when a communication requirement is detected between the Flutter system and the local system, the pending data of the sending object is obtained, wherein the sending object is one of the Flutter system and the local system.
[0056] S102, send the data to be processed to the message encoder and obtain the communication type corresponding to the communication requirement. The communication type includes at least one of parameter communication type, event communication type and character communication type.
[0057] S103, Select a conversion rule that matches the communication type, and based on the message encoder and the conversion rule, convert the data to be processed into communication data in binary format.
[0058] S104 sends communication data to the receiving object, which is another entity in the Flutter system and the local system.
[0059] With the rapid development of smart terminal processing technology, various internet-based system business platforms are increasingly being deployed in user service business processes. These include systems such as Flutter, Android, and iOS.
[0060] In related technologies, Flutter is a scalable, layered system that can be divided into three layers: the upper-layer framework, the middle-layer engine, and the lower-layer embedding layer. Dart is a structured web (World Wide Web) programming language that can provide high performance in almost all browsers and environments.
[0061] Furthermore, Flutter is an open-source user interface (UI) toolkit from Google that helps developers efficiently build beautiful multi-platform applications with a single codebase, supporting mobile, web, desktop, and embedded systems.
[0062] In the business processes related to these technologies, developers use the Flutter system to implement multiple functions on local systems, including Android and iOS. Understandably, to achieve these functions, Flutter typically requires data communication with the local system to enable smart terminals to utilize Flutter for these functionalities.
[0063] Currently, some systems provide methods for communicating with the application's local system. Specifically, these methods invoke functions of the application within the local system to implement the corresponding plugin functionality. However, in the Flutter system, each time a method for communicating with the local system is used to implement a response, manual registration of the corresponding interfaces and plugins within the application's local system is required. For example, in the current Flutter environment, although the Flutter system provides methods for communicating with the iOS platform, it is complex to use, requiring registration each time before interaction can occur. This leads to cumbersome operations and low business processing efficiency.
[0064] Furthermore, in response to the aforementioned problems, this application proposes a communication method for the Flutter system. The idea is to implement a technical solution that, when a communication requirement is detected between the Flutter system and the local system, converts the data sent by the sending system into binary data that both systems can understand before sending it to the receiving system.
[0065] Furthermore, this application combines Figure 2 The specific steps of the plan are explained below:
[0066] Step 1: When a communication requirement is detected between the Flutter system and the local system, obtain the data to be processed from the sending object.
[0067] The sending object can be either the Flutter system or the local system. Understandably, if the Flutter system is the sending object, then the local system is the receiving object, and vice versa.
[0068] As an example, the local system is at least one of Android and iOS systems.
[0069] In one approach, the data to be processed can be of various data types, such as various fields, strings, images, audio and video data, etc.
[0070] Step 2: Add the access address corresponding to the receiving object to the parameter field of the data to be processed; and / or add the access time period corresponding to the receiving object; and / or add the character parameter description corresponding to the receiving object.
[0071] In one approach, to facilitate understanding by the message encoder or smart terminal, embodiments of this application may also add relevant information to the parameter fields of the data to be processed to help the message encoder successfully send the communication data.
[0072] For example, the access address can help the message encoder or smart terminal understand the communication address of the receiving object. The access time period can help the message encoder or smart terminal understand the receiving time period of the receiving object. Character parameter descriptions can help the message encoder understand the supported data protocols of the receiving object, and so on.
[0073] Optionally, embodiments of this application may also add parameters such as whether the data to be processed is required, whether it is to be displayed externally, whether it is non-empty, and whether it is non-negative to the parameter fields. Furthermore, based on preset specified information, it may be selected whether to encrypt or compress the data to be processed.
[0074] Step 3: Send the data to be processed to the message encoder to obtain the communication type corresponding to the communication requirements.
[0075] The communication type includes at least one of parameter communication type, event communication type, and character communication type.
[0076] In one embodiment of this application, the message encoder may first perform a validity check on the data to be processed. Only if the content is determined to be valid will the communication type corresponding to the communication requirement be obtained.
[0077] In one approach, the message encoder can be either a first message encoder or a second message encoder. As an example, the first message encoder is a message encoder pre-deployed in the Flutter system or a local system, specifically designed to handle communication needs.
[0078] In another example, the second message encoder is a message encoder that is pre-deployed in a storage area within the smart terminal and uniformly handles message encoding functions. That is, this second message encoder can also handle message encoding for other functions in both systems.
[0079] Step 4: Select a conversion rule that matches the communication type, and based on the message encoder and the conversion rule, convert the data to be processed into communication data in binary format.
[0080] It is understandable that different communication needs require different communication logic. Therefore, in this embodiment, multiple conversion rules exist at the message encoder. Each conversion rule corresponds to a different communication type.
[0081] For example, when there is a communication requirement between the Flutter system and the local system that involves parameter communication (such as parameters being method calls), a conversion rule A that matches the parameter communication type can be selected to convert the data to be processed into binary format communication data.
[0082] Furthermore, when there is a communication requirement between the Flutter system and the local system for event-based communication (e.g., events can be changes in device battery level, network connection, gyroscope, sensors, etc.), a conversion rule B that matches the event communication type can be selected to convert the data to be processed into binary format communication data.
[0083] Additionally, when there is a communication requirement between the Flutter system and the local system that involves character-based communication (e.g., characters can be fields of various formats, strings, and semi-structured information), a conversion rule C that matches the character communication type can be selected to convert the data to be processed into binary format communication data.
[0084] Step 5: Detect the first communication permission corresponding to the sending object, and detect the second communication permission corresponding to the receiving object.
[0085] In one approach, the communication permissions for both the sending and receiving objects are pre-configured by the business personnel. For example, this can be determined based on the business processing rules, processing volume, number of processing objects, and status of the sending and / or receiving objects.
[0086] Step 6: When it is determined that the first communication permission and the second communication permission are short-term interaction permissions, a timed clearing flag is configured for the communication data that matches the short-term interaction permission.
[0087] In one approach, if this embodiment determines that the sending and receiving objects have short-term interaction permissions, the data communication between the two systems is also considered restricted data communication. Therefore, to avoid unnecessary waste of transmission resources caused by smart terminals transmitting expired data, this embodiment can configure a lifespan limit for the communication data. Understandably, if the lifespan limit is exceeded, the communication data can be cleared.
[0088] In one approach, the lifetime of the communication data can be determined based on factors such as the type of communication or the size of the data. For example, a larger data volume or a more complex communication type in a given event will result in a longer lifetime, and vice versa.
[0089] Step 7: If the receiving object is detected to be a local system, select the system interface that matches the local system.
[0090] Step 8: Configure the interface information, input parameter information, output parameter information, and return code information corresponding to the system interface, and send the communication data to the receiving object through the system interface with the configured interface information.
[0091] Furthermore, since a smart terminal may include multiple system interfaces for different types of data communication, it is understandable that, to ensure successful subsequent data communication, this embodiment of the application needs to select a system interface that matches the local system from among the multiple system interfaces. For example, if the local system is an Android system, then the Android system interface can be selected for data transmission. And if the local system is an iOS system, then the iOS system interface can be selected for data transmission.
[0092] The process of configuring system interfaces can include configuring interface information, input parameter information, output parameter information, and return code information, etc.
[0093] The interface information includes: interface name and interface program description;
[0094] Input parameter information includes: input parameter description, input parameter format template string, and input parameter format definition string;
[0095] Output parameter information includes: output parameter description and output parameter string;
[0096] The return code information includes: return code description and return code string.
[0097] In one approach, embodiments of this application may pre-define a corresponding format string (optionalStr) in each field of the input, output, and return code parameters corresponding to the system interface. Additionally, they may add the type (string or integer, etc.) with the corresponding format.
[0098] Furthermore, embodiments of this application can also configure forwarding test case code corresponding to the system interface and add the forwarding test case code to the interface document corresponding to the system interface.
[0099] The forwarding test case code is used to test the system interface.
[0100] In one approach, embodiments of this application can formulate at least one forwarding rule for the system interface and deploy corresponding forwarding use case code by configuring the system interface to achieve forwarding of the system interface.
[0101] In one embodiment of this application, after the interface documentation for the system interface is generated, a corresponding parameter mapping script for performing data communication can be generated. In another embodiment, after establishing the mapping relationship between the system interface and the parameter mapping script, the mapping relationship is stored in an interface list. This allows the corresponding script to be retrieved subsequently by querying the interface list, thereby enabling the transmission of the interface documentation.
[0102] In one embodiment of this application, adjustments can be made online for special requirements and a specified test environment database can be configured for convenient interface calls. The interface script will be synchronized to the corresponding script management project SVN address. Alternatively, manually modified scripts in SVN can be actively synchronized to the management system for script replacement.
[0103] In this application, when a communication requirement is detected between the Flutter system and the local system, the pending data of the sending object can be obtained, wherein the sending object is one of the Flutter system and the local system; the pending data is sent to the message encoder, and the communication type corresponding to the communication requirement is obtained; a conversion rule matching the communication type is selected, and based on the message encoder and the conversion rule, the pending data is converted into binary format communication data; the communication data is sent to the receiving object, wherein the receiving object is the other of the Flutter system and the local system.
[0104] By applying the technical solution of this application, a method can be implemented whereby, when a communication requirement is detected between the Flutter system and the local system, the data sent by the sending system is converted into binary data that both systems can understand based on its communication type before being sent to the receiving system. This avoids the problem of low efficiency in data communication caused by different data types supported by the two systems in related technologies. Furthermore, a message encoder can be used to monitor the validity of the transmitted data.
[0105] Optionally, in another embodiment based on the method described above in this application, after converting the data to be processed into the communication data in the binary format, the method further includes:
[0106] Detect the first communication permission corresponding to the sending object, and detect the second communication permission corresponding to the receiving object;
[0107] When it is determined that the first communication permission and the second communication permission are short-term interaction permissions, a timed clearing flag matching the short-term interaction permission is configured for the communication data.
[0108] Optionally, in another embodiment based on the method described above in this application, sending the communication data to the receiving object includes:
[0109] If the receiving object is detected to be the local system, a system interface matching the local system is selected;
[0110] Configure the interface information, input parameter information, output parameter information, and return code information corresponding to the system interface;
[0111] The communication data is sent to the receiving object through the system interface configured with the interface information.
[0112] Optionally, in another embodiment based on the method described above in this application, before selecting a system interface that matches the local system, the method further includes:
[0113] Configure the forwarding test case code corresponding to the system interface;
[0114] Add the forwarding use case code to the interface document corresponding to the system interface, wherein the forwarding use case code is used to define forwarding rules for the system interface.
[0115] Optionally, in another embodiment based on the method described above in this application, after obtaining the data to be processed from the sending object, the process includes:
[0116] Add the access address corresponding to the receiving object to the parameter field of the data to be processed; and / or add the access time period corresponding to the receiving object; and / or add the character parameter description corresponding to the receiving object.
[0117] Optionally, in another embodiment based on the method described above in this application, before sending the data to be processed to the message encoder, the following steps are included:
[0118] Activate the first message encoder pre-deployed in the operating system, wherein the first message encoder is a message encoder specifically designed to handle the communication requirements in the Flutter system or the local system; or,
[0119] The second message encoder, which is pre-deployed in the smart terminal, is activated. The second message encoder is the message encoder in the smart terminal that uniformly processes message encoding functions.
[0120] Optionally, in another embodiment based on the method described above in this application, the local system is at least one of an Android system and an iOS system.
[0121] In one approach, the message encoder can be b.Codec. Understandably, the technical solution proposed in this application simplifies the problem of incompatible channel names and data types defined across multiple platforms during communication between the native and Flutter systems. It also avoids the need to match the required message name and data type between the native and Flutter ends, supports nested classes, converts messages to APIs, generates asynchronous wrapper code, and sends messages. The generated code is readable and does not conflict across different versions of multiple clients. Furthermore, it unifies the routing logic across different platforms of the app through a pre-agreed scheme protocol.
[0122] By applying the technical solution of this application, a method can be implemented whereby, when a communication requirement is detected between the Flutter system and the local system, the data sent by the sending system is converted into binary data that both systems can understand based on its communication type before being sent to the receiving system. This avoids the problem of low efficiency in data communication caused by different data types supported by the two systems in related technologies. Furthermore, a message encoder can be used to monitor the validity of the transmitted data.
[0123] Optionally, in another embodiment of this application, such as Figure 3 As shown, this application also provides a communication device for the Flutter system. Applied to a smart terminal deploying both the Flutter system and a local system, the device includes:
[0124] The detection module 201 is configured to obtain the data to be processed of the sending object when a communication requirement is detected between the Flutter system and the local system, wherein the sending object is one of the Flutter system and the local system;
[0125] The acquisition module 202 is configured to send the data to be processed to the message encoder and acquire the communication type corresponding to the communication requirement. The communication type includes at least one of parameter communication type, event communication type and character communication type.
[0126] The processing module 203 is configured to select a conversion rule that matches the communication type, and convert the data to be processed into communication data in the binary format based on the message encoder and the conversion rule;
[0127] The sending module 204 is configured to send the communication data to a receiving object, which is another one between the Flutter system and the local system.
[0128] By applying the technical solution of this application, a method can be implemented whereby, when a communication requirement is detected between the Flutter system and the local system, the data sent by the sending system is converted into binary data that both systems can understand based on its communication type before being sent to the receiving system. This avoids the problem of low efficiency in data communication caused by different data types supported by the two systems in related technologies. Furthermore, a message encoder can be used to monitor the validity of the transmitted data.
[0129] In another embodiment of this application, the steps configured to be executed by the acquisition module 202 include:
[0130] Detect the first communication permission corresponding to the sending object, and detect the second communication permission corresponding to the receiving object;
[0131] When it is determined that the first communication permission and the second communication permission are short-term interaction permissions, a timed clearing flag matching the short-term interaction permission is configured for the communication data.
[0132] In another embodiment of this application, the steps configured to be executed by the acquisition module 202 include:
[0133] If the receiving object is detected to be the local system, a system interface matching the local system is selected;
[0134] Configure the interface information, input parameter information, output parameter information, and return code information corresponding to the system interface;
[0135] The communication data is sent to the receiving object through the system interface configured with the interface information.
[0136] In another embodiment of this application, the steps configured to be executed by the acquisition module 202 include:
[0137] Configure the forwarding test case code corresponding to the system interface;
[0138] Add the forwarding use case code to the interface document corresponding to the system interface, wherein the forwarding use case code is used to define forwarding rules for the system interface.
[0139] In another embodiment of this application, the steps configured to be executed by the acquisition module 202 include:
[0140] Add the access address corresponding to the receiving object to the parameter field of the data to be processed; and / or add the access time period corresponding to the receiving object; and / or add the character parameter description corresponding to the receiving object.
[0141] In another embodiment of this application, the steps configured to be executed by the acquisition module 202 include:
[0142] Activate the first message encoder pre-deployed in the operating system, wherein the first message encoder is a message encoder specifically designed to handle the communication requirements in the Flutter system or the local system; or,
[0143] The second message encoder, which is pre-deployed in the smart terminal, is activated. The second message encoder is the message encoder in the smart terminal that uniformly processes message encoding functions.
[0144] This application also provides an electronic device for executing the communication method of the Flutter system described above. Please refer to... Figure 4 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 4 As shown, the electronic device 3 includes: a processor 300, a memory 301, a bus 302, and a communication interface 303. The processor 300, the communication interface 303, and the memory 301 are connected through the bus 302. The memory 301 stores a computer program that can run on the processor 300. When the processor 300 runs the computer program, it executes the communication method of the Flutter system provided in any of the foregoing embodiments of this application.
[0145] The memory 301 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 303 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.
[0146] Bus 302 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 301 is used to store programs. After receiving an execution instruction, the processor 300 executes the program. The data recognition method disclosed in any of the foregoing embodiments of this application can be applied to the processor 300, or implemented by the processor 300.
[0147] The processor 300 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 300 or by instructions in software form. The processor 300 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 301. The processor 300 reads the information in memory 301 and, in conjunction with its hardware, completes the steps of the above method.
[0148] The electronic device provided in this application embodiment and the data identification method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0149] This application also provides a computer-readable storage medium corresponding to the communication method of the Flutter system provided in the foregoing embodiments. Please refer to... Figure 5 The computer-readable storage medium shown is an optical disc 40, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the communication method of the Flutter system provided in any of the foregoing embodiments.
[0150] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), 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 optical and magnetic storage media, which will not be elaborated here.
[0151] The computer-readable storage medium provided in the above embodiments of this application and the data identification method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.
[0152] It should be noted that:
[0153] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0154] Similarly, it should be understood that, for the sake of brevity and to aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting a schematic diagram in which the claimed application requires more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.
[0155] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0156] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A communication method of a Flutter system, characterized by, The method is applied to an intelligent terminal in which a Flutter system and a local system are deployed, and the method comprises the following steps: When it is detected that there is a communication requirement between the Flutter system and the local system, obtaining to-be-processed data of a sending object, wherein the sending object is one of the Flutter system and the local system; sending the to-be-processed data to a message encoder and obtaining a communication type corresponding to the communication requirement, wherein the communication type comprises at least one of a parameter communication type, an event communication type and a character communication type; selecting a conversion rule matched with the communication type, and converting the to-be-processed data into communication data in the binary format based on the message encoder and the conversion rule; sending the communication data to a receiving object, wherein the receiving object is the other one of the Flutter system and the local system except the sending object; before the step of sending the to-be-processed data to the message encoder, comprising the following steps: starting a first message encoder pre-deployed in an operating system, wherein the first message encoder is a message encoder specially processing the communication requirement in the Flutter system or the local system; or starting a second message encoder pre-deployed in the intelligent terminal, wherein the second message encoder is a message encoder uniformly processing a message encoding function in the intelligent terminal; communication permissions of the sending object and the receiving object are pre-configured according to at least one of a business processing rule, a business processing amount, a business processing object quantity and a state of the sending object and / or the receiving object; the method further comprises configuring a survival time limit of the communication data according to a data amount of a communication event or whether a communication type is complex; an access address is used to help the message encoder or the intelligent terminal understand a communication address of the receiving object, an access time period is used to help the message encoder or the intelligent terminal understand a receivable time period of the receiving object, and a character parameter description is used to help the message encoder understand a supportable data protocol of the receiving object; the method further comprises the following steps: generating a parameter mapping script used for executing data communication after an interface document of a system interface is generated; and storing a mapping relationship between the system interface and the parameter mapping script into an interface list after the mapping relationship is established.
2. The method of claim 1, wherein, after the step of converting the to-be-processed data into the communication data in the binary format, further comprising the following steps: detecting a first communication permission of the sending object and a second communication permission of the receiving object; when it is determined that the first communication permission and the second communication permission are short-time interaction permissions, configuring a timing clearing identifier matched with the short-time interaction permissions for the communication data.
3. The method of claim 1, wherein, the step of sending the communication data to the receiving object comprises the following steps: if it is detected that the receiving object is the local system, selecting a system interface matched with the local system; configuring interface information, input parameter information, output parameter information and return code information corresponding to the system interface; sending the communication data to the receiving object through the system interface of the configured interface information.
4. The method of claim 3, wherein, Before the selecting the system interface matched with the local system, further comprising: configuring the forwarding use case code corresponding to the system interface; adding the forwarding use case code in the interface document corresponding to the system interface, wherein the forwarding use case code is used to formulate forwarding rules for the system interface.
5. The method of claim 1, wherein, After the obtaining the to-be-processed data of the sending object, comprising: adding the access address corresponding to the receiving object on the parameter field of the to-be-processed data; and / or, adding the access time period corresponding to the receiving object; and / or, adding the character parameter description corresponding to the receiving object.
6. The method according to any one of claims 1 to 5, wherein, The local system is at least one of an Android system and an IOS system.
7. A communication device of a Flutter system, characterized in that Applied to an intelligent terminal deployed with a Flutter system and a local system, the device comprises: a detection module configured to obtain to-be-processed data of a sending object when detecting that there is a communication demand between the Flutter system and the local system, wherein the sending object is one of the Flutter system and the local system; an obtaining module configured to send the to-be-processed data to a message encoder and obtain a communication type corresponding to the communication demand, the communication type comprising at least one of a parameter communication type, an event communication type, and a character communication type; a processing module configured to select a conversion rule matched with the communication type, and convert the to-be-processed data into communication data in the binary format based on the message encoder and the conversion rule; a sending module configured to send the communication data to a receiving object, the receiving object being the other of the Flutter system and the local system; the obtaining module starts a second message encoder pre-deployed in the intelligent terminal, the second message encoder being a message encoder in the intelligent terminal that uniformly processes message encoding functions, and the steps configured to be executed comprise: starting a first message encoder pre-deployed in an operating system, the first message encoder being a message encoder in the Flutter system or the local system that specially processes the communication demand; or, starting a second message encoder pre-deployed in the intelligent terminal, the second message encoder being a message encoder in the intelligent terminal that uniformly processes message encoding functions The communication permissions of the sending object and the receiving object are pre-configured according to at least one of the business processing rules, the business processing amount, the number of business processing objects, and the state of the sending object and / or the receiving object; The device is further configured to configure the survival time limit of the communication data according to the data amount of the communication event or whether the communication type is complex; The access address is used to help the message encoder or the intelligent terminal understand the communication address of the receiving object, the access time period is used to help the message encoder or the intelligent terminal understand the receivable time period of the receiving object, and the character parameter description is used to help the message encoder understand the supportable data protocol of the receiving object; The device is further configured to: After the interface document of the system interface is generated, a corresponding parameter mapping script used for performing data communication is generated; after a mapping relationship between the system interface and the parameter mapping script is established, the mapping relationship is stored into an interface list.
8. An electronic device, comprising: Comprise: a memory for storing executable instructions; and, a processor for executing the executable instructions to complete the operation of the communication method of the Flutter system in any one of claims 1-6.
9. A computer readable storage medium for storing computer readable instructions, characterized in that, The instructions are executed by the processor to perform the operation of the communication method of the Flutter system in any one of claims 1-6.
Citation Information
Patent Citations
Flutter-based page generation method and device, equipment and storage medium
CN113342447A