Cross-platform application development method, device and storage medium

By designing the application's operating environment, graphics and communication methods, compiling it into a multi-channel assembly instruction set and performing hardware simulation, the problem of low multi-channel development efficiency for the same application is solved, and rapid cross-platform development and packaging are achieved.

CN112732245BActive Publication Date: 2025-08-19SUZHOU ZHONGYUE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110033085.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-11
Publication Date
2025-08-19
Estimated Expiration
2041-01-11

AI Technical Summary

Technical Problem

In the prior art, the same application needs to be developed separately for different channels, resulting in the problems of low development efficiency and long development cycle.

Method used

By designing the operating environment, application graphics and communication methods of the applications to be developed, it compiles into the assembly instruction set corresponding to each operation environment, and performs thread classification, calls the virtual machine for hardware simulation, generates simulated hardware instruction sets, and finally packages into a multi-channel application package.

Benefits of technology

It realizes the development of multi-channel application packages for the same application at one time, improves development efficiency, reduces the investment of design and developers, improves design efficiency and realizes rapid packaging and production across platforms and devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112732245B_ABST
    Figure CN112732245B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and storage medium for developing a cross-platform application, and belongs to the field of computer technology. The method comprises: designing at least one operating environment, application graphics and communication method corresponding to the application to be developed; compiling the design information corresponding to the application to be developed into an assembly instruction set corresponding to each operating environment, and classifying the threads of the application to be developed; performing data communication according to the communication method based on the assembly instruction set to obtain data flow information; calling the virtual machine corresponding to each operating environment to perform hardware simulation on the assembly instruction set, classified threads and data flow information to obtain a simulated hardware instruction set; packaging the simulated hardware instruction set and the assembly instruction set to obtain an application package corresponding to each product device in each operating environment; the problem that the same application needs to be developed separately for different channels, resulting in low development efficiency, can be solved; application packages for multiple channels can be obtained at one time, thereby improving the development efficiency of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field

[0001] The present application relates to a cross-platform application development method, device and storage medium, and belongs to the field of computer technology. [Background Technology]

[0002] The design of Internet applications can be carried out through visual prototyping and interaction design of product interfaces.

[0003] The traditional application development process is as follows: after the design is completed, it is annotated with Hyper Text Markup Language (HTML) and exported in Joint Photographic Experts Group (JPEG format) cutouts and sent to the User Interface (UI) front-end development engineer. The front-end engineer develops multi-channel UIs for different channels and different device types based on the design interaction style and cutouts. At the same time, all channels need to communicate with the application service through the interface service. After the development is completed, the final test phase begins, and the test engineer needs to run the program or software of the corresponding channel on the corresponding device for testing. All problems encountered during the period are submitted to the corresponding channel developer on a channel-by-channel basis for modification, adjustment, and re-release.

[0004] From design to development and implementation, different personnel are needed to handle corresponding tasks. Typically, the same application needs to be adapted for different channels (such as the operating environment and physical screen), necessitating multiple product application designs. Furthermore, the same application requires UI development engineers from multiple channels. Developers from different channels use different development languages and architectures, leading to lower application development efficiency and longer development cycles during product updates, optimizations, and personnel adjustments. [Summary of the invention]

[0005] This application provides a cross-platform application development method, device, and storage medium, which can solve the problem that the same application needs to be developed separately for different channels, resulting in low development efficiency. This application provides the following technical solutions:

[0006] In a first aspect, a method for developing a cross-platform application is provided, the method comprising:

[0007] Displaying an operating environment selection page, and receiving at least one operating environment corresponding to the application to be developed through the operating environment selection page;

[0008] Obtaining an application graphic corresponding to the application to be developed through a visual design method;

[0009] Setting a communication mode of the application to be developed based on the application graph;

[0010] Compiling design information corresponding to the application to be developed into an assembly instruction set corresponding to each operating environment, and classifying threads of the application to be developed according to the design information during the compilation process; the design information includes application information corresponding to the application graph and communication information corresponding to the communication method;

[0011] For each operating environment, performing data communication according to the communication method based on the assembly instruction set corresponding to the operating environment to obtain data flow information;

[0012] Calling a virtual machine corresponding to the operating environment to perform hardware simulation on the assembly instruction set, the classification thread, and the data flow information to obtain a simulated hardware instruction set; the simulated hardware instruction set is adapted to a product device that supports running the application to be developed;

