WO2022205013A1 - 程序数据包生成方法、装置、设备及存储介质 - Google Patents

程序数据包生成方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022205013A1
WO2022205013A1 PCT/CN2021/084159 CN2021084159W WO2022205013A1 WO 2022205013 A1 WO2022205013 A1 WO 2022205013A1 CN 2021084159 W CN2021084159 W CN 2021084159W WO 2022205013 A1 WO2022205013 A1 WO 2022205013A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
target
platform
placeholder
configuration information
Prior art date
Application number
PCT/CN2021/084159
Other languages
English (en)
French (fr)
Inventor
赵振焱
张哲�
武乃福
楚楚
石雨
沈鸿翔
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to CN202180000660.8A priority Critical patent/CN115485657A/zh
Priority to PCT/CN2021/084159 priority patent/WO2022205013A1/zh
Publication of WO2022205013A1 publication Critical patent/WO2022205013A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Definitions

  • the present disclosure relates to the technical field of software, and in particular, to a method, apparatus, device, and storage medium for generating program data packets.
  • a method for generating a program data package includes: obtaining configuration information of a target application; the configuration information includes an identifier of a platform to which the target application is adapted; and obtaining a data package of a target component of the target application according to the configuration information ;Each target component is adapted to the platform; invokes the preset automated build script, and generates the data package of the target application program according to the configuration information and the data package of the target component.
  • obtaining the data package of the target component of the target application according to the configuration information includes: determining a candidate component corresponding to the configuration information; the candidate component is adapted to the platform; For the first preset operation, the identifier of at least one candidate component corresponding to the first preset operation is used as the identifier of the target component; and the data packet of the target component is acquired according to the identifier of the target component.
  • the configuration information includes placeholders and a value corresponding to the placeholders; a data package of at least one target component includes placeholders; the above-mentioned calling a preset automated build script, according to the configuration information and the target
  • the data package of the component, the data package of the target application is generated, including: calling the preset automated build script, obtaining the type of the target component, and determining the data of different types of target components in the target application according to the configuration information and the type of the target component The location in the package; replace the placeholder in the data package of at least one target component with the value corresponding to the placeholder according to the configuration information to obtain the data package of the target application.
  • obtaining the configuration information of the target application includes: in response to a triggering operation for generating the application data package, displaying a configuration page; the configuration page includes input controls for placeholders and input controls for platform parameters; In response to the second preset operation on the input control of the placeholder in the configuration page, the information corresponding to the placeholder is obtained, and the information corresponding to the placeholder is used as the value of the placeholder; in response to the operation of the platform parameter in the configuration page The third preset operation of the input control acquires information corresponding to the platform parameters, and uses the information corresponding to the platform parameters as the platform identifier.
  • the method further includes: acquiring an identifier of each target component based on a preset plug-in, and registering each target component based on the identifier of each target component.
  • the target application includes the first component and the second component. Both the first component and the second component inherit from the same parent class.
  • the first component invokes the second component through the invocation request to execute the target task.
  • the invocation request includes the identification of the first component and the identification of the second component.
  • the target application includes routing information between components.
  • the inter-component routing information includes a first relationship and a second relationship.
  • the first relationship is a corresponding relationship between the identifier of the first component and the address of the first component.
  • the second relationship is the corresponding relationship between the identifier of the second component and the address of the second component, and the second relationship is used to locate the call request to the second component to execute the target task.
  • the first relationship is used to call back the execution result of the target task to the first component.
  • the invocation request includes a general message object; the general message object includes an identifier of the second component; and the general message object is obtained according to the message constructor.
  • a program data package generating device comprising: a first obtaining module, a second obtaining module and a generating module, wherein the first obtaining module is used to obtain configuration information of a target application; the configuration information includes the target application adaptation The identifier of the platform; the second acquisition module is used to acquire the data package of the target component of the target application according to the configuration information; each target component is adapted to the platform; the generation module is used to call the preset automated construction script, According to the configuration information and the data package of the target component, the data package of the target application is generated.
  • the second obtaining module is specifically configured to: determine a candidate component corresponding to the configuration information; the candidate component is adapted to the platform; in response to the first preset operation on at least one candidate component among the candidate components, The identifier of the at least one candidate component corresponding to the first preset operation is used as the identifier of the target component; and the data packet of the target component is acquired according to the identifier of the target component.
  • the above-mentioned configuration information includes placeholders and values corresponding to the placeholders; at least one target component data package includes placeholders; the generating module is specifically configured to: call a preset automated build script, Obtain the type of the target component, and determine the location of different types of target components in the data package of the target application according to the configuration information and the type of the target component; according to the configuration information, replace the placeholder in the data package of at least one target component with The value corresponding to the placeholder, get the data packet of the target application.
  • the first obtaining module is specifically configured to: display a configuration page in response to a triggering operation for generating an application data package; the configuration page includes input controls for placeholders and input controls for platform parameters;
  • the second preset operation of the input control of the placeholder in the configuration page is to obtain the information corresponding to the placeholder, and use the information corresponding to the placeholder as the value of the placeholder; in response to the input control of the platform parameter in the configuration page
  • the third preset operation is to obtain information corresponding to the platform parameters, and use the information corresponding to the platform parameters as the platform identifier.
  • the program data package generating apparatus further includes: a registration module, configured to obtain the identifier of each target component based on a preset plug-in, and register each target component based on the identifier of each target component.
  • the target application includes the first component and the second component. Both the first component and the second component inherit from the same parent class.
  • the first component invokes the second component through the invocation request to execute the target task.
  • the invocation request includes the identification of the first component and the identification of the second component.
  • the target application includes routing information between components.
  • the inter-component routing information includes a first relationship and a second relationship.
  • the first relationship is a corresponding relationship between the identifier of the first component and the address of the first component.
  • the second relationship is the corresponding relationship between the identifier of the second component and the address of the second component, and the second relationship is used to locate the call request to the second component to execute the target task.
  • the first relationship is used to call back the execution result of the target task to the first component.
  • the invocation request includes a general message object; the general message object includes an identifier of the second component; and the general message object is obtained according to the message constructor.
  • a computer-readable storage medium stores computer program instructions that, when executed on a processor, cause the processor to execute one or more of the methods for generating program data packets according to any of the above embodiments. steps.
  • a computer program product includes computer program instructions that, when executed on a computer, cause the computer to perform one or more steps of the method for generating a program data packet as described in any of the above embodiments .
  • a computer program When the computer program is executed on a computer, the computer program causes the computer to perform one or more steps in the method for generating a program data package as described in any of the above embodiments.
  • 1A is a block diagram of an electronic device according to some embodiments.
  • 1B is a page diagram of a mobile application open platform according to some embodiments.
  • FIG. 2 is a flowchart of a method for generating a program data packet according to some embodiments
  • FIG. 3 is a diagram of a configuration page according to some embodiments.
  • 4A is a display page diagram of candidate components according to some embodiments.
  • 4B is a display page diagram of candidate components according to other embodiments.
  • 5A is an architectural diagram of a target application according to some embodiments.
  • 5B is a home page diagram of a target application according to some embodiments.
  • 5C is a diagram of an inter-component routing management system according to some embodiments.
  • FIG. 6 is a flowchart of a method of automatically generated message passing between components in software according to some embodiments
  • FIG. 7 is a structural diagram of an apparatus for generating program data packets according to some embodiments.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • the expressions “coupled” and “connected” and their derivatives may be used.
  • the term “connected” may be used in describing some embodiments to indicate that two or more components are in direct physical or electrical contact with each other.
  • the term “coupled” may be used in describing some embodiments to indicate that two or more components are in direct physical or electrical contact.
  • the terms “coupled” or “communicatively coupled” may also mean that two or more components are not in direct contact with each other, yet still co-operate or interact with each other.
  • the embodiments disclosed herein are not necessarily limited by the content herein.
  • At least one of A, B, and C has the same meaning as “at least one of A, B, or C”, and both include the following combinations of A, B, and C: A only, B only, C only, A and B , A and C, B and C, and A, B, and C.
  • a and/or B includes the following three combinations: A only, B only, and a combination of A and B.
  • the term “if” is optionally construed to mean “when” or “at” or “in response to determining” or “in response to detecting,” depending on the context.
  • the phrases “if it is determined that" or “if a [statement or event] is detected” are optionally interpreted to mean “in determining" or “in response to determining" or “on detection of [recited condition or event]” or “in response to detection of [recited condition or event]”.
  • the traditional development mode of mobile software is that developers create new application engineering projects and then develop basic functions, such as basic user interface. (user interface, UI), local database, network configuration, etc., and then implement business functions according to requirements and design documents.
  • basic user interface. user interface
  • UI user interface
  • business functions if similar components have been developed in other projects, copy the corresponding components of the components. code and secondary development.
  • the development efficiency of this development mode is low and the development cycle is long. Therefore, the present disclosure provides a program data package generation method to solve the problems of low development efficiency and long development cycle in the traditional development mode.
  • the method for generating a program data package provided by the embodiment of the present disclosure may be implemented by the electronic device 10 as shown in FIG. 1A .
  • FIG. 1A it is a structural diagram of an electronic device to which the technical solutions provided by the embodiments of the present disclosure are applied.
  • the electronic device 10 in FIG. 1A includes, but is not limited to, a processor 101, a memory 102, an input unit 103, an interface unit 104, a power supply 105, and the like.
  • the processor 101 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing the software programs and/or modules stored in the memory 102, and calling the data stored in the memory 102. , perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole.
  • the processor 101 may include one or more processing units; optionally, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem
  • the modulation processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 101 .
  • the memory 102 may be used to store software programs as well as various data.
  • the memory 102 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required by at least one functional unit, and the like. Additionally, memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the memory 102 may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM) ), CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices, etc.
  • ROM read-only memory
  • RAM random access memory
  • CD-ROMs compact disc-read-only memory
  • magnetic tapes magnetic tapes
  • floppy disks floppy disks
  • optical data storage devices etc.
  • the input unit 103 may be a keyboard, a touch screen or other devices.
  • the interface unit 104 is an interface for connecting an external device to the electronic device 10 .
  • external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more.
  • the interface unit 104 may be used to receive input (eg, data information, etc.) from an external device and transmit the received input to one or more elements within the electronic device 10 or may be used to communicate between the electronic device 10 and the external device transfer data.
  • the power supply 105 (for example, a battery) can be used to supply power to various components.
  • the power supply 105 can be logically connected to the processor 101 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. .
  • the computer instructions in this embodiment of the present disclosure may also be referred to as application code or a system, which is not specifically limited in this embodiment of the present disclosure.
  • the electronic device shown in FIG. 1A is only an example, which does not limit the electronic device to which the embodiments of the present disclosure are applicable. In actual implementation, the electronic device may include more or less devices or devices than those shown in FIG. 1A .
  • an automated development management system can be constructed, which includes a mobile application open platform, a component and a mobile application management background, a component source code hosting platform, a component package hosting platform, The five parts of the program packet generation system. Connect to specific users through the mobile application open platform, display service portals such as component resource pools and component details, and provide an operating platform for the program data package generation system.
  • the mobile application open platform is the entrance for the user to interact with the program data package generation system. It is mainly connected with the components and the mobile application management background through network interface calls, mainly including user management, component management, program data package generation management and authority management. and other modules.
  • the component and mobile application management background is mainly used to store component and mobile application information and its details, and provide business data for the mobile application open platform. It mainly includes component management background, mobile application management background, business service background and data background.
  • the component source code hosting platform is mainly used for component source code storage and management.
  • the component source code hosting platform can also be used as an independent closed-loop system, and can also perform operations such as source code download through the external interface it provides. Its user management module can only be used. Used to manage users who use the component's source code hosting platform.
  • the component package hosting platform is mainly used for the storage and management of component dependency packages. This part can be used as an independent closed-loop system, and it can also perform operations such as component dependency package download through the external interface provided by it. Its user management module can Used only to manage users who use the package hosting platform.
  • the program data packet generation system is mainly used for the automatic generation of program data packets, workflow management, etc. This part can be used as an independent closed-loop system, and can also provide external interfaces, components and mobile application management backgrounds are called through network connections
  • the external interface provided by the program data package generation system transmits the construction parameters to the program data package generation system to realize the automatic generation of the program data package.
  • the mobile application open platform includes functional modules in the left menu bar, such as: component center module, application center module, micro program center module, development platform module, management Platform modules and personal hubs.
  • the component center module can display a list of all components stored in the system, and each component can be arranged in a card layout to display component content, wherein the component content includes but is not limited to: component name, component type, component category, Component version, component applicable platform, component developer, component reference times, component supports horizontal and vertical screen, component supports default resolution, and component brief description, etc. Users can perform operations such as component collection, component detail query, and component filtering on the current page.
  • the application center module can display the list of mobile applications that the system has successfully built, including: application name, application category, application popularity (number of application downloads), application download QR code, application version number, application query details button and application local download button etc.
  • the electronic device can also display the detailed information of the application in response to the query operation, the detailed information includes: application name, application category, application popularity (application download count), application download QR code, application version number, application release time, application platform support Status, application screenshots, application short videos, application descriptions, application administrators, in-app component list, in-app micro-program list, etc.
  • the microprogram center module can display the information of all microprograms stored in the system.
  • the difference between microprograms and components is that microprograms are designed based on cross-platform technology, which is different from the objective situation of component customization. It is cross-platform, lightweight, and easy to use. integrated features.
  • the functions and pages of the microprogram center module and the component center module are similar, and will not be described again.
  • the microprogram information includes but is not limited to: microprogram name, release time, microprogram package volume, microprogram scenario type, person in charge, microprogram support for horizontal and vertical screens, microprogram support default resolution, and microprogram brief description, etc.
  • the development platform module mainly includes three parts: component management module, application management module and microprogram management module.
  • the component management module is mainly used to display the list of all components published, collaboratively managed and/or favorited by the user, and the component management module provides the function of adding new components.
  • the detailed information of the component includes: component name, component release time, component version, component category, component reference times, component status and/or component operation function list, etc.
  • the component status includes but is not limited to: pending, on the shelf, off the shelf, and failed.
  • the basic information of the component includes the component name, the component version number, the component adaptation platform, the display type, the component default resolution, the component category, the component source code storage path, and the component data package dependency. Path, component source code version number, component data package version number, component internal dependencies, component collaborator list, component pictures and related small videos and component details, etc.
  • the electronic device transmits the basic information of the component to the component and the mobile application management background by calling the network interface, and the background will publish the acquired basic information of the component in the mobile application open platform.
  • the application management module provides the function of displaying application information and the function of creating an application.
  • the application information includes: application name, application release time, application version, application category, application support platform, application status, resolution, display type, and application operation function list, etc.
  • the application status includes but is not limited to: has been put on the shelf, not completed.
  • the electronic device obtains the application information, and transfers the application information to the component and the mobile application management background through the network interface call.
  • a package generation system the system generates an application data package by calling a preset automatic construction script corresponding to the mobile application type, and optionally, the electronic device builds and publishes the generated program data package.
  • the management platform module mainly includes two parts: audit management module and user management module.
  • User permissions in the system can be divided into: ordinary users, developers, administrators, and the permissions increase in turn. Administrators can view and use all functions of the management platform module.
  • the audit management module is mainly used to display the status of all components and micro-programs, and can perform related approval operations on them.
  • the user management module can be used to display all user details and permission types, and can perform relevant permission modification operations on them.
  • the modification operations include: details query, edit, delete, batch delete and add users, etc.
  • the personal center module is mainly used to display the personal details of the current user.
  • the details include: account number, user name, email address, organization, phone number, and avatar. Users can perform functions such as password modification, information update and avatar uploading on this page.
  • Scenario 1 Code developers can use the component platform to add new components.
  • the new components are mainly divided into three stages: development stage, component packaging stage, and component platform registration stage. After the code developer completes the component development, upload the data package that the component depends on through the component package hosting platform, upload the component source code through the component source code hosting platform, and enter the component platform registration stage after completion.
  • the address and the address of the data package that the component depends on is released through the mobile application open platform - development platform module - component management module - new component function.
  • Scenario 2 Code developers can use the platform to find and use components. Developers can perform operations such as component browsing, viewing, and detail dependency traversal. For components that can be reused, developers can use the queried details to perform overall reuse of component data packages or follow-up of source code modification after source code download. operate.
  • Scenario 3 Business personnel can use the mobile application open platform to generate application data packages.
  • the business person can enter the configuration information of the application, query the components according to the configuration information, select the components from the displayed components, and then click the Generate button to generate the data package of the application.
  • the installation package of the application can be constructed after the data package of the application is generated, and transmitted to the mobile application open platform, the software can be stored and released, and the two-dimensional code can be generated and released.
  • FIG. 2 shows a flowchart of a method for generating a program data package provided by an embodiment of the present disclosure, which is applicable to the above scenario 3.
  • the method can be applied to the electronic device shown in FIG. 1A , and the method shown in FIG. 2 can Include the following steps:
  • the electronic device obtains configuration information of the target application.
  • the configuration information includes the identification of the platform to which the target application is adapted.
  • the electronic device displays a configuration page in response to a triggering operation for generating an application data package.
  • the configuration page includes input controls for placeholders and input controls for platform parameters.
  • the electronic device obtains information corresponding to the placeholder in response to a preset operation on the input control of the placeholder in the configuration page, and uses the information corresponding to the placeholder as the value of the placeholder.
  • the electronic device acquires information corresponding to the platform parameter in response to the preset operation on the input control of the platform parameter in the configuration page, and uses the information corresponding to the platform parameter as the platform identifier.
  • the electronic device displays a configuration page as shown in FIG. 3 in response to the triggering operation for generating the application data package, and the user inputs corresponding configuration information on the configuration page, such as the application project name and application type in FIG. 3 . , application platform, application category, resolution, display type and other configuration information.
  • the electronic device acquires the configuration information of the target application in response to the input operation on the configuration page.
  • the configuration information of the target application includes the value of the placeholder (the content entered in the text box of the application project name in FIG. 3 ), and the value of the placeholder may be the identifier of the target application.
  • Application type for example: single-platform application or cross-platform application, etc.
  • the platform identifier to which the application is adapted (the content entered in the application platform text box in Figure 3), for example, the Android (android) platform, the Apple (iOS) platform, or the Microsoft (windows) platform, etc., and the display type, for example, landscape display or vertical display, etc.
  • the electronic device acquires a file including configuration information, and the electronic device parses the configuration information file to obtain the configuration information of the target application.
  • the electronic device in response to a user's file upload operation, acquires a file including configuration information, and the electronic device parses the file with the configuration information to obtain the configuration information of the target application.
  • the electronic device obtains a data package of a target component of a target application according to the configuration information; each target component is adapted to the platform represented by the platform identifier in the configuration information.
  • the electronic device determines a candidate component corresponding to the configuration information; the candidate component is adapted to the platform represented by the platform identifier; then, the electronic device responds to a preset operation on at least one candidate component among the candidate components, The identifier of at least one candidate component corresponding to the preset operation is used as the identifier of the target component. Then, the electronic device acquires the data packet of the target component according to the identifier of the target component. The electronic device stores the corresponding relationship between the identifier of the component and the data package of the component.
  • the electronic device determines the candidate component corresponding to the configuration information according to the configuration information input in the text box in FIG. 3 , and the user selects the target component in the selection box on the display page of the candidate component as shown in FIG. 4A .
  • the user checks the target component in the selection box of the candidate component display page as shown in FIG. 4B , and the electronic device responds to the selection operation on at least one candidate component, and uses the candidate component corresponding to the selection operation as the target component.
  • the electronic device acquires the data package of the component corresponding to the identifier of the target component from the component library according to the identifier of the target component.
  • the component library includes the corresponding relationship between the identifier of the component and the data package of the component.
  • S102 The electronic device invokes a preset automated construction script, and generates a data package of the target application program according to the configuration information and the data package of the target component.
  • the configuration information includes a placeholder and a value corresponding to the placeholder.
  • At least one target component's data package includes placeholders for configuration information.
  • the electronic device invokes a preset automated construction script to obtain the type of the target component, and determines the location of different types of target components in the data package of the target application according to the configuration information and the type of the target component.
  • the electronic device replaces a placeholder in a data packet of at least one target component with a value corresponding to the placeholder according to the configuration information, to obtain a data packet of the target application.
  • the electronic device may determine candidate components according to the acquired configuration information, and then acquire the target components from the candidate components, and finally, generate the target application's content according to the target components and the preset automatic speech construction script.
  • non-developers can also generate a target application after inputting the configuration information of the target application and obtaining the target component according to the configuration information of the target application according to the method for generating program data packets provided by the embodiments of the present disclosure after simple training. Therefore, it solves the problems of low efficiency and long development cycle in developing and acquiring target application data packets under the traditional development mode.
  • the electronic device may invoke the automated build script to compile the data package of the target application, and obtain the installation package of the target application.
  • the electronic device acquires the type of the target component, and the type of the target component may be a layout type, a service type, a library type, or the like.
  • the electronic device determines the location of the data package of the target component in the data package of the target application according to the type of the data package of the target component and the platform identifier in the configuration information.
  • the type of the target component is a front-end layout type and the applicable platform of the target application is the Android platform
  • the folder where the data package of the target component is laid out in the data package of the target software is determined.
  • the electronic device replaces the placeholder corresponding to the identifier of the target application in at least one target component with the target application identification, etc. After the electronic device automatically replaces the placeholder in the data package of the target component, the data package of the target application program is obtained.
  • S103 The electronic device acquires the identifier of each target component based on a preset plug-in, and registers each target component based on the identifier of each target component.
  • the electronic device obtains the identifier of the target component based on the plug-in, and registers each target component based on the identifier of each target component.
  • the registration information of the target component includes the identifier of the target component and the scope of application of the target component in the target application.
  • the electronic device may generate routing information of the target component according to the registration information of the target component when it is started up.
  • the routing information of the target component includes a physical address corresponding to the identifier of the target component, and other target components to which the first target component can be called.
  • the first target component is any one of the target components, and the other target components are target components other than the first target component.
  • the architecture of the target application packaged or published by the electronic device is shown in FIG. 5A .
  • the target application shown in FIG. 5A includes a business module layer 501 , an independent service layer 502 , a container layer 503 , a framework layer 504 , The basic service layer 505 and the user interface layer 506, wherein the business module layer 501 includes business components and/or composite business components, and in the case that the target application is mobile software, the business module layer 501 corresponds to the "service" in the mobile application open platform.
  • the container layer 503 corresponds to the "basic component” category in the mobile application open platform, and depends on the application software by default; the independent service layer 502 corresponds to the "service component” category in the mobile application open platform; the framework layer 504 corresponds to the mobile application open platform.
  • the electronic device After starting the target application, the electronic device generates inter-component routing information of the target application according to the identifier of the target component, and the inter-component routing information includes the correspondence between the identifier of the component and the address. Message passing between components can be done according to the routing information between components.
  • the home page displayed by the target application generated by the electronic device after startup is shown in FIG. 5B .
  • the home page includes access control, vehicle management, visitor management, park management and equipment management.
  • the method for generating program data packets provided by the embodiments of the present disclosure can also generate data packets of composite service components such as access control management, vehicle management, visitor management, park management, or equipment management.
  • a composite business component includes at least one component. This embodiment of the present disclosure does not limit this.
  • the component invocation requests between components in the Android software are divided into four types of invocation requests: invoking pages, invoking services, acquiring data, and transmitting messages.
  • the unified componentized platform specification and the design method of the bus routing communication components can realize the transfer between the components of these four call requests, so as to achieve the purpose of decoupling between components.
  • the plug-in can be an annotation processing tool (APT) plug-in.
  • the APT plug-in scans and extracts the corresponding label information of the target component (such as: (@PAGE)), and register the component identifier in the class information of the calling page to the routing management module (also known as: bus routing component), and when in use, return the entity of the layout represented by the component identifier by direct instantiation class or active entity class.
  • the startup mechanism of the service component is based on the Android Content Provider.
  • the electronic device forms the service table of the target component by extracting the annotations of the APT plug-in, and registers it in the routing management module ; In this way, when the annotation of the corresponding service (that is, the identifier of the target component) is used, the electronic device automatically generates the corresponding annotation as the method name in @Service + ServiceProvider according to the service provider (ServiceProvider) template.
  • Service entity class named as a whole , which has the corresponding function of starting the service in the service table and automatically registers the information of the provider component in the manifest.xml of the component, and declares the node information (also known as the address) of the corresponding provider; finally, when component A When the API of service B is activated through the routing component, the routing management module of the electronic device will achieve the purpose of calling the service information method by encapsulating the use of the corresponding content provider.
  • the target application packaged and released above is mobile software based on Android (Android), the target application encapsulates business components in the container layer, and performs data communication through a bus routing mechanism.
  • the target application calls the underlying basic services, platform framework and platform application component content through the bus routing mechanism.
  • the inter-component routing management system 60 in the embodiment of the present disclosure is shown in FIG. 5C .
  • the routing management system includes a component automatic registration plug-in 601 , a component routing information management module 602 , a bus module 603 and a routing module 604 .
  • the component automatic registration plug-in 601 is used to scan the subclass component information of the target parent class in the target application program during the target application program compilation process. Subclass components inherit the generic interface of the target parent class.
  • the component automatic registration plug-in 601 sends the extracted component information to the component routing information management module 602, and the component information is used for the component routing information management module to register the component.
  • the routing module 604 obtains the authorized component information that conforms to the authorization policy from the component routing information management module 602 when the target application is started, and generates routing information for each authorized component (that is, a component that can be discovered by the routing module) (example). , generate a corresponding instance of the component for each component).
  • the bus module 603 is used to transmit messages between components. In FIG. 5C, component A sends a call request to routing module 604 through bus module 603.
  • the routing management module in routing module 604 determines the call of component A by judging whether the request is a "page request" or "service request” Request the requested instance of component B, and pass the invocation request of component A to the instance of component B. After the instance of component B completes the invocation request of component A, it returns the callback information to component A through the same link to complete the bus event. the entire process.
  • FIG. 6 is a flowchart of an automatically generated method for message transfer between components in software provided by an embodiment of the present disclosure. The method can be applied to the electronic device shown in FIG. 1A , and the method shown in FIG. 6 can be Include the following steps:
  • S200 The electronic device generates a call request in the first component in response to the target instruction.
  • the calling request is used to request the second component to execute the target task.
  • the call request includes the identification of the first component and the identification of the second component. Both the first component and the second component are components in the target application.
  • this embodiment of the present disclosure does not limit the triggering manner of the target instruction.
  • the electronic device responds to a target operation on the first component of the target application, and the target operation is directed to the electronic device.
  • the command sent is the target command.
  • the electronic device generates the target instruction in the process of running the first component in the target application.
  • the invocation request includes a general message object, and the general message object includes an identifier of the second component.
  • the generic message object is obtained from the message constructor.
  • Actiontype mactiontype actiontype.service
  • the message constructor includes the following methods:
  • setContext(Context context) This method calls the setContext() method when constructing a general message, and needs to pass in the context Context.
  • SetActionType(ActionType actionType) This method is used to set the message type (or operation type, including PAGE (page), Service (service) and CUSTOM (custom message) three types.
  • setActionName(String actionName) This method is used to set the string identifier of the action to be performed.
  • the string identifier here corresponds to the value filled in the @Page and @Service annotations. That is, the ID of the target component.
  • setFlag(int intentFlag) This method is used to distinguish the page jump mode for the routing module.
  • setCallback(Callback callback) This method is used to set the callback. When the result needs to be returned, set this callback.
  • setAutoCancelOnActivityDestroy(Activity activity) This method is used to indicate whether to bind with the Activity in the life cycle, and the Activity to be bound is passed in, which can be not set by default.
  • SetAutoCancelOnFragmentDestroy(Fragment fragment) This method is used to indicate whether to bind with the Fragment in the life cycle, and the Fragment to be bound is passed in, which can not be set by default.
  • the electronic device locates the second component according to the address corresponding to the identifier of the second component in the routing information, and executes the target task to obtain a response result; the response result includes the identifier of the first component.
  • the response result may also be a general message object constructed by the above message constructor.
  • S202 The electronic device calls back the response result to the first component according to the address corresponding to the identifier of the first component in the routing information.
  • the electronic device may send the response result to the first component in the reverse direction according to the route of the calling request.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. middle.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present disclosure is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the program data package generating apparatus 70 includes a first obtaining module 701, a second obtaining module 702 and a generating module 703, and the first obtaining module 701 is used to obtain configuration information of the target application; the configuration information includes the identifier of the platform to which the target application is adapted
  • the second acquisition module 702 is used to acquire the data package of the target component of the target application according to the configuration information; each target component is adapted to the platform; the generation module 703 is used to call the preset automated construction script, according to the configuration Information and target component packets, generating target application packets.
  • the first obtaining module 701 can be used to execute S100
  • the second obtaining module 702 can be used to execute S101
  • the generating module 703 can be used to execute S102.
  • the second obtaining module 702 is specifically configured to: determine a candidate component corresponding to the configuration information; the candidate component is adapted to the platform; in response to the first preset operation on at least one candidate component in the candidate component, The identifier of at least one candidate component corresponding to a preset operation is used as the identifier of the target component; the data packet of the target component is acquired according to the identifier of the target component.
  • the above configuration information includes placeholders and values corresponding to the placeholders; at least one target component data package includes placeholders; the generating module 703 is specifically used for: calling a preset automated build script to obtain the target The type of the component, and determine the location of different types of target components in the data package of the target application according to the configuration information and the type of the target component; replace the placeholder in the data package of at least one target component with a placeholder according to the configuration information The corresponding value of the character is obtained, and the data packet of the target application is obtained.
  • the first obtaining module 701 is specifically configured to: display a configuration page in response to a triggering operation for generating an application data package; the configuration page includes input controls for placeholders and input controls for platform parameters; In the second preset operation of the input control of the placeholder, obtain the information corresponding to the placeholder, and use the information corresponding to the placeholder as the value of the placeholder; in response to the third operation of the input control of the platform parameter in the configuration page The preset operation is to obtain the information corresponding to the platform parameters, and use the information corresponding to the platform parameters as the platform identifier.
  • the program data package generating apparatus further includes: a registration module 704, configured to obtain an identifier of each target component based on a preset plug-in, and register each target component based on the identifier of each target component.
  • a registration module 704 configured to obtain an identifier of each target component based on a preset plug-in, and register each target component based on the identifier of each target component.
  • the target application includes the first component and the second component. Both the first component and the second component inherit from the same parent class.
  • the first component invokes the second component through the invocation request to execute the target task.
  • the invocation request includes the identification of the first component and the identification of the second component.
  • the target application includes routing information between components.
  • the inter-component routing information includes a first relationship and a second relationship.
  • the first relationship is a corresponding relationship between the identifier of the first component and the address of the first component.
  • the second relationship is the corresponding relationship between the identifier of the second component and the address of the second component, and the second relationship is used to locate the call request to the second component to execute the target task.
  • the first relationship is used to call back the execution result of the target task to the first component.
  • the invocation request includes a generic message object; the generic message object includes an identifier of the second component; and the generic message object is obtained according to the message constructor.
  • the receiving functions of the first obtaining module 701 and the second obtaining module 702 may be implemented by the interface unit 104 in FIG. 1A .
  • the processing function of the first obtaining module 701 , the processing function of the second obtaining module 702 , the generating module 703 and the registration module 704 can be implemented by the processor 101 in FIG. 1A calling the computer program stored in the memory 102 .
  • Some embodiments of the present disclosure provide a computer-readable storage medium (eg, a non-transitory computer-readable storage medium) having computer program instructions stored therein that when executed on a processor , so that the processor executes one or more steps in the method for generating a program data packet according to any one of the foregoing embodiments.
  • a computer-readable storage medium eg, a non-transitory computer-readable storage medium
  • the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (for example, hard disks, floppy disks or magnetic tapes, etc.), optical disks (for example, CD (Compact Disk, compact disk), DVD (Digital Versatile Disk, Digital Universal Disk), etc.), smart cards and flash memory devices (eg, EPROM (Erasable Programmable Read-Only Memory, Erasable Programmable Read-Only Memory), card, stick or key drive, etc.).
  • the various computer-readable storage media described in this disclosure may represent one or more devices and/or other machine-readable storage media for storing information.
  • the term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and/or carrying instructions and/or data.
  • the computer program product includes computer program instructions that, when executed on a computer, cause the computer to perform one or more steps in the method for generating a program data package as described in the above embodiments.
  • Some embodiments of the present disclosure also provide a computer program.
  • the computer program When the computer program is executed on a computer, the computer program causes the computer to perform one or more steps of the method for generating a program data package as described in the above embodiments.

Landscapes

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

Abstract

一种程序数据包生成方法,该方法包括获取目标应用程序的配置信息;配置信息包括目标应用程序适配的平台的标识;根据配置信息获取目标应用程序的目标组件的数据包;每个目标组件均适配于该平台;调用预设的自动化构建脚本,根据配置信息和目标组件的数据包,生成目标应用程序的数据包。

Description

程序数据包生成方法、装置、设备及存储介质 技术领域
本公开涉及软件技术领域,尤其涉及程序数据包生成方法、装置、设备及存储介质。
背景技术
近年来,随着移动软件的发展,开发人员越来越多的使用组件化技术进行基于Android平台或iOS平台等移动平台中的移动软件的开发。组件化技术可以提升软件开发的效率。组件是把不同软件源代码中的重复的代码提取出来合并得到的。组件通常可以被复用,且一般用于承载部分独立功能。
发明内容
一方面,提供一种程序数据包生成方法,该方法包括:获取目标应用程序的配置信息;配置信息包括目标应用程序适配的平台的标识;根据配置信息获取目标应用程序的目标组件的数据包;每个目标组件均适配于该平台;调用预设的自动化构建脚本,根据配置信息和目标组件的数据包,生成目标应用程序的数据包。
在一些实施例中,上述根据配置信息获取目标应用程序的目标组件的数据包,包括:确定与配置信息对应的候选组件;候选组件适配于该平台;响应于对候选组件中至少一个候选组件的第一预设操作,将与第一预设操作对应的至少一个候选组件的标识作为目标组件的标识;根据目标组件的标识,获取目标组件的数据包。
在另一些实施例中,上述配置信息中包括占位符以及占位符对应的值;至少一个目标组件的数据包中包括占位符;上述调用预设的自动化构建脚本,根据配置信息和目标组件的数据包,生成目标应用程序的数据包,包括:调用预设的自动化构建脚本,获取目标组件的类型,并根据配置信息和目标组件的类型确定不同类型的目标组件在目标应用程序的数据包中的位置;根据配置信息将至少一个目标组件的数据包中的占位符替换为占位符对应的值,得到目标应用程序的数据包。
在另一些实施例中,上述获取目标应用程序的配置信息,包括:响应于对生成应用程序数据包的触发操作,展示配置页面;配置页面包括占位符的输入控件和平台参数的输入控件;响应于对配置页面中占位符的输入控件的第二预设操作,获取占位符对应的信息,将占位符对应的信息作为占位符的 值;响应于对配置页面中平台参数的输入控件的第三预设操作,获取平台参数对应的信息,将平台参数对应的信息作为平台的标识。
在另一些实施例中,该方法还包括:基于预设的插件获取每个目标组件的标识,并基于每个目标组件的标识注册每个目标组件。
在另一些实施例中,目标应用程序包括第一组件和第二组件。第一组件和第二组件均继承于相同的父类。第一组件通过调用请求调用第二组件以执行目标任务。该调用请求包括第一组件的标识和第二组件的标识。目标应用程序中包括组件间路由信息。组件间路由信息包括第一关系和第二关系。第一关系为第一组件的标识与第一组件的地址的对应关系。第二关系为第二组件的标识与第二组件的地址的对应关系,第二关系用于将调用请求定位至第二组件以执行目标任务。第一关系用于将目标任务的执行结果回调至第一组件。
在另一些实施例中,上述调用请求包括通用消息对象;通用消息对象中包括第二组件的标识;通用消息对象是根据消息构造器得到的。
另一方面,提供一种程序数据包生成装置,包括:第一获取模块、第二获取模块和生成模块,第一获取模块用于获取目标应用程序的配置信息;配置信息包括目标应用程序适配的平台的标识;第二获取模块,用于根据配置信息获取目标应用程序的目标组件的数据包;每个目标组件均适配于该平台;生成模块,用于调用预设的自动化构建脚本,根据配置信息和目标组件的数据包,生成目标应用程序的数据包。
在一些实施例中,第二获取模块具体用于:确定与配置信息对应的候选组件;候选组件适配于该平台;响应于对候选组件中至少一个候选组件的第一预设操作,将与第一预设操作对应的至少一个候选组件的标识作为目标组件的标识;根据目标组件的标识,获取目标组件的数据包。
在另一些实施例中,上述配置信息中包括占位符以及占位符对应的值;至少一个目标组件的数据包中包括占位符;生成模块具体用于:调用预设的自动化构建脚本,获取目标组件的类型,并根据配置信息和目标组件的类型确定不同类型的目标组件在目标应用程序的数据包中的位置;根据配置信息将至少一个目标组件的数据包中的占位符替换为占位符对应的值,得到目标应用程序的数据包。
在另一些实施例中,第一获取模块具体用于:响应于对生成应用程序数 据包的触发操作,展示配置页面;配置页面包括占位符的输入控件和平台参数的输入控件;响应于对配置页面中占位符的输入控件的第二预设操作,获取占位符对应的信息,将占位符对应的信息作为占位符的值;响应于对配置页面中平台参数的输入控件的第三预设操作,获取平台参数对应的信息,将平台参数对应的信息作为平台的标识。
在另一些实施例中,程序数据包生成装置还包括:注册模块,用于基于预设的插件获取每个目标组件的标识,并基于每个目标组件的标识注册每个目标组件。
在另一些实施例中,目标应用程序包括第一组件和第二组件。第一组件和第二组件均继承于相同的父类。第一组件通过调用请求调用第二组件以执行目标任务。该调用请求包括第一组件的标识和第二组件的标识。目标应用程序中包括组件间路由信息。组件间路由信息包括第一关系和第二关系。第一关系为第一组件的标识与第一组件的地址的对应关系。第二关系为第二组件的标识与第二组件的地址的对应关系,第二关系用于将调用请求定位至第二组件以执行目标任务。第一关系用于将目标任务的执行结果回调至第一组件。
在另一些实施例中,上述调用请求包括通用消息对象;通用消息对象中包括第二组件的标识;通用消息对象是根据消息构造器得到的。
再一方面,提供一种计算机可读存储介质。所述计算机可读存储介质存储有计算机程序指令,所述计算机程序指令在处理器上运行时,使得所述处理器执行如上述任一实施例所述的程序数据包生成方法中的一个或多个步骤。
又一方面,提供一种计算机程序产品。所述计算机程序产品包括计算机程序指令,在计算机上执行所述计算机程序指令时,所述计算机程序指令使计算机执行如上述任一实施例所述的程序数据包生成方法中的一个或多个步骤。
又一方面,提供一种计算机程序。当所述计算机程序在计算机上执行时,所述计算机程序使计算机执行如上述任一实施例所述的程序数据包生成方法中的一个或多个步骤。
附图说明
为了更清楚地说明本公开中的技术方案,下面将对本公开一些实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图 仅仅是本公开的一些实施例的附图,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。此外,以下描述中的附图可以视作示意图,并非对本公开实施例所涉及的产品的实际尺寸、方法的实际流程、信号的实际时序等的限制。
图1A为根据一些实施例的电子设备的结构图;
图1B为根据一些实施例的移动应用开放平台的页面图;
图2为根据一些实施例的一种程序数据包生成方法的流程图;
图3为根据一些实施例的配置页面图;
图4A为根据一些实施例的候选组件的显示页面图;
图4B为根据另一些实施例的候选组件的显示页面图;
图5A为根据一些实施例的一种目标应用程序的架构图;
图5B为根据一些实施例的一种目标应用程序的首页图;
图5C为根据一些实施例的一种组件间路由管理***图;
图6为根据一些实施例的自动生成的软件中组件间消息传递的方法的流程图;
图7为根据一些实施例的一种程序数据包生成装置的结构图。
具体实施方式
首先,对本公开实施例中所涉及的部分术语进行简单介绍:
除非上下文另有要求,否则,在整个说明书和权利要求书中,术语“包括(comprise)”及其其他形式例如第三人称单数形式“包括(comprises)”和现在分词形式“包括(comprising)”被解释为开放、包含的意思,即为“包含,但不限于”。在说明书的描述中,术语“一个实施例(one embodiment)”、“一些实施例(some embodiments)”、“示例性实施例(exemplary embodiments)”、“示例(example)”、“特定示例(specific example)”或“一些示例(some examples)”等旨在表明与该实施例或示例相关的特定特征、结构、材料或特性包括在本公开的至少一个实施例或示例中。上述术语的示意性表示不一定是指同一实施例或示例。此外,所述的特定特征、结构、材料或特点可以以任何适当方式包括在任何一个或多个实施例或示例中。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本公开实施例的描述中,除非另有说明,“多个”的含义 是两个或两个以上。
在描述一些实施例时,可能使用了“耦接”和“连接”及其衍伸的表达。例如,描述一些实施例时可能使用了术语“连接”以表明两个或两个以上部件彼此间有直接物理接触或电接触。又如,描述一些实施例时可能使用了术语“耦接”以表明两个或两个以上部件有直接物理接触或电接触。然而,术语“耦接”或“通信耦合(communicatively coupled)”也可能指两个或两个以上部件彼此间并无直接接触,但仍彼此协作或相互作用。这里所公开的实施例并不必然限制于本文内容。
“A、B和C中的至少一个”与“A、B或C中的至少一个”具有相同含义,均包括以下A、B和C的组合:仅A,仅B,仅C,A和B的组合,A和C的组合,B和C的组合,及A、B和C的组合。
“A和/或B”,包括以下三种组合:仅A,仅B,及A和B的组合。
如本文中所使用,根据上下文,术语“如果”任选地被解释为意思是“当……时”或“在……时”或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“如果确定……”或“如果检测到[所陈述的条件或事件]”任选地被解释为是指“在确定……时”或“响应于确定……”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。
本文中“适用于”或“被配置为”的使用意味着开放和包容性的语言,其不排除适用于或被配置为执行额外任务或步骤的设备。
另外,“基于”或“根据”的使用意味着开放和包容性,因为“基于”或“根据”一个或多个所述条件或值的过程、步骤、计算或其他动作在实践中可以基于额外条件或超出所述的值。
当前,随着智能移动设备的普及和移动互联网业务的发展,移动软件的开发需求也越来越多,传统移动软件的开发模式是开发人员新建应用工程项目,再开发基础功能,比如基础用户界面(user interface,UI)、本地数据库、网络配置等,然后再根据需求和设计等文档实现业务功能,在实现业务功能的过程中,若已经在其他项目中开发过类似组件,则拷贝组件相应的代码并对其进行二次开发。该种开发模式的开发效率低下,开发周期长。因而,本公开提供一种程序数据包生成方法,以解决传统开发模式下开发效率低下,开发周期长的问题。
下面将结合附图,对本公开一些实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实 施例。基于本公开所提供的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本公开保护的范围。
本公开实施例提供的程序数据包生成方法可以由如图1A所示的电子设备10来实现。如图1A所示,为本公开实施例提供的技术方案所适用的一种电子设备的结构图。图1A中电子设备10包括但不限于:处理器101、存储器102、输入单元103、接口单元104和电源105等。
处理器101是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器102内的软件程序和/或模块,以及调用存储在存储器102内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器101可包括一个或多个处理单元;可选的,处理器101可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器101中。
存储器102可用于存储软件程序以及各种数据。存储器102可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能单元所需的应用程序等。此外,存储器102可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。可选地,存储器102可以是非临时性计算机可读存储介质,例如,非临时性计算机可读存储介质可以是只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
输入单元103可以为键盘、触摸屏等器件。
接口单元104为外部装置与电子设备10连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元104可以用于接收来自外部装置的输入(例如,数据信息等)并且将接收到的输入传输到电子设备10内的一个或多个元件或者可以用于在电子设备10和外部装置之间传输数据。
电源105(比如:电池)可以用于为各个部件供电,可选的,电源105可以通过电源管理***与处理器101逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。
可选的,本公开实施例中的计算机指令也可以称之为应用程序代码或系 统,本公开实施例对此不作具体限定。
需要说明的是,图1A所示的电子设备仅为示例,其不对本公开实施例可适用的电子设备构成限定。实际实现时,电子设备可以包括比图1A中所示的更多或更少的设备或器件。
在实施本公开实施例所提供的程序数据包生成方法之前,可以先构建自动化开发管理***,该***包括移动应用开放平台、组件和移动应用管理后台、组件源代码托管平台、组件包托管平台、程序数据包生成***这五部分。通过移动应用开放平台对接具体用户,展示组件资源池和组件详细信息等业务入口,提供程序数据包生成***的操作平台。
移动应用开放平台为用户与程序数据包生成***进行交互的入口,其主要与组件和移动应用管理后台通过网络接口调用的方式连接,主要包括用户管理、组件管理、程序数据包生成管理和权限管理等模块。
组件和移动应用管理后台主要用于存储组件和移动应用信息及其详情,为移动应用开放平台提供业务数据,主要包括组件管理后台、移动应用管理后台、业务服务后台和数据后台等部分。
组件源代码托管平台主要用于组件源代码存储和管理,组件源代码托管平台还可以作为一个独立闭环***进行使用,也可以通过其提供的外部接口进行源码下载等操作,其用户管理模块可以仅用于管理使用该组件源代码托管平台的用户。
组件包托管平台主要用于组件的依赖包的存储和管理用途,该部分可作为一个独立闭环***进行使用,也可以通过其提供的外部接口进行组件的依赖包下载等操作,其用户管理模块可以仅用于管理使用该组件包托管平台的用户。
程序数据包生成***主要用于程序数据包的自动化生成、工作流管理等用途,该部分可作为一个独立闭环***进行使用,也可以提供外部接口,组件和移动应用管理后台通过网络连接的方式调用程序数据包生成***提供的外部接口将构建参数传给程序数据包生成***,实现程序数据包的自动生成。
示例性的,移动应用开放平台的页面如图1B所示,该移动应用开放平台包括左侧菜单栏内功能模块,如:组件中心模块、应用中心模块、微程序中心模块、开发平台模块、管理平台模块和个人中心。
其中,组件中心模块可以展示***内存储的所有组件的列表,每个组件可以按卡片式布局进行排列用于展示组件内容,其中,组件内容包括但不限于:组件名称、组件类型、组件类别、组件版本、组件适用平台、组件开发 者、组件引用次数、组件支持横竖屏情况、组件支持默认分辨率和组件简要描述等。用户可以于当前页面进行组件收藏、组件详情查询和组件筛选等操作。
应用中心模块可以展示***已经构建成功的移动应用列表,展示内容包括:应用名称、应用类别、应用热度(应用下载数)、应用下载二维码、应用版本号、应用查询详情按钮和应用本地下载按钮等。电子设备还可以响应于查询操作,展示应用的详细信息,详细信息包括:应用名称、应用类别、应用热度(应用下载数)、应用下载二维码、应用版本号、应用发布时间、应用平台支持情况、应用截图、应用小视频、应用描述、应用管理人员、应用内组件列表、应用内微程序列表等。
微程序中心模块可以展示***内存储的所有微程序的信息,微程序与组件的区别在于,微程序基于跨平台技术设计,不同于组件定制化的客观情况,具有跨平台、轻量级、易于集成的特点。微程序中心模块与组件中心模块功能和页面类似,不再赘述。微程序的信息包括但不限于:微程序名、发布时间、微程序包体积情况、微程序场景类型、负责人、微程序支持横竖屏情况、微程序支持默认分辨率和微程序简要描述等。
开发平台模块主要包括三部分:组件管理模块、应用管理模块和微程序管理模块。
其中,组件管理模块,主要用于显示用户发布的、协同管理的和/或收藏的所有组件列表,组件管理模块提供新增组件的功能。组件的详细信息包括:组件名、组件发布时间、组件版本、组件类别、组件引用次数、组件状态和/或组件操作功能列表等。其中组件状态包括但不限于:待上架、已上架、已下架、不通过。
电子设备新增组件需要获取组件的基础信息,组件的基础信息包括组件名、组件版本号、组件适配平台、显示类型、组件默认分辨率、组件类别、组件源码存储路径、组件的数据包依赖路径、组件源码版本号、组件的数据包版本号、组件内部依赖情况、组件协同人列表、组件图片和相关小视频和组件详情等。然后,电子设备将该组件的基础信息通过网络接口调用的方式传递给组件和移动应用管理后台,该后台将会把获取的组件的基础信息发布于移动应用开放平台中。
应用管理模块提供展示应用信息功能以及创建应用的功能。应用信息包括:应用名称、应用发布时间、应用版本、应用类别、应用支持平台、应用状态、分辨率、显示类型和应用操作功能列表等。其中,应用状态包括但不 限于:已上架、未完成。
电子设备获取应用信息,并将应用信息通过网络接口调用的方式传递给组件和移动应用管理后台,后台***将会通过参数筛查、调用程序数据包生成***,将构建所需参数传给程序数据包生成***,***通过调用对应移动应用类型的预设的自动化构建脚本,生成应用程序的数据包,可选的,电子设备对生成的程序数据包进行构建和发布。
管理平台模块主要包括两部分:审核管理模块、用户管理模块。
***中用户权限可以分为:普通用户、开发者、管理员,权限依次递增。管理员可以查看并使用管理平台模块的所有功能。
审核管理模块主要用于显示全部组件、微程序所处状态,并可以对其进行相关审批操作,审批操作包括:详情查询、不通过、通过、删除、下架、重新上架和查看原因等。
用户管理模块可以用于显示全部用户详情和权限类型,并可以对其进行相关权限修改操作,修改操作包括:详情查询、编辑、删除、批量删除和添加用户等。
个人中心模块主要用于展示当前用户的个人详情内容,详情内容包括:账号、用户名、邮箱、机构组织、电话、头像。用户于此页面可以进行密码修改、信息更新和头像上传等功能。
人员与上述移动应用开放平台进行交互包括如下场景:
场景一:代码开发人员可以使用组件平台新增组件。新增组件主要分为三个阶段:开发阶段、组件打包阶段、组件平台登记阶段。代码开发人员将组件开发完成后,通过组件包托管平台将组件依赖的数据包上传,通过组件源代码托管平台将组件源代码上传,完成后进入组件平台登记阶段将组件其他详细信息、组件源代码地址、组件依赖的数据包地址通过移动应用开放平台-开发平台模块-组件管理模块-新增组件功能进行组件发布。
场景二:代码开发人员可以使用平台查找和使用组件。开发人员可以进行组件浏览、查看、详情依赖遍历等操作,对于可以进行复用使用的组件,开发人员可以通过查询到的详情进行组件的数据包整体复用或者源码下载后进行源代码修改的后续操作。
场景三:业务人员可以使用移动应用开放平台进行应用程序数据包的生成。业务人员可以输入应用程序的配置信息、根据配置信息查询组件、从显示的组件中选择组件,然后点击生成按钮以生成应用程序的数据包。可选的还可以在生成应用程序的数据包之后构建应用程序的安装包,并传输给移动 应用开放平台,将软件进行存储和发布,并生成发布二维码。
需要说明的是,以上仅仅为本公开实施例所提供的程序数据包生成方法所适用的***、组件的数据包管理以及程序数据包生成方法的操作平台的示例性说明,本公开实施例对组件的数据包管理、程序数据包生成方法所适用的***以及程序数据包生成方法的操作平台不进行限定。
如图2所示为本公开实施例所提供的一种程序数据包生成方法的流程图,适用于上述场景3,该方法可以应用于图1A所示的电子设备,图2所示的方法可以包括以下步骤:
S100:电子设备获取目标应用程序的配置信息。该配置信息包括目标应用程序适配的平台的标识。
在一种可能的实现方式中,首先,电子设备响应于对生成应用程序数据包的触发操作,展示配置页面。该配置页面包括占位符的输入控件和平台参数的输入控件。然后,电子设备响应于对配置页面中占位符的输入控件的预设操作,获取占位符对应的信息,将占位符对应的信息作为占位符的值。电子设备响应于对配置页面中平台参数的输入控件的预设操作,获取平台参数对应的信息,将平台参数对应的信息作为平台的标识。
示例性的,电子设备响应于对生成应用程序数据包的触发操作,展示如图3所示的配置页面,用户在该配置页面输入相应的配置信息,如图3中的应用工程名、应用类型、应用平台、应用类别、分辨率、显示类型等配置信息。电子设备响应于在配置页面的输入操作,获取目标应用程序的配置信息。其中,目标应用程序的配置信息包括占位符的值(如图3中应用工程名文本框中输入的内容),该占位符的值可以是目标应用程序的标识。应用类型,例如:单平台应用或跨平台应用等。应用所适配的平台标识(如图3中应用平台文本框中输入的内容),例如,安卓(android)平台、苹果(iOS)平台或微软(windows)平台等,显示类型,例如,横屏显示或竖屏显示等。
在另一种可能的实现方式中,电子设备获取包括配置信息的文件,电子设备解析该配置信息的文件得到目标应用程序的配置信息。
示例性的,电子设备响应于用户的文件上传操作,获取包括配置信息的文件,电子设备解析该配置信息的文件得到目标应用程序的配置信息。
S101:电子设备根据配置信息获取目标应用程序的目标组件的数据包;每个目标组件均适配于配置信息中平台的标识所表征的平台。
具体的,首先,电子设备确定与配置信息对应的候选组件;候选组件适 配于平台的标识所表征的平台;然后,电子设备响应于对候选组件中至少一个候选组件的预设操作,将与预设操作对应的至少一个候选组件的标识作为目标组件的标识。再然后,电子设备根据目标组件的标识,获取目标组件的数据包。电子设备中存储有组件的标识与组件的数据包的对应关系。
基于图3的示例,电子设备根据图3文本框中输入的配置信息,确定与配置信息对应的候选组件,用户在如图4A所示的候选组件的显示页面的选择框中勾选目标组件,或者,用户在如图4B所示的候选组件的显示页面的选择框中勾选目标组件,电子设备响应于对至少一个候选组件的选择操作,将选择操作对应的候选组件作为目标组件。然后,电子设备根据目标组件的标识从组件库中获取目标组件的标识对应的组件的数据包。组件库中包括组件的标识与组件的数据包的对应关系。
S102:电子设备调用预设的自动化构建脚本,根据配置信息和目标组件的数据包,生成目标应用程序的数据包。
可选的,配置信息包括占位符以及占位符对应的值。至少一个目标组件的数据包中包括配置信息中的占位符。
具体的,电子设备调用预设的自动化构建脚本,获取目标组件的类型,并根据配置信息和目标组件的类型确定不同类型的目标组件在目标应用程序的数据包中的位置。电子设备根据配置信息将至少一个目标组件的数据包中的占位符替换为占位符对应的值,得到目标应用程序的数据包。
本公开实施例中,电子设备可以根据获取的配置信息,并根据配置信息确定候选组件,然后从候选组件中获取目标组件,最终,根据目标组件以及预设的自动话构建脚本生成目标应用程序的数据包,这样,非开发人员在简单培训之后也可以根据本公开实施例所提供的程序数据包生成方法,在输入了目标应用程序的配置信息,并根据配置信息获取了目标组件之后生成目标应用程序,从而解决了传统开发模式下开发获取目标应用程序的数据包效率低下,开发周期长的问题。
后续,电子设备可以调用自动化构建脚本编译目标应用程序的数据包,得到目标应用程序的安装包。
示例性的,电子设备获取目标组件的类型,目标组件的类型可以是布局类型、服务类型或库类型等。电子设备根据目标组件的数据包的类型以及配置信息中平台的标识确定目标组件的数据包在目标应用程序的数据包中的位置。在目标组件的类型为前端布局(layout)类型且该目标应用程序适用的平 台为安卓平台的情况下,确定该目标组件的数据包在目标软件的数据包中布局所在的文件夹。假设,配置信息中包括目标应用程序的标识以及该目标应用程序的标识对应的占位符,那么,电子设备将至少一个目标组件中的目标应用程序的标识对应的占位符替换为目标应用程序的标识等。电子设备自动替换完目标组件的数据包中的占位符后,得到目标应用程序的数据包。
可选的,S103:电子设备基于预设的插件获取每个目标组件的标识,并基于每个目标组件的标识注册每个目标组件。
具体的,电子设备在打包目标应用程序的过程中,或者,在发布目标应用程序的过程中基于插件获取目标组件的标识,并基于每个目标组件的标识注册每个目标组件。其中,目标组件的注册信息包括目标组件的标识以及目标组件在目标应用程序中的适用范围。后续,电子设备在启动时可以根据目标组件的注册信息,生成目标组件的路由信息。目标组件的路由信息包括目标组件的标识对应的物理地址、第一目标组件可以被调用的其他目标组件。第一目标组件为目标组件中的任意一个目标组件,其他目标组件为除第一目标组件之外的目标组件。
在一个例子中,电子设备打包或发布后的目标应用程序的架构如图5A所示,图5A所示的目标应用程序包括业务模块层501、独立服务层502、容器层503、框架层504、基础服务层505和用户界面层506,其中,业务模块层501包括业务组件和/或复合业务组件,在目标应用程序为移动软件的情况下,业务模块层501对应移动应用开放平台中的“业务组件”类别;容器层503对应移动应用开放平台中的“基础组件”类别,并默认依赖于应用软件内部;独立服务层502对应移动应用开放平台中的“服务组件”类别;框架层504对应移动应用开放平台中的“基础组件”类别;基础服务层505对应移动应用开放平台中的“基础组件”类别;用户界面层506对应移动应用开放平台中的“业务组件”类别。上述电子设备在启动时根据目标组件的注册信息,生成的目标组件间的路由信息可以存储在容器层的路由管理模块。
后续,电子设备在启动目标应用程序之后,则根据目标组件的标识生成目标应用程序的组件间路由信息,组件间路由信息包括组件的标识与地址的对应关系。组件间的消息传递可以根据组件间路由信息来完成。
基于上述图4A的示例,假设,目标组件包括组件1~组件10,那么,电子设备生成的目标应用程序在启动之后展示的首页如图5B所示。该首页中包括门禁管理、车辆管理、访客管理、园区管理和设备管理等。需要说明的是,本公开实施例提供的程序数据包生成方法也可以生成如门禁管理、车辆管理、 访客管理、园区管理或设备管理等复合业务组件的数据包。复合业务组件包括至少一个组件。本公开实施例对此不进行限定。
以安卓平台中的软件(简称安卓软件)为例,通常,安卓软件中组件间的组件调用请求分为:调用页面、调用服务、获取数据、传递消息这4种类型的调用请求,因此,通过统一的组件化平台规范和总线路由通讯组件的设计方式,能够实现这四种调用请求的组件间传递,以实现组件间解耦的目的。
在调用请求为调用页面的情况下,一般为布局(Fragment)或活动(Activity)进行管理,插件可以为注解处理器(annotation processing tool,APT)插件,APT插件扫描并抽取目标组件对应标签信息(如:(@PAGE)),并将该调用页面类信息中的组件标识注册至路由管理模块(又称:总线路由组件),使用时则通过直接实例化返回组件标识所表征的该布局的实体类或活动的实体类。
在调用请求为调用服务的情况下,服务组件的启动机制基于安卓的内容提供者(ContentProvider),首先,电子设备通过APT插件注解抽取的方式,形成目标组件的服务表,并注册在路由管理模块;这样,当有对应服务的注解(即目标组件的标识)被使用时,电子设备根据服务提供者(ServiceProvider)模板,自动生成对应注解为@Service中方法名+ServiceProvider为整体命名的服务实体类,其内部则具有启动服务表中服务的相应功能并将提供者组件的信息自动在组件的manifest.xml中进行注册,声明对应的提供者的节点信息(又称地址);最后,当组件A通过路由组件启动服务B的API时,电子设备的路由管理模块则会通过封装对应内容提供者的使用达到调用该服务信息方法的目的。
假设,上述打包发布的目标应用程序为基于安卓(Android)的移动软件,该目标应用程序将业务组件封装于容器层,并通过总线路由机制进行数据通信。目标应用程序通过总线路由机制调用底层基础服务、平台框架和平台应用组件内容等。示例性的,本公开实施例中组件间路由管理***60如图5C所示。路由管理***包括组件自动注册插件601、组件路由信息管理模块602、总线模块603和路由模块604。其中,组件自动注册插件601用于在目标应用程序编译过程中扫描目标应用程序中目标父类的子类组件信息。子类组件继承了目标父类的通用接口。组件自动注册插件601将抽取的组件信息发送给组件路由信息管理模块602,组件信息用于组件路由信息管理模块注册组件。路由模块604在目标应用程序启动时从组件路由信息管理模块602获取符合授权策略的授权组件信息,并为每个授权组件(即可以通过路由模块发现的 组件)生成该组件的路由信息(示例性的,为每个组件生成该组件对应的实例)。总线模块603用于传输组件间的消息。图5C中组件A通过总线模块603向路由模块604发送调用请求,路由模块604中的路由管理模块接收到调用请求后通过判断该请求为“页面请求”或“服务请求”以确定组建A的调用请求所请求的组件B的实例,并将组件A的调用请求传递给组件B的实例,组件B的实例完成组件A的调用请求后,通过相同链路将回调信息返还组件A完成本次总线事件的全部流程。
如图6所示为本公开实施例所提供的一种自动生成的软件中组件间消息传递的方法的流程图,该方法可以应用于图1A所示的电子设备,图6所示的方法可以包括以下步骤:
S200:电子设备响应于目标指令,在第一组件中生成调用请求。调用请求用于请求第二组件执行目标任务。调用请求包括第一组件的标识以及第二组件的标识。第一组件和第二组件均为目标应用程序中的组件。
需要说明的是,本公开实施例对目标指令的触发方式不进行限定,在一种可能的实现方式中,电子设备响应于对目标应用程序的第一组件的目标操作,该目标操作向电子设备发送的指令即为目标指令。在另一种可能的实现方式中,电子设备在运行目标应用程序中第一组件的过程中,生成目标指令。
可选的,调用请求包括通用消息对象,通用消息对象中包括第二组件的标识。该通用消息对象是根据消息构造器得到的。
示例性的,通用消息对象的结构为:
Public class Bmessage implements serializable{
Int intentflag;
Weakreference<context>mContextReference;
String my componentname;
Boolean issettimeout=true;
Int mtimeout=0;
Actiontype mactiontype=actiontype.service;
String mactionname;
Boolean ishaveglobalinterceptor=false;
Map<string,object>mparams=new hashmap<>();
Map<string,string>mheaders=new hashmap<>();
Weakreference<activity>autocancel0nactivitydestroy;
Weakreference<fragment>autocancel0n fragment destroy;
String Mmessageid;
Callback mcallback;
Bmessage(string componentName){this.mcomponentName=componentName;}
}
示例性的,消息构造器包括如下方法:
obtainBuilder(String componentName):该方法中所填的是组件名称(ComponentName),需要在构造消息对象的第一时间填入该组件名称。
setContext(Context context):该方法是在构造通用消息的时候调用setContext()方法,需要传入上下文Context。
setActionType(ActionType actionType):该方法用于设置消息类型(或者说操作的类型,包含了PAGE(页面)、Service(服务)以及CUSTOM(自定义消息)三种类型。
setActionName(String actionName):该方法用于设置要执行操作的字符串标识,此处的字符串标识,对应的是@Page、@Service注解中填入的值。即目标组件的标识。
setTimeOut(int timeOut):该方法用于设置过期时间。
setFlag(int intentFlag):该方法用于为路由模块来区分页面跳转方式。
addParam(String key,@NonNull Object value):该方法中key为String类型,value为Object类型,用于通过消息进行参数传递,value不能为空。且当使用了另外一个setParams()方法的话,使用此方法添加的参数将被清空。
setParams(Map<String,Object>params):该方法用于设置Map类型的参数集合。
setCallback(Callback callback):该方法用于设置回调,当需要结果回传时,设置此回调。
setAutoCancelOnActivityDestroy(Activity activity):该方法用于指示是否与Activity进行生命周期绑定,传入需绑定的Activity,默认可以不设置。
setAutoCancelOnFragmentDestroy(Fragment fragment):该方法用于指示是否与Fragment进行生命周期绑定,传入需绑定的Fragment,默认可以不设置。
build():该方法用于构建消息对象,调用此方法则代表开始构建消息对象。
S201:电子设备根据路由信息中第二组件的标识对应的地址,定位至第二组件,并执行目标任务得到响应结果;响应结果包括第一组件的标识。
可选的,响应结果也可以为上述消息构造器构造得到的通用消息对象。
S202:电子设备根据路由信息中第一组件的标识对应的地址,将响应结果回调至第一组件。
具体的,电子设备可以按照调用请求的路线逆向将响应结果发送给第一组件。
上述主要从方法的角度对本公开实施例提供的方案进行了介绍。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本公开能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本公开实施例可以根据上述方法示例对上述实施例中的电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本公开实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
如图7所示,为本公开实施例提供的一种程序数据包生成装置70的结构图。程序数据包生成装置70包括第一获取模块701、第二获取模块702和生成模块703,第一获取模块701用于获取目标应用程序的配置信息;配置信息包括目标应用程序适配的平台的标识;第二获取模块702,用于根据配置信息获取目标应用程序的目标组件的数据包;每个目标组件均适配于该平台;生成模块703,用于调用预设的自动化构建脚本,根据配置信息和目标组件的数据包,生成目标应用程序的数据包。例如,结合图2,第一获取模块701可以用于执行S100,第二获取模块702可以用于执行S101,生成模块703可以用于执行S102。
可选的,第二获取模块702具体用于:确定与配置信息对应的候选组件;候选组件适配于该平台;响应于对候选组件中至少一个候选组件的第一预设操作,将与第一预设操作对应的至少一个候选组件的标识作为目标组件的标识;根据目标组件的标识,获取目标组件的数据包。
可选的,上述配置信息中包括占位符以及占位符对应的值;至少一个目标组件的数据包中包括占位符;生成模块703具体用于:调用预设的自动化构建脚本,获取目标组件的类型,并根据配置信息和目标组件的类型确定不同类型的目标组件在目标应用程序的数据包中的位置;根据配置信息将至少一个目标组件的数据包中的占位符替换为占位符对应的值,得到目标应用程序的数据包。
可选的,第一获取模块701具体用于:响应于对生成应用程序数据包的触发操作,展示配置页面;配置页面包括占位符的输入控件和平台参数的输入控件;响应于对配置页面中占位符的输入控件的第二预设操作,获取占位符对应的信息,将占位符对应的信息作为占位符的值;响应于对配置页面中平台参数的输入控件的第三预设操作,获取平台参数对应的信息,将平台参数对应的信息作为平台的标识。
可选的,程序数据包生成装置还包括:注册模块704,用于基于预设的插件获取每个目标组件的标识,并基于每个目标组件的标识注册每个目标组件。
可选的,目标应用程序包括第一组件和第二组件。第一组件和第二组件均继承于相同的父类。第一组件通过调用请求调用第二组件以执行目标任务。该调用请求包括第一组件的标识和第二组件的标识。目标应用程序中包括组件间路由信息。组件间路由信息包括第一关系和第二关系。第一关系为第一组件的标识与第一组件的地址的对应关系。第二关系为第二组件的标识与第二组件的地址的对应关系,第二关系用于将调用请求定位至第二组件以执行目标任务。第一关系用于将目标任务的执行结果回调至第一组件。
可选的,上述调用请求包括通用消息对象;通用消息对象中包括第二组件的标识;通用消息对象是根据消息构造器得到的。
在一个示例中,参见图1A,上述第一获取模块701和第二获取模块702的接收功能可以由图1A中的接口单元104实现。上述第一获取模块701的处理功能、第二获取模块702的处理功能、生成模块703以及注册模块704可以由图1A中的处理器101调用存储器102中存储的计算机程序实现。
关于上述可选方式的具体描述参见前述的方法实施例,此处不再赘述。此外,上述提供的任一种程序数据包生成装置70的解释以及有益效果的描述均可参考上述对应的方法实施例,不再赘述。
需要说明的是,上述各个模块对应执行的动作仅是具体举例,各个单元 实际执行的动作参照上述基于图2、图6所述的实施例的描述中提及的动作或步骤。
本公开的一些实施例提供了一种计算机可读存储介质(例如,非暂态计算机可读存储介质),该计算机可读存储介质中存储有计算机程序指令,计算机程序指令在处理器上运行时,使得处理器执行如上述实施例中任一实施例所述的程序数据包生成方法中的一个或多个步骤。
示例性的,上述计算机可读存储介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,CD(Compact Disk,压缩盘)、DVD(Digital Versatile Disk,数字通用盘)等),智能卡和闪存器件(例如,EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、卡、棒或钥匙驱动器等)。本公开描述的各种计算机可读存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读存储介质。术语“机器可读存储介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
本公开的一些实施例还提供了一种计算机程序产品。该计算机程序产品包括计算机程序指令,在计算机上执行该计算机程序指令时,该计算机程序指令使计算机执行如上述实施例所述的程序数据包生成方法中的一个或多个步骤。
本公开的一些实施例还提供了一种计算机程序。当该计算机程序在计算机上执行时,该计算机程序使计算机执行如上述实施例所述的程序数据包生成方法中的一个或多个步骤。
上述计算机可读存储介质、计算机程序产品及计算机程序的有益效果和上述一些实施例所述的程序数据包生成方法的有益效果相同,此处不再赘述。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。

Claims (17)

  1. 一种程序数据包生成方法,所述方法包括:
    获取目标应用程序的配置信息;所述配置信息包括所述目标应用程序适配的平台的标识;
    根据所述配置信息获取所述目标应用程序的目标组件的数据包;每个目标组件均适配于所述平台;
    调用预设的自动化构建脚本,根据所述配置信息和所述目标组件的数据包,生成所述目标应用程序的数据包。
  2. 根据权利要求1所述的方法,所述根据所述配置信息获取所述目标应用程序的目标组件的数据包,包括:
    确定与所述配置信息对应的候选组件;所述候选组件适配于所述平台;
    响应于对所述候选组件中至少一个候选组件的第一预设操作,将与所述第一预设操作对应的所述至少一个候选组件的标识作为所述目标组件的标识;
    根据所述目标组件的标识,获取所述目标组件的数据包。
  3. 根据权利要求1或2所述的方法,所述配置信息中包括占位符以及所述占位符对应的值;至少一个目标组件的数据包中包括所述占位符;所述调用预设的自动化构建脚本,根据所述配置信息和所述目标组件的数据包,生成所述目标应用程序的数据包,包括:
    调用预设的自动化构建脚本,获取所述目标组件的类型,并根据所述配置信息和所述目标组件的类型确定不同类型的目标组件在所述目标应用程序的数据包中的位置;
    根据所述配置信息将所述至少一个目标组件的数据包中的占位符替换为所述占位符对应的值,得到所述目标应用程序的数据包。
  4. 根据权利要求3所述的方法,所述获取目标应用程序的配置信息,包括:
    响应于对生成应用程序数据包的触发操作,展示配置页面;所述配置页面包括所述占位符的输入控件和平台参数的输入控件;
    响应于对所述配置页面中所述占位符的输入控件的第二预设操作,获取所述占位符对应的信息,将所述占位符对应的信息作为所述占位符的值;
    响应于对所述配置页面中所述平台参数的输入控件的第三预设操作,获取所述平台参数对应的信息,将所述平台参数对应的信息作为所述平台的标识。
  5. 根据权利要求1、2或4任一项所述的方法,所述方法还包括:
    基于预设的插件获取每个目标组件的标识,并基于所述每个目标组件的标识注册所述每个目标组件。
  6. 根据权利要求5所述的方法,所述目标应用程序包括第一组件和第二组件;所述第一组件和所述第二组件均继承于相同的父类;所述第一组件通过调用请求调用所述第二组件以执行目标任务;所述调用请求包括所述第一组件的标识和所述第二组件的标识;
    所述目标应用程序中包括组件间路由信息;所述组件间路由信息包括第一关系和第二关系;所述第一关系为所述第一组件的标识与所述第一组件的地址的对应关系;所述第二关系为所述第二组件的标识与所述第二组件的地址的对应关系;所述第二关系用于将所述调用请求定位至所述第二组件以执行所述目标任务;所述第一关系用于将所述目标任务的执行结果回调至所述第一组件。
  7. 根据权利要求6所述的方法,所述调用请求包括通用消息对象;所述通用消息对象中包括所述第二组件的标识;所述通用消息对象是根据消息构造器得到的。
  8. 一种程序数据包生成装置,包括:
    第一获取模块,用于获取目标应用程序的配置信息;所述配置信息包括所述目标应用程序适配的平台的标识;
    第二获取模块,用于根据所述配置信息获取所述目标应用程序的目标组件的数据包;每个目标组件均适配于所述平台;
    生成模块,用于调用预设的自动化构建脚本,根据所述配置信息和所述目标组件的数据包,生成所述目标应用程序的数据包。
  9. 根据权利要求8所述的装置,所述第二获取模块具体用于:
    确定与所述配置信息对应的候选组件;所述候选组件适配于所述平台;
    响应于对所述候选组件中至少一个候选组件的第一预设操作,将与所述第一预设操作对应的所述至少一个候选组件的标识作为所述目标组件的标 识;
    根据所述目标组件的标识,获取所述目标组件的数据包。
  10. 根据权利要求8或9所述的装置,所述配置信息中包括占位符以及所述占位符对应的值;至少一个目标组件的数据包中包括所述占位符;
    所述生成模块具体用于:调用预设的自动化构建脚本,获取所述目标组件的类型,并根据所述配置信息和所述目标组件的类型确定不同类型的目标组件在所述目标应用程序的数据包中的位置;根据所述配置信息将所述至少一个目标组件的数据包中的占位符替换为所述占位符对应的值,得到所述目标应用程序的数据包。
  11. 根据权利要求10所述的装置,所述第一获取模块具体用于:
    响应于对生成应用程序数据包的触发操作,展示配置页面;所述配置页面包括所述占位符的输入控件和平台参数的输入控件;
    响应于对所述配置页面中所述占位符的输入控件的第二预设操作,获取所述占位符对应的信息,将所述占位符对应的信息作为所述占位符的值;
    响应于对所述配置页面中所述平台参数的输入控件的第三预设操作,获取所述平台参数对应的信息,将所述平台参数对应的信息作为所述平台的标识。
  12. 根据权利要求8、9或11任一项所述的装置,所述程序数据包生成装置还包括:注册模块,用于基于预设的插件获取每个目标组件的标识,并基于所述每个目标组件的标识注册所述每个目标组件。
  13. 根据权利要求12所述的装置,所述目标应用程序包括第一组件和第二组件;所述第一组件和所述第二组件均继承于相同的父类;所述第一组件通过调用请求调用所述第二组件以执行目标任务;所述调用请求包括所述第一组件的标识和所述第二组件的标识;
    所述目标应用程序中包括组件间路由信息;所述组件间路由信息包括第一关系和第二关系;所述第一关系为所述第一组件的标识与所述第一组件的地址的对应关系;所述第二关系为所述第二组件的标识与所述第二组件的地址的对应关系;所述第二关系用于将所述调用请求定位至所述第二组件以执行所述目标任务;所述第一关系用于将所述目标任务的执行结果回调至所述第一组件。
  14. 根据权利要求13所述的装置,所述调用请求包括通用消息对象;所述通用消息对象中包括所述第二组件的标识;所述通用消息对象是根据消息构造器得到的。
  15. 一种电子设备,其特征在于,包括:
    处理器和用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述可执行指令,以实现如权利要求1-7任一项所述的程序数据包生成方法。
  16. 一种计算机可读存储介质,其特征在于,当所述计算机可读存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如权利要求1-7任一项所述的程序数据包生成方法。
  17. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机指令,当所述计算机指令在计算机设备上运行时,使得所述计算机设备执行如权利要求1-7任一项所述的程序数据包生成方法。
PCT/CN2021/084159 2021-03-30 2021-03-30 程序数据包生成方法、装置、设备及存储介质 WO2022205013A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180000660.8A CN115485657A (zh) 2021-03-30 2021-03-30 程序数据包生成方法、装置、设备及存储介质
PCT/CN2021/084159 WO2022205013A1 (zh) 2021-03-30 2021-03-30 程序数据包生成方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/084159 WO2022205013A1 (zh) 2021-03-30 2021-03-30 程序数据包生成方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022205013A1 true WO2022205013A1 (zh) 2022-10-06

Family

ID=83455474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084159 WO2022205013A1 (zh) 2021-03-30 2021-03-30 程序数据包生成方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN115485657A (zh)
WO (1) WO2022205013A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647032A (zh) * 2018-03-29 2018-10-12 珠海市魅族科技有限公司 应用加载方法及装置、计算机装置和计算机可读存储介质
CN110580147A (zh) * 2018-06-07 2019-12-17 阿里巴巴集团控股有限公司 一种应用程序的开发方法和装置
US10528457B2 (en) * 2018-01-30 2020-01-07 Compuware Corporation Automated unit testing in a mainframe environment
CN111639019A (zh) * 2020-04-24 2020-09-08 北京五八信息技术有限公司 代码测试方法、装置及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10528457B2 (en) * 2018-01-30 2020-01-07 Compuware Corporation Automated unit testing in a mainframe environment
CN108647032A (zh) * 2018-03-29 2018-10-12 珠海市魅族科技有限公司 应用加载方法及装置、计算机装置和计算机可读存储介质
CN110580147A (zh) * 2018-06-07 2019-12-17 阿里巴巴集团控股有限公司 一种应用程序的开发方法和装置
CN111639019A (zh) * 2020-04-24 2020-09-08 北京五八信息技术有限公司 代码测试方法、装置及可读存储介质

Also Published As

Publication number Publication date
CN115485657A (zh) 2022-12-16

Similar Documents

Publication Publication Date Title
CN109885311B (zh) 一种应用程序的生成方法及设备
JP6741721B2 (ja) メッセンジャーを利用した決裁方法およびシステム
Meier Professional Android 4 application development
CN109918055B (zh) 一种应用程序的生成方法及设备
US9367371B2 (en) Widget framework, real-time service orchestration, and real-time resource aggregation
US20120233589A1 (en) Software development kit for blended services
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
Blobel Application of the component paradigm for analysis and design of advanced health system architectures
US20120233588A1 (en) Blended service creation, test, and deployment environment for multiple service endpoints
Pinto et al. Specifying aspect-oriented architectures in AO-ADL
US20240069877A1 (en) Method and device for generating application based on android system, and storage medium
Puder et al. Exposing native device APIs to web apps
CN111507676A (zh) 业务订单流程创建和实现方法、装置、存储介质和***
CN107463406A (zh) 发布移动应用的方法和电子设备
WO2022205013A1 (zh) 程序数据包生成方法、装置、设备及存储介质
Gonidis et al. A development framework enabling the design of service-based cloud applications
Jaygarl et al. Professional Tizen Application Development
US8656293B1 (en) Configuring mobile devices
Bueno et al. Quarkus Cookbook
CN114253546A (zh) 代码的生成方法、装置、存储介质及电子装置
Srinivasmurthy et al. Web2exchange: A model-based service transformation and integration environment
Charalampidis et al. A flexible Compilation-as-a-Service and Remote-Programming-as-a-Service platform for IoT devices
CN116991380B (zh) 一种应用程序的构建方法、装置、电子设备及存储介质
Mahmoud Developing Middleware in Java EE 8: Build robust middleware solutions using the latest technologies and trends
Zhai et al. An end-user oriented tool suite for development of mobile applications

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21933693

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 14/02/2024)