[0013] The simulated hardware instruction set and the assembly instruction set corresponding to each operating environment are packaged to obtain an application package corresponding to each product device in each operating environment.

[0014] Optionally, for each operating environment, performing data communication in accordance with the communication mode based on the assembly instruction set corresponding to the operating environment to obtain data flow information includes:

[0015] Obtaining global configuration information in the assembly instruction set;

[0016] According to the global configuration information, data communication is performed in accordance with the communication mode to obtain the data flow information.

[0017] Optionally, the global configuration information indicates a mock debugging mode, and performing data communication according to the communication mode based on the global configuration information to obtain the data flow information includes:

[0018] Get the preset simulation request;

[0019] Sending the simulated request to a preset virtual object through mock debugging, wherein the virtual object has predefined response data;

[0020] Receive response data returned by the virtual object when receiving the simulation request, and obtain the data flow information.

[0021] Optionally, the global configuration information indicates a protocol communication mode, and performing data communication according to the communication mode based on the global configuration information to obtain the data flow information includes:

[0022] Get target data;

[0023] Assembling the target data according to the communication method to obtain data to be sent;

[0024] Sending the data to be sent to a preset interface service, wherein the preset interface service is pre-configured with receiving response data;

[0025] The receiving response data returned by the preset interface service is received to obtain the data stream information.

[0026] Optionally, setting the communication mode of the application to be developed based on the application graph includes:

[0027] receiving a communication mode setting operation for a target application element in the application graphic; the application graphic includes a plurality of application elements, and the application graphic is displayed through an application design interface;

[0028] Displaying a communication mode setting window based on the communication mode setting operation;

[0029] The communication mode setting information of the target application element is received through the communication mode setting window to obtain the communication mode of the target application element.

[0030] Optionally, the communication mode setting operation includes a protocol setting operation and a message body setting operation, and the displaying of the communication mode setting window based on the communication mode setting operation includes:

[0031] Displaying a communication protocol selection window based on the protocol setting operation, wherein the communication mode setting window includes the communication protocol selection window;

[0032] A message body selection window is displayed based on the message body setting operation, and the communication mode setting window includes the message body selection window.

[0033] Optionally, the calling of the virtual machine corresponding to the operating environment to perform hardware simulation on the assembly instruction set, the classification thread, and the data flow information to obtain a simulated hardware instruction set package includes:

[0034] Running the assembly instruction set, the classification thread, and the data flow information through the virtual machine to simulate the operating instructions and parameters of each hardware device to obtain an initial simulated hardware instruction set;

[0035] running the initial simulated hardware instruction set;

[0036] Call the page display component to render and display page elements;

[0037] Obtain the simulated hardware instruction set adapted to each product device respectively;

[0038] The simulated hardware instruction set and the assembly instruction set are packaged to obtain an application package corresponding to each product device in each operating environment.

[0039] Optionally, the at least one operating environment includes at least one of the following: Windows environment, MacOS environment, iOS environment, Linux environment and Android environment.

[0040] In a second aspect, a cross-platform application development device is provided, the device comprising a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the cross-platform application development method provided in the first aspect.

[0041] In a third aspect, a computer-readable storage medium is provided, wherein a program is stored in the storage medium, and when the program is executed by a processor, it is used to implement the cross-platform application development method provided in the first aspect.

[0042] The beneficial effects of the present application include at least: by designing at least one operating environment, application graphics and communication method corresponding to the application to be developed; compiling the design information corresponding to the application to be developed into an assembly instruction set corresponding to each operating environment, and classifying the threads of the application to be developed; performing data communication according to the communication method based on the assembly instruction set to obtain data flow information; calling the virtual machine corresponding to each operating environment to perform hardware simulation on the assembly instruction set, classified threads and data flow information to obtain a simulated hardware instruction set; packaging the simulated hardware instruction set and the assembly instruction set to obtain an application package corresponding to each product device in each operating environment; it can solve the problem that the same application needs to be developed separately for different channels, resulting in low development efficiency; it can obtain application packages for multiple channels at one time, thereby improving the development efficiency of the application.

[0043] In addition, the product's operational process and status can be viewed through the interactive interface during the design process. This can reduce the input of designers, interaction engineers, and front-end developers, significantly improve design efficiency, and quickly package and put into production. Without building code, graphical design can achieve cross-platform and cross-device development and application with a single set of design drawings.

[0044] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and to implement it in accordance with the contents of the specification, the following is a detailed description of the preferred embodiments of the present application in conjunction with the accompanying drawings.

Brief Description of the Drawings

[0045] Figure 1 This is a schematic diagram of the overall architecture of a development program for executing a cross-platform application development method provided by one embodiment of the present application;

[0046] Figure 2 This is a flowchart of a method for developing a cross-platform application provided by an embodiment of the present application;

[0047] Figure 3 This is a schematic diagram of a data stream generation process provided by an embodiment of the present application;

[0048] Figure 4 This is a block diagram of a cross-platform application development device provided by an embodiment of the present application. [Specific implementation method]

[0049] The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0050] First, several terms involved in this application are introduced.

[0051] Program: It is a description of instructions, data and their organizational form. Process is the entity of the program.

[0052] Process: It is a running activity of a program in a computer on a certain data set. It is the basic unit for resource allocation and scheduling of the system and the foundation of the operating system structure.

[0053] A thread is the smallest unit of computation that an operating system can schedule. It is contained within a process and is the actual unit of operation within that process. A thread is a single, sequential flow of control within a process. A process can have multiple threads running concurrently, each executing different tasks in parallel.

[0054] Compilation (compilation, compile): The process of using a compiler to generate a target program from a source program written in a source language.

[0055] The Representational State Transfer (RESTful) protocol is a design style and development approach for network applications. RESTful is based on the Hypertext Transfer Protocol (HTTP) and can be defined in either XML or JSON. RESTful allows third-party OTT services to call mobile network resources, with actions such as adding, modifying, and deleting the called resources.

[0056] gRPC is a remote procedure call (RPC) communication framework based on HTTP / 2 and using Protobuf for communication. Protobuf is a platform-independent, language-independent, extensible, lightweight, and efficient protocol for serializing data structures, which can be used for network communication and data storage. gRPC specifies a method with parameters and return types that can be called remotely. On the server side, the service implements this interface and runs the gRPC service to handle client calls. On the client side, a stub code exists that provides the same method as the server.

[0057] Optionally, this application uses the cross-platform application development method provided in each embodiment for example to illustrate the application in a preset development program. Figure 1 The overall architecture diagram of the development program shown in the figure includes a framework structure module 110, an engine module 120 and an adaptation module 130.

[0058] The framework module 110 is a product design layer of the application, which includes a system design interface. In this application, the application to be developed is an Internet application, that is, an application that needs to communicate with a third-party service interface.

[0059] The system design interface includes all elements, routes, and states required for the design. After the elements are componentized, the assembly instruction set of audio, video, graphics, and behavior is obtained through translation, and the assembly instruction set is executed by the engine module 120.

[0060] The engine module 120 is the core technical module. It includes three submodules: virtual machine, graphics rendering, and system task scheduling. It processes the instruction set from the framework module 110 to complete the designed product's operation, service communication, and graphics output functions. Simultaneously, the engine module 120 sends all threads, rendering parameters, and instruction sets to the adapter module 130.

[0061] The adaptation module 130 receives the instruction set from the engine module 120, integrates the compilation requirements of different devices and platforms, loads the device boot driver, and packages and outputs the executable package, realizing cross-platform and cross-device application development without code and with a set of design drawings.

[0062] Specifically, the processes corresponding to each module refer to the following method embodiments.

[0063] It should be noted that: the development program provided in this embodiment only uses the division of the above-mentioned functional modules as an example to illustrate when developing cross-platform applications. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the development program is divided into different functional modules to complete all or part of the functions described above. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0064] The above-mentioned development program runs in an electronic device, which is a terminal or a server. The terminal can be a mobile phone, a computer, a tablet computer, a wearable device, etc. This embodiment does not limit the device type of the electronic device.

[0065] Device debugging is performed during the development process. Due to differences in hardware parameters and operating environments, the corresponding debugging methods vary.

[0066] In one scenario, debugging for Android devices supports both physical device debugging and Android virtual machine debugging. The development environment requires the Android Software Development Kit (SDK) to be installed in advance. The Android SDK allows you to connect to both the physical device and the Android virtual machine. Once the Android device is properly connected, you can simultaneously develop the application while compiling the installation package and installing it on the Android device for debugging.

[0067] In another scenario, debugging an iOS device and iOS simulator requires running the development program on macOS. Xcode development tools must be configured on macOS to properly connect the iOS device (e.g., a phone or tablet running iOS) to the platform's underlying systems. Finally, with the iOS device and iOS simulator properly connected, you can develop your application in the development program while simultaneously testing it on the iOS device by invoking Xcode compilation instructions.

[0068] In another scenario, for debugging in a desktop environment, such as devices running Windows, Mac, and Linux, the development program integrates a desktop instruction set and a simulation window. During the development process, only the simulation window needs to be opened for debugging; and the program can be directly run in the corresponding operating system by generating an executable file.

[0069] The following is an introduction to the cross-platform application development method provided by this application.

[0070] Figure 2 This is a flow chart of a cross-platform application development method provided by one embodiment of the present application. The method includes at least the following steps:

[0071] Step 201: display an operating environment selection page, and receive at least one operating environment corresponding to the application to be developed through the operating environment selection page.

[0072] After the electronic device runs the development program, it can display the runtime environment selection page. The runtime environment refers to the environment in which the semi-compiled runtime code runs on the target machine. The runtime environment is an operating mode between a compiler and an interpreter. Optionally, the at least one runtime environment includes at least one of the following: Windows, macOS, iOS, Linux, and Android. In other embodiments, the runtime environment may also include other runtime environments for running the application to be developed, which are not listed here in this embodiment.

[0073] The operating environment selection page provides a variety of operating environments for selection. By selecting on the operating environment selection page, the user can obtain one or more operating environments corresponding to the application to be developed.

[0074] Step 202: Obtain an application graphic corresponding to the application to be developed through a visual design method.

[0075] After selecting at least one operating environment, the development program displays an application design interface, in which an application graphic corresponding to the application to be developed is obtained through a visual design method.

[0076] The application design interface includes all the elements required for application design, including but not limited to: page elements, control elements, routing elements, etc. Users select each element through the application design interface, and the selected elements are displayed in the preset area of the application design interface to obtain the application graphics of the application to be developed.

[0077] For example, the application design interface includes a product toolbar and a preset area. The product toolbar provides tool boxes, forms, buttons, images, and video components. Users use the product toolbar to select the elements required for the program to be developed and continuously increase the content of the design prototype by adding pages. Connecting buttons or components to pages and elements using the connection tool creates interactive behaviors and action relationships. State attributes are selected for page elements, components, and connections to implement state changes caused by changes in product logic during the interaction process. Each of these operations is displayed in real time within the preset area, ultimately resulting in the application graphics for the application to be developed.

[0078] Step 203: Setting the communication mode of the application to be developed based on the application graph.

[0079] The target application element in the application graph can select the interface request and response type, such as RESTful or gRPC. The request body can also specify the request message format, such as XML or JSON. After field assembly, the interface is requested via data communication using the defined protocol, format, and target path. After receiving the response parameters from the interface, the response fields are extracted and assigned to page elements for state management.

[0080] In one example, setting a communication mode of an application to be developed based on an application graph includes: receiving a communication mode setting operation for a target application element in the application graph; displaying a communication mode setting window based on the communication mode setting operation; receiving communication mode setting information of the target application element through the communication mode setting window to obtain the communication mode of the target application element.

[0081] The application graphic includes multiple application elements, and the application graphic is displayed through the application design interface.

[0082] Optionally, the communication mode setting operation includes a protocol setting operation and a message body setting operation, and the communication mode setting window is displayed based on the communication mode setting operation, including: displaying a communication protocol selection window based on the protocol setting operation, and the communication mode setting window includes a communication protocol selection window; displaying a message body selection window based on the message body setting operation, and the communication mode setting window includes a message body selection window.

[0083] Illustratively, the communication protocols provided in the communication protocol selection window include, but are not limited to, TCP / IP, gRPC / RPC, RestFul, and / or GraphQL; the message format provided in the message body selection window includes, but is not limited to, Extensible Markup Language (XML), JavaScript Object Notation (JSON), and / or Remote Procedure Call (RPC) assembly instructions. In other embodiments, the communication protocols and message formats may also be other types, which are not listed here in this embodiment.

[0084] Step 204 , compile the design information corresponding to the application to be developed into an assembly instruction set corresponding to each operating environment, and classify the threads of the application to be developed according to the design information during the compilation process; the design information includes application information corresponding to the application graphics and communication information corresponding to the communication method.

[0085] In this application, the application to be developed is a multi-threaded application, and the thread classification includes but is not limited to: rendering thread, task scheduling thread, graphics rendering thread, and communication thread. In other embodiments, threads can also be divided into more or fewer categories, and this embodiment does not limit the thread classification method.

[0086] In this embodiment, during the compilation process, critical path information and data dependency model information of the application to be developed are obtained, and the critical path information and data dependency model information are used as inputs for thread partitioning to obtain thread partitioning results.

[0087] Optionally, the thread division result can be executed by a simulator and displayed visually, so that developers can monitor the structure and program characteristics of the application to be developed.

[0088] Optionally, after step 204 , the assembly instruction set may be encrypted according to the communication method, and the subsequently returned data may be decrypted.

[0089] Step 205 : For each operating environment, data communication is performed according to a communication method based on an assembly instruction set corresponding to the operating environment to obtain data flow information.

[0090] For each operating environment, data communication is performed according to a communication method based on the assembly instruction set corresponding to the operating environment to obtain data flow information, including: obtaining global configuration information in the assembly instruction set; and performing data communication according to the communication method based on the global configuration information to obtain data flow information.

[0091] Global configuration information indicates Mock debugging mode or protocol communication mode. Figure 3 When the global configuration information indicates the Mock debugging mode, data communication is performed according to the communication method based on the global configuration information to obtain data flow information, including: obtaining a preset simulation request; sending the simulation request to a preset virtual object through Mock debugging, in which response data is pre-defined; receiving the response data returned by the virtual object when receiving the simulation request, and obtaining data flow information.

[0092] In the early stages of designing an application to be developed, developers can use mock mode to simulate request and response data testing. Requests are sent to virtual object 402 via mock debugging 401. Virtual object 402 can define response data in the element interface communication settings in step 203, and the response data is returned to mock debugging 401. The data and the state after data conversion are entered into the virtual machine corresponding to each operating environment through assembly instructions.

[0093] Among them, Mock debugging is used to use mock data to simulate the backend interface (that is, the virtual object mentioned above) for interface testing.

[0094] refer to Figure 3When the global configuration information indicates the protocol communication mode, data communication is performed according to the communication mode according to the global configuration information to obtain data flow information, including: obtaining target data; assembling the target data according to the communication mode to obtain data to be sent; sending the data to be sent to the preset interface service, which is pre-configured with receiving response data; receiving the receiving response data returned by the preset interface service to obtain data flow information.

[0095] Among them, the preset interface service is an interface service provided by a third party. Figure 3 Four communication protocols are supported: 403.1 TCP / IP, 403.2 gRPC / RPC, 403.3 RestFul, and 403.4 GraphQL. Data is requested to 404 using the communication rules set in step 203. Configurable message bodies support XML, JSON, and RPC assembly instructions for message format assembly. In step 203, the message format is selected, and the message is requested and the response is received using the configuration method set in the variable. After 404, the data is sent to the 405 interface service. After 405, the data is returned to 403 via the response data. For data communication, the data and the converted state are entered into the virtual machine via assembly instructions.

[0096] Step 206 , calling the virtual machine corresponding to the operating environment to perform hardware simulation on the assembly instruction set, classification thread and data flow information to obtain a simulated hardware instruction set; the simulated hardware instruction set is adapted to the product device that supports running the application to be developed.

[0097] In this embodiment, different operating environments correspond to different virtual machines, and different product devices correspond to different virtual machines. Each operating environment can correspond to a different product device virtual machine. In other words, different virtual machines correspond to different channels.

[0098] In this embodiment, each virtual machine receives the data stream obtained in step 205, as well as the rendering thread, task scheduling thread, graphics rendering thread, and communication thread obtained in step 204, and simulates the operating instructions and parameters of each hardware device by using all threads and instruction sets, and then performs graphics rendering, and finally realizes cross-platform execution of instruction sets.

[0099] Specifically, the virtual machine corresponding to the operating environment is called to perform hardware simulation on the assembly instruction set, classification thread and data flow information to obtain a simulated hardware instruction set package, including: running the assembly instruction set, classification thread and data flow information through the virtual machine to simulate the operating instructions and parameters of each hardware device to obtain an initial simulated hardware instruction set; running the initial simulated hardware instruction set; calling the page display component to render and display page elements; respectively obtaining the simulated hardware instruction set adapted to each product device; packaging the simulated hardware instruction set and the assembly instruction set to obtain an application package corresponding to each product device in each operating environment.

[0100] In addition, after running the initial simulated hardware instruction set, the returned hardware instructions and element state instruction set can be obtained, and the virtual machine can return the returned hardware instructions and element state instruction set to step 205 for communication. After the initial simulated hardware instruction set is completed, the garbage collector destroys the initial simulated hardware instruction set to release resources, thereby achieving the requirement of low resource consumption.

[0101] Optionally, the hardware instruction set includes instructions for a processor, a stack, etc. The page presentation component includes but is not limited to: a physical device or a graphics engine, etc., for rendering page elements, which may be hardware, software, or a combination of hardware and software.

[0102] In this embodiment, adapting to each product device refers to adapting to the control display requirements and / or page size requirements of the product device. For example, a control display requirement may be a positive correlation between control size and page size, while a page size requirement may be to fill the entire screen of the product device. In other embodiments, control display requirements and page size requirements may also be of other types, and the product device adaptation criteria may also be other standards, which are not listed here.

[0103] Step 207 : Pack the simulated hardware instruction set and the assembly instruction set corresponding to each operating environment to obtain an application package corresponding to each product device in each operating environment.

[0104] Generate different installation packages or executable packages based on the application being developed through different channels. For example, the installation package for Windows is EXE, for macOS and iOS it is an Xcode project package, for Linux it is a deb package, and for Android it is an APK package. The installation package for each environment includes individual packages for different product devices.

[0105] In summary, the cross-platform application development method provided by this embodiment displays an operating environment selection page, and receives at least one operating environment corresponding to the application to be developed through the operating environment selection page; obtains the application graphic corresponding to the application to be developed through a visual design method; sets the communication method of the application to be developed based on the application graphic; compiles the design information corresponding to the application to be developed into an assembly instruction set corresponding to each operating environment, and classifies the threads of the application to be developed according to the design information during the compilation process; the design information includes application information corresponding to the application graphic and communication information corresponding to the communication method; for each operating environment, data communication is performed according to the communication method based on the assembly instruction set corresponding to the operating environment to obtain data flow information; calling the virtual machine corresponding to the operating environment to perform hardware simulation on the assembly instruction set, classification thread and data flow information to obtain a simulated hardware instruction set; the simulated hardware instruction set is adapted to the product equipment that supports running the application to be developed; the simulated hardware instruction set and assembly instruction set corresponding to each operating environment are packaged to obtain the application package corresponding to each product equipment in each operating environment; it can solve the problem that the same application needs to be developed separately for different channels, resulting in low development efficiency; by designing the product and communicating with different services at the same time, and finally packaging and outputting it according to different operating environments and product equipment, it is possible to obtain multi-channel application packages at one time, which can improve the development efficiency of the application.

[0106] In addition, the product's operational process and status can be viewed through the interactive interface during the design process. This can reduce the input of designers, interaction engineers, and front-end developers, significantly improve design efficiency, and quickly package and put into production. Without building code, graphical design can achieve cross-platform and cross-device development and application with a single set of design drawings.

[0107] Figure 4 4 is a block diagram of a cross-platform application development device provided by an embodiment of the present application. The device includes at least a processor 401 and a memory 402.

[0108] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0109] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the cross-platform application development method provided in the method embodiment of the present application.

[0110] In some embodiments, the cross-platform application development apparatus may optionally include a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface may be connected via a bus or signal lines. Each peripheral device may be connected to the peripheral device interface via a bus, signal lines, or circuit boards. Illustratively, the peripheral devices include, but are not limited to, a radio frequency circuit, a touch screen display, an audio circuit, and a power supply.

[0111] Of course, the cross-platform application development device may also include fewer or more components, which is not limited in this embodiment.

[0112] Optionally, the present application also provides a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the cross-platform application development method of the above method embodiment.

[0113] Optionally, the present application also provides a computer product, which includes a computer-readable storage medium, in which a program is stored. The program is loaded and executed by a processor to implement the cross-platform application development method of the above method embodiment.

[0114] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0115] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A cross-platform application development method, characterized in that: The method includes: displaying an operating environment selection page, and receiving at least one operating environment corresponding to the application to be developed through the operating environment selection page; Obtaining an application graphic corresponding to the application to be developed through a visual design method; Setting a communication mode of the application to be developed based on the application graph; Compiling design information corresponding to the application to be developed into an assembly instruction set corresponding to each operating environment, and classifying threads of the application to be developed according to the design information during the compilation process; the design information includes application information corresponding to the application graph and communication information corresponding to the communication method; For each operating environment, performing data communication according to the communication method based on the assembly instruction set corresponding to the operating environment to obtain data flow information; Calling a virtual machine corresponding to the operating environment to perform hardware simulation on the assembly instruction set, the classification thread, and the data flow information to obtain a simulated hardware instruction set; the simulated hardware instruction set is adapted to a product device that supports running the application to be developed; Packaging the simulated hardware instruction set and the assembly instruction set corresponding to each operating environment to obtain an application package corresponding to each product device in each operating environment; For each operating environment, performing data communication in accordance with the communication mode based on the assembly instruction set corresponding to the operating environment to obtain data flow information includes: obtaining global configuration information in the assembly instruction set; Performing data communication according to the communication mode according to the global configuration information to obtain the data flow information; The global configuration information indicates a Mock debugging mode, and performing data communication according to the communication mode based on the global configuration information to obtain the data flow information includes: obtaining a preset simulation request; Sending the simulated request to a preset virtual object through mock debugging, wherein the virtual object has predefined response data; Receive response data returned by the virtual object when receiving the simulation request, and obtain the data flow information.

2. The method according to claim 1, characterized in that The global configuration information indicates a protocol communication mode, and performing data communication according to the communication mode based on the global configuration information to obtain the data flow information includes: obtaining target data; Assembling the target data according to the communication method to obtain data to be sent; Sending the data to be sent to a preset interface service, wherein the preset interface service is pre-configured with receiving response data; The receiving response data returned by the preset interface service is received to obtain the data stream information.

3. The method according to claim 1, characterized in that The step of setting the communication mode of the application to be developed based on the application graphic comprises: receiving a communication mode setting operation for a target application element in the application graphic; the application graphic comprises a plurality of application elements, and the application graphic is displayed through an application design interface; Displaying a communication mode setting window based on the communication mode setting operation; The communication mode setting information of the target application element is received through the communication mode setting window to obtain the communication mode of the target application element.

4. The method according to claim 3, characterized in that The communication mode setting operation includes a protocol setting operation and a message body setting operation, and the displaying of the communication mode setting window based on the communication mode setting operation includes: displaying a communication protocol selection window based on the protocol setting operation, the communication mode setting window including the communication protocol selection window; A message body selection window is displayed based on the message body setting operation, and the communication mode setting window includes the message body selection window.

5. The method according to claim 1, wherein The calling of the virtual machine corresponding to the operating environment to perform hardware simulation on the assembly instruction set, the classification thread, and the data flow information to obtain a simulated hardware instruction set package includes: running the assembly instruction set, the classification thread, and the data flow information through the virtual machine to simulate the operating instructions and parameters of each hardware device to obtain an initial simulated hardware instruction set; running the initial simulated hardware instruction set; Call the page display component to render and display page elements; Obtain the simulated hardware instruction set adapted to each product device respectively; The simulated hardware instruction set and the assembly instruction set are packaged to obtain an application package corresponding to each product device in each operating environment.

6. The method according to claim 1, characterized in that The at least one operating environment includes at least one of the following: Windows environment, MacOS environment, iOS environment, Linux environment and Android environment.

7. A cross-platform application development device, characterized in that: The device includes a processor and a memory; a program is stored in the memory, and the program is loaded and executed by the processor to implement the cross-platform application development method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that The storage medium stores a program, which, when executed by a processor, is used to implement the cross-platform application development method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Compiling method, compiling device and compiling system of application program

    CN103176774A

  • Cross-platform virtual machine and method

    US20130167112A1