WO2021103936A1 - 程序包部署的方法、装置、终端设备和存储介质 - Google Patents

程序包部署的方法、装置、终端设备和存储介质 Download PDF

Info

Publication number
WO2021103936A1
WO2021103936A1 PCT/CN2020/125519 CN2020125519W WO2021103936A1 WO 2021103936 A1 WO2021103936 A1 WO 2021103936A1 CN 2020125519 W CN2020125519 W CN 2020125519W WO 2021103936 A1 WO2021103936 A1 WO 2021103936A1
Authority
WO
WIPO (PCT)
Prior art keywords
program package
devices
deployment
program
package
Prior art date
Application number
PCT/CN2020/125519
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 EP20891504.1A priority Critical patent/EP4047475A4/en
Publication of WO2021103936A1 publication Critical patent/WO2021103936A1/zh
Priority to US17/825,897 priority patent/US20220283795A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Definitions

  • This application belongs to the field of computer technology, and in particular relates to a method, device, terminal device, and storage medium for program package deployment.
  • an APP may compile multiple program packages to adapt to different devices.
  • a certain APP supports mobile phones, Pads, and large-screen TVs at the same time.
  • debugging it is necessary to compile three kinds of packages to adapt to the three kinds of devices.
  • IDE Integrated Development Environment
  • IDE is an application program used to provide a program development environment, which generally includes tools such as a code editor, a compiler, a debugger, and a graphical user interface, and integrates integrated development functions such as code writing, code compilation, and code debugging.
  • the terminal-side IDEs mainly include Android Studio and XCode.
  • these IDEs can only deploy the program package to a single device via USB connection or Wifi at a time.
  • the APP requires multiple devices to participate in debugging at the same time, the operation of the program package deployment is difficult and the deployment efficiency is low.
  • the embodiments of the present application provide a method, apparatus, terminal device, and storage medium for program package deployment, which can deploy program packages to multiple different devices at the same time, effectively improving the efficiency of program package deployment.
  • an embodiment of the present application provides a method for program package deployment, including:
  • the built IDE tool can register and connect multiple different devices each time, and for the multiple registered devices, find the package that each device is adapted to, and then distribute and deploy the found package In the corresponding devices, the program package can be deployed to multiple different devices at the same time, which effectively improves the efficiency of program package deployment.
  • the registration operation of the multiple devices may include:
  • the received status information is displayed on the device list interface of the IDE tool to complete the registration operation.
  • Multiple different devices can establish a communication connection with the IDE tool constructed in this application in a wired or wireless manner, and then, through the IDE tool, the status information of each of the multiple devices, such as the name and model of the device, can be respectively received , Whether it is normal, whether the program package has been accepted and other information. Finally, the received status information can be displayed on the device list interface of the IDE tool, so that the debugger can visually discover the relevant information of each device participating in the deployment and debugging of the package. In addition, record the registration information of each device to complete the registration operation.
  • the status information of each different device can be distinguished by different icons, colors, and fonts, and displayed in the device list interface in a preset arrangement, and the status information can also be stored in a designated database , To record the relevant equipment information of the package deployment and debugging.
  • the distributing and deploying the found program package to the corresponding device may include:
  • judging whether any one of the multiple devices meets preset program package distribution and deployment conditions may include:
  • the program package corresponding to the device identification code is found from the storage path, and the state information of the target device is normal, it is determined that the target device satisfies the program package distribution and deployment conditions;
  • the program package corresponding to the device identification code is not found in the storage path, or the status information of the target device is an abnormal state, it is determined that the target device does not meet the program package distribution and deployment conditions.
  • the distributing and deploying the program package adapted to the first device to the corresponding first device may include:
  • At least one device is selected from the first device, and an adapted program package is distributed and deployed for the selected at least one device.
  • a "one-click distribution" operation button can be set, and the user only needs to click the button to distribute and deploy the corresponding program package for all devices that meet the package distribution and deployment conditions. Or, the user can select one or more devices that meet the requirements for the distribution and deployment of the program package, and distribute and deploy the corresponding program package for the selected device. Through this setting, the distribution and deployment of the program package can be completed flexibly and conveniently.
  • the found program package after distributing and deploying the found program package to the corresponding device, it may further include:
  • the result of the debugging operation is added to the device list interface of the IDE tool.
  • the received debugging operation result can be added to the device list interface of the IDE tool.
  • an apparatus for program package deployment including:
  • the program package search module is used to search for a program package adapted to each of the multiple devices for multiple registered devices, wherein the registration operation of the multiple devices is through a pre-built integrated development environment Completed by IDE tools;
  • the program package deployment module is used to distribute and deploy the found program package to corresponding devices, and the corresponding devices are devices among the multiple devices.
  • the device for deploying the program package may further include:
  • a communication establishment module configured to establish a communication connection with the multiple devices through the IDE tool
  • the status information receiving module is configured to receive the status information of each of the multiple devices after the communication connection is successfully established
  • the status information display module is used to display the received status information on the device list interface of the IDE tool to complete the registration operation.
  • program package deployment module may include:
  • the condition determining unit is configured to separately determine whether each of the multiple devices meets the preset program package distribution and deployment conditions
  • the program package deployment unit is configured to distribute and deploy the program package adapted to the first device to the corresponding first device for the first device that meets the program package distribution and deployment conditions among the multiple devices.
  • condition judgment unit may include:
  • the device identification code obtaining subunit is used to obtain the device identification code of the target device, where the target device is any one of the multiple devices;
  • the program package search subunit is used to search for the program package corresponding to the device identification code from the designated storage path;
  • the first determination subunit is configured to determine that the target device satisfies the program if the program package corresponding to the device identification code is found from the storage path, and the state information of the target device is normal.
  • Package distribution and deployment conditions
  • the second determination subunit is configured to determine that if the program package corresponding to the device identification code is not found in the storage path, or the status information of the target device is an abnormal state, then determine that the target device does not satisfy all requirements.
  • the deployment conditions for the package distribution are described.
  • program package deployment module may also include:
  • the prompt information output unit is configured to add, in the device list interface, the icon of the second device with a flag indicating that the program package deployment failed for the second device that does not meet the program package distribution and deployment conditions among the multiple devices , And output the preset prompt information.
  • program package deployment unit may include:
  • the first program package deployment subunit is configured to distribute and deploy adapted program packages to all first devices if the first operation instruction is received;
  • the second program package deployment subunit is configured to, if a second operation instruction is received, select at least one device from the first device, and distribute and deploy an adapted program package to the selected at least one device.
  • the device for deploying the program package may further include:
  • the operation result receiving module is configured to respectively receive the debugging operation results of the respective deployed program packages by each of the devices;
  • the running result adding module is used to add the debugging running result to the device list interface of the IDE tool.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, The method for program package deployment as proposed in the first aspect of the embodiments of the present application is implemented.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements what is proposed in the first aspect of the embodiment of the present application.
  • the method of package deployment is a third aspect.
  • the embodiments of the present application provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the method for program package deployment described in any one of the above-mentioned first aspects.
  • the embodiment of the present application has the beneficial effect that the program package can be deployed to multiple different devices at the same time, thereby reducing the operational difficulty of program package deployment when multiple devices participate in debugging at the same time, and improving the cost of program package deployment. Efficiency and reliability, with strong ease of use and practicality.
  • FIG. 1 is a schematic diagram of the hardware structure of a mobile phone to which the method for program package deployment provided by an embodiment of the present application is applicable;
  • Figure 2 is a software system architecture diagram of an IDE tool constructed by an embodiment of the present application
  • FIG. 3 is a flowchart of a method for program package deployment provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of another method for program package deployment provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a specific implementation of step 405 in FIG. 4;
  • FIG. 6 is a flowchart of a specific implementation of step 4051 in FIG. 5;
  • FIG. 7 is a flowchart of a specific implementation of step 4052 in FIG. 5;
  • FIG. 8 is a schematic diagram of an actual application scenario of the method for program package deployment provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another practical application scenario of the method for program package deployment provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another actual application scenario of the method for program package deployment provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of the device list interface of the IDE tool in the actual application scenario shown in FIG. 10;
  • FIG. 12 is a structural diagram of an embodiment of an apparatus for program package deployment provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • the method for deploying program packages provided in the embodiments of this application can be applied to mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and ultra mobile devices.
  • AR augmented reality
  • VR virtual reality
  • terminal devices or servers such as ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (PDAs)
  • UMPC ultra-mobile personal computers
  • PDAs personal digital assistants
  • the terminal device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a wireless local loop (Wireless Local Loop, WLL) station, Personal Digital Assistant (PDA) devices, handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, car networking terminals, computers, laptop computers, handheld communication devices , Handheld computing devices, satellite wireless devices, wireless modem cards, TV set top boxes (STB), customer premise equipment (customer premise equipment, CPE), and/or other devices used to communicate on wireless systems, and download
  • a first-generation communication system for example, a mobile terminal in a 5G network or a mobile terminal in a public land mobile network (PLMN) network that will evolve in the future.
  • PLMN public land mobile network
  • the wearable device can also be a general term for using wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, Watches, clothing and shoes, etc.
  • a wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories.
  • Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized, complete or partial functions that can be implemented without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to be used in conjunction with other devices such as smart phones. , Such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
  • Fig. 1 shows a block diagram of a part of the structure of a mobile phone provided in an embodiment of the present application.
  • the mobile phone includes: a radio frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a wireless fidelity (WiFi) module 170, and a processor 180 , And power supply 190 and other components.
  • RF radio frequency
  • the structure of the mobile phone shown in FIG. 1 does not constitute a limitation on the mobile phone, and may include more or fewer components than those shown in the figure, or a combination of some components, or different component arrangements.
  • the RF circuit 110 can be used for receiving and sending signals during the process of sending and receiving information or talking. In particular, after receiving the downlink information of the base station, it is processed by the processor 180; in addition, the designed uplink data is sent to the base station.
  • the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • the RF circuit 110 can also communicate with the network and other devices through wireless communication.
  • the above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), Email, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile Communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • Email Short Messaging Service
  • the memory 120 may be used to store software programs and modules.
  • the processor 180 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
  • the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 130 may be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the mobile phone 100.
  • the input unit 130 may include a touch panel 131 and other input devices 132.
  • the touch panel 131 also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 180, and can receive and execute the commands sent by the processor 180.
  • the touch panel 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 130 may also include other input devices 132.
  • the other input device 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
  • the display unit 140 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of the touch event, and then the processor 180 responds to the touch event. The type provides corresponding visual output on the display panel 141.
  • the touch panel 131 and the display panel 141 are used as two independent components to implement the input and input functions of the mobile phone, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated Realize the input and output functions of the mobile phone.
  • the mobile phone 100 may also include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor can include an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light.
  • the proximity sensor can close the display panel 141 and/or when the mobile phone is moved to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when it is stationary.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone.
  • the audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, and the audio circuit 160 After being received, it is converted into audio data, and then processed by the audio data output processor 180, and then sent to, for example, another mobile phone via the RF circuit 110, or the audio data is output to the memory 120 for further processing.
  • WiFi is a short-distance wireless transmission technology.
  • the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 170. It provides users with wireless broadband Internet access.
  • FIG. 1 shows the WiFi module 170, it is understandable that it is not a necessary component of the mobile phone 100, and can be omitted as needed without changing the essence of the invention.
  • the processor 180 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120. Various functions and processing data of the mobile phone can be used to monitor the mobile phone as a whole.
  • the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 180.
  • the mobile phone 100 also includes a power source 190 (such as a battery) for supplying power to various components.
  • a power source 190 such as a battery
  • the power source may be logically connected to the processor 180 through a power management system, so that functions such as charging, discharging, and power consumption management can be managed through the power management system.
  • the mobile phone 100 may also include a camera.
  • the position of the camera on the mobile phone 100 may be front-mounted or rear-mounted, which is not limited in the embodiment of the present application.
  • the mobile phone 100 may include a single camera, a dual camera, or a triple camera, etc., which is not limited in the embodiment of the present application.
  • the mobile phone 100 may include three cameras, of which one is a main camera, one is a wide-angle camera, and one is a telephoto camera.
  • the multiple cameras may be all front-mounted, or all rear-mounted, or partly front-mounted and some rear-mounted, which is not limited in the embodiment of the present application.
  • the mobile phone 100 may also include a Bluetooth module, etc., which will not be repeated here.
  • IDE is an application program used to provide a program development environment, which generally includes tools such as a code editor, a compiler, a debugger, and a graphical user interface, and integrates integrated development functions such as code writing, code compilation, and code debugging.
  • tools such as a code editor, a compiler, a debugger, and a graphical user interface
  • integrated development functions such as code writing, code compilation, and code debugging.
  • popular terminal-side IDEs include Google’s Android Studio and Apple’s XCode. These two tools can only distribute (deploy and install) debugging packages to mobile phones and other devices via USB connection or Wifi from a single device.
  • this application proposes a cross-device scenario APP design, development, construction, and release functions IDE.
  • APP can be adapted to run on multiple devices, making developers' development activities simpler and more efficient, and reducing later operating costs.
  • an APP may compile multiple program packages to adapt to different devices.
  • the application in the current code project supports mobile phones, Pads, and large-screen TVs at the same time.
  • debugging it is necessary to compile three program installation packages to adapt to the three devices.
  • a mechanism is needed in the IDE that can support the identification of currently available debugging devices during the development and debugging process, and distribute and deploy the executable packages to the matching debugging devices to complete the running and debugging of multi-device distributed scenes.
  • the IDE proposed in this application has this mechanism.
  • FIG. 2 shows a software system architecture diagram of an IDE tool constructed by an embodiment of the present application.
  • system architecture diagram
  • the package distribution module is responsible for completing the distribution (deployment and installation) of the package to each end-side device according to the information provided by project management and compilation and construction.
  • the module can specifically include three functional units: device network configuration, path analysis, and package distribution. They are used to set up the network between devices, analyze the storage path of the program package, and perform functions such as the distribution and deployment of the program package.
  • the project management module is responsible for maintaining and providing the relevant information of the code directory adaptation device; the UI design module is responsible for completing the UI interface design of the IDE tool; the code editing module provides the function of code development and editing; the compilation building module can be compiled and generated according to the Gradle settings.
  • the distributed program package The distributed program package; the debugger module is used to provide code debugging functions; the business plug-in module provides related plug-ins to meet various business needs; the device management module is used to configure and manage various external devices connected to the IDE; the optimization analysis module can The written code is optimized and analyzed; the test module is used to test the code; the application shelf module is used to execute the related processes required when the application is launched; the SDK management module is used to manage and maintain software development and installation packages; the plug-in management module is used For management related various plug-ins.
  • the compiler can come from a third party. As long as it meets the IDE integration interface specification, it can be visually integrated with the IDE through the IDE interface.
  • the compiler provides the syntax compilation support of the programming language, that is: the computer can use the compiler to translate the code developed by the developer into the computer-recognizable binary machine code;
  • APP function verification is mainly by running the compiled binary program installation package on the end-side device (mobile phone, Pad and large-screen TV) to verify whether the APP meets the expected goals of code writing, such as: interface control size, color , Whether the location meets expectations, whether the business processing logic such as the input value range meets expectations, etc.
  • the binary installation package of APP mainly uses a compiler to translate high-level languages such as Java developed by the developer into binary machine code that can be recognized and executed by the computer through the principle of computer compilation. It should be noted that the program packages (binary) compiled for different end-side devices are different, and they are adapted to the underlying APIs of different devices;
  • the following embodiments can be implemented on a terminal device or server having the above hardware structure/software structure.
  • Fig. 3 shows a flow chart of a method for program package deployment provided by the present application, including:
  • the registration operation of the multiple devices is completed through a pre-built integrated development environment IDE tool.
  • IDE tool For the specific description of the IDE tool, you can refer to the content mentioned above.
  • Multiple devices on different terminal sides can be registered in the IDE work through the network or other communication methods. Each device registered here will participate in the reception of the program installation package, that is, obtain the distributed program package and automatically upload it to it. deploy.
  • the multiple devices can be an unlimited number of devices of various types, such as devices such as mobile phones, Pads, or large-screen TVs.
  • the program package adapted to each of the multiple devices is searched respectively.
  • the program packages adapted to different devices are different, and the underlying APIs of different devices are adapted respectively, so it is necessary to find the program packages adapted to each device separately.
  • a corresponding device identifier may be added to each program package that has been generated to indicate the device to which the program package is adapted, such as adding a device identifier of a mobile phone to a program package adapted to a mobile phone device.
  • the found program package is distributed and deployed to the corresponding device, and the corresponding device is a device among the multiple devices. That is, the program package adapted to the mobile phone is distributed and deployed to the mobile device; the program package adapted to the Pad is distributed and deployed to the Pad device, and so on.
  • the IDE tool is communicatively connected with the multiple devices, so multiple program packages found can be deployed to different devices at the same time.
  • Conventional IDE tools can only connect to a single device via USB connection or Wifi at a time. After deploying the program package to the device, disconnect the device and prepare to connect to the next device.
  • the built IDE tool can register and connect multiple different devices each time, and for the multiple registered devices, find the program package that each device is adapted to, and then distribute the found program package Deploy to the corresponding devices, so as to realize the simultaneous deployment of the program package to multiple different devices, which effectively improves the efficiency of the program package deployment.
  • Fig. 4 shows a flowchart of another method for program package deployment provided by an embodiment of the present application, including:
  • the terminal device or server applied by the IDE can respectively receive the status information of each of the multiple devices, such as the name and model of the device, whether it is normal, whether the program package has been accepted, etc. .
  • the received status information can be displayed on the device list interface of the IDE tool to complete the registration operation, so that the debugger can visually discover the relevant information of each device participating in the deployment and debugging of the package.
  • the device list interface may include various types of information such as the name, model, communication status, power status, connection mode, and registration connection time of the registered device.
  • Steps 401-403 are equivalent to completing the registration operation of each device in the IDE tool, and then separately searching for the program package adapted to each of the multiple devices.
  • the specific program package search method please refer to step 301 Related instructions.
  • step 405 may include the following steps 4051-4053:
  • the program package corresponding to the device identification code is not found in the storage path, or the status information of the target device is an abnormal state, it is determined that the target device does not meet the program package distribution and deployment conditions .
  • the target device is a mobile phone
  • the storage path is developed by using the IDE tool to generate various types of packages
  • each package is Find the program package corresponding to the device identification code in the default storage path. If the program package corresponding to the device identification code of the mobile phone can be found from the storage path, and the status information of the mobile phone is normal, such as the power supply is normal, the communication connection is normal, and the program package is in a state that can be accepted, you can It is determined that the mobile phone meets the conditions for program package distribution and deployment. Conversely, if the program package corresponding to the device identification code of the mobile phone cannot be found from the storage path, or a certain status information of the mobile phone is abnormal, it can be determined that the mobile phone does not meet the requirements for program package distribution and deployment.
  • the program packages adapted to these devices are distributed and deployed to these devices.
  • the distributing and deploying the program package adapted to the first device to the first device may include:
  • step 40522 is executed; if the second operation instruction is received, step 40523 is executed.
  • a variety of different package distribution and deployment methods can be set.
  • a "one-click distribution" operation button can be set, and the user only needs to click the button to distribute and deploy the corresponding program package for all devices that meet the requirements for program package distribution and deployment.
  • the user can also select one or more devices that meet the program package distribution and deployment conditions in the device list interface, and distribute and deploy the corresponding program package for the selected device.
  • there may be multiple ways for the user to input the first operation instruction and the second operation instruction such as clicking, double-clicking a certain button, dragging a certain window or scroll bar, etc., and there are no specific restrictions. Through this setting, the distribution and deployment of the program package can be completed flexibly and conveniently.
  • the corresponding program package cannot be distributed and deployed temporarily, and you can wait until the conditions are met at this time.
  • the device list interface of the IDE not only the devices participating in the deployment and debugging of the package can be found visually, but also the devices that meet the conditions of the package distribution and deployment can be visually identified, and which devices do not meet the requirements of the package distribution and deployment condition.
  • each device After distributing and deploying each package to the corresponding devices, in order to facilitate the viewing of the debugging and running results of the package on each device, you can also receive the debugging and running results from each device (such as running through or failing, etc. ) Is added to the device list interface of the IDE tool.
  • the built IDE tool can complete the registration and connection operations of multiple devices, that is, multiple different devices can be connected each time, and the devices that have been registered and meet the requirements of package distribution and deployment will be automatically detected.
  • the program package is distributed and deployed to these devices, so that the program package can be deployed to multiple different devices at the same time, which reduces the operation difficulty of the program package deployment when multiple devices participate in debugging at the same time, and improves the reliability.
  • Scenario 1 As shown in Figure 8, the terminal device where the IDE is located needs to distribute and deploy a debugging package to one mobile phone and one Pad.
  • the IDE When the user clicks the "one-click distribution" button, the IDE will search the compiled and generated mobile phone debugging package and Pad debugging package from the specified storage path, and deploy the found packages to the mobile device and the Pad device.
  • Scenario 2 As shown in Figure 9, the terminal device where the IDE is located needs to distribute and deploy a debugging package to a mobile phone, a Pad, and a large-screen TV.
  • the IDE When the user clicks the "one-click distribution" button, the IDE will search the compiled and generated mobile phone debugging package, Pad debugging package and large-screen TV device debugging package from the specified storage path, and will find the package Deploy to the mobile phone device, the Pad device and the large-screen TV device respectively.
  • Scenario 3 As shown in Figure 10, the terminal device where the IDE is located needs to distribute the deployment debugging package to 2 mobile phones, 2 pads, and 2 large-screen TV devices.
  • the IDE When the user clicks the "one-click distribution" button, the IDE will search the compiled and generated mobile phone debugging package, Pad debugging package and large-screen TV device debugging package from the specified storage path, and will find the package They are respectively deployed on the 2 mobile phone devices, the 2 Pad devices and the 2 large-screen TV devices.
  • step (3) the debugging package of the large-screen TV device fails to be generated (that is, the debugging package of the large-screen TV device does not exist in the storage path), and one of the Pad devices (Pad2) is connected with IDE communication is interrupted. Then, when judging whether each registered device meets the package distribution and deployment conditions, you will get "2 mobile devices, 1 Pad device (Pad1) meets the package distribution and deployment conditions, 2 large-screen TV devices, 1 Pad The device (Pad2) does not meet the requirements of the package distribution deployment.”
  • the device list interface of the IDE can be as shown in Figure 11.
  • the user can choose to distribute and deploy the debugging package to one or more of the two mobile devices, one Pad device (Pad1) Device; or the user can click the "one-click distribution” button, and the debugging package will be distributed and deployed to the 2 mobile devices and 1 Pad device (Pad1) at the same time.
  • the device list interface for 2 large-screen TV devices and 1 Pad device (Pad2) that do not meet the package distribution and deployment conditions, an error mark indicating that the package cannot be deployed will be added. Click the error The mark can also display corresponding instructions (such as the reason why the package cannot be deployed, the corresponding operation suggestions and other information).
  • FIG. 12 shows a structural block diagram of the device for program package deployment provided in an embodiment of the present application. For ease of description, only the information related to the embodiment of the present application is shown. section.
  • the device includes:
  • the program package search module 501 is configured to search for a program package adapted to each of the multiple devices for multiple registered devices, wherein the registration operation of the multiple devices is through pre-built integrated development Completed by the environment IDE tool;
  • the program package deployment module 502 is configured to distribute and deploy the found program package to a corresponding device, and the corresponding device is a device among the multiple devices.
  • the device for deploying the program package may further include:
  • a communication establishment module configured to establish a communication connection with the multiple devices through the IDE tool
  • the status information receiving module is configured to receive the status information of each of the multiple devices after the communication connection is successfully established
  • the status information display module is used to display the received status information on the device list interface of the IDE tool to complete the registration operation.
  • program package deployment module may include:
  • the condition determining unit is configured to separately determine whether each of the multiple devices meets the preset program package distribution and deployment conditions
  • the program package deployment unit is configured to distribute and deploy the program package adapted to the first device to the corresponding first device for the first device that meets the program package distribution and deployment conditions among the multiple devices.
  • condition judgment unit may include:
  • the device identification code obtaining subunit is used to obtain the device identification code of the target device, where the target device is any one of the multiple devices;
  • the program package search subunit is used to search for the program package corresponding to the device identification code from the designated storage path;
  • the first determination subunit is configured to determine that the target device satisfies the program if the program package corresponding to the device identification code is found from the storage path, and the state information of the target device is normal.
  • Package distribution and deployment conditions
  • the second determination subunit is configured to determine that if the program package corresponding to the device identification code is not found in the storage path, or the status information of the target device is an abnormal state, then determine that the target device does not satisfy all requirements.
  • the deployment conditions for the package distribution are described.
  • program package deployment module may also include:
  • the prompt information output unit is configured to add, in the device list interface, the icon of the second device with a flag indicating that the program package deployment failed for the second device that does not meet the program package distribution and deployment conditions among the multiple devices , And output the preset prompt information.
  • program package deployment unit may include:
  • the first program package deployment subunit is configured to distribute and deploy adapted program packages to all first devices if the first operation instruction is received;
  • the second program package deployment subunit is configured to, if a second operation instruction is received, select at least one device from the first device, and distribute and deploy an adapted program package to the selected at least one device.
  • the device for deploying the program package may further include:
  • the operation result receiving module is configured to respectively receive the debugging operation results of the respective deployed program packages by each of the devices;
  • the running result adding module is used to add the debugging running result to the device list interface of the IDE tool.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for deploying each program package as proposed in the present application are realized. .
  • the embodiments of the present application also provide a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the steps of the method for deploying each program package proposed in this application.
  • FIG. 13 is a schematic structural diagram of a terminal device provided by an embodiment of this application.
  • the terminal device 6 of this embodiment includes: at least one processor 60 (only one is shown in FIG. 6), a processor, a memory 61, and a processor that is stored in the memory 61 and can be processed in the at least one processor.
  • a computer program 62 running on the processor 60 when the processor 60 executes the computer program 62, the steps in the above-mentioned method for deploying any program package are implemented.
  • the terminal device 6 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 60 and a memory 61.
  • FIG. 13 is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or less components than those shown in the figure, or a combination of certain components, or different components. , For example, can also include input and output devices, network access devices, and so on.
  • the so-called processor 60 may be a central processing unit (Central Processing Unit, CPU), and the processor 60 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 61 may be an internal storage unit of the terminal device 6 in some embodiments, such as a hard disk or a memory of the terminal device 6. In other embodiments, the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk equipped on the terminal device 6, a smart media card (SMC), and a secure digital (Secure Digital, SD) card, Flash Card, etc. Further, the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device.
  • the memory 61 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.
  • the disclosed device and method may be implemented in other ways.
  • the system embodiment described above is only illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be divided. Combined or can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the computer program can be stored in a computer-readable storage medium.
  • the computer program can be stored in a computer-readable storage medium.
  • the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include at least any entity or device capable of carrying computer program code to a terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), and a random access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium.
  • a recording medium e.g., a hard disk, floppy disk or CD-ROM, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signal telecommunications signal and software distribution medium.
  • U disk mobile hard disk, floppy disk or CD-ROM, etc.
  • computer-readable media cannot be electrical carrier signals and telecommunication signals.

Landscapes

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

Abstract

一种程序包部署的方法、装置、终端设备和存储介质,适用于计算机技术领域。所述方法包括:针对已注册的多个设备,分别查找所述多个设备中每个设备所适配的程序包(301),其中所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的;将查找到的程序包分发部署到对应的设备中(302),所述对应的设备为所述多个设备中的设备。所述构建的IDE工具每次可以注册连接多个不同的设备,针对已注册的多个设备,分别查找每个设备所适配的程序包,然后将查找到的程序包分发部署到相应的各个设备中,从而实现同时将程序包部署到多个不同的设备,有效提高了程序包部署的效率。

Description

程序包部署的方法、装置、终端设备和存储介质
本申请要求于2019年11月27日提交国家知识产权局、申请号为201911184397.3、申请名称为“程序包部署的方法、装置、终端设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于计算机技术领域,尤其涉及程序包部署的方法、装置、终端设备和存储介质。
背景技术
在开发多端适配的场景中,根据设备屏幕尺寸和交互逻辑的不同,一个APP可能会编译出多个程序包,以分别适配不同的设备。例如:某个APP同时支持手机、Pad和大屏电视三种设备,在调试时需要分别编译出三种程序包以分别适配三种设备,同时需要高效的将程序包分发部署到这三种设备上,以便查看程序的运行效果。
在将程序包部署到各类设备时,通常会采用集成开发环境(Integrated Development Environment,IDE)来实现。IDE是用于提供程序开发环境的应用程序,一般包括代码编辑器、编译器、调试器和图形用户界面等工具,集成了代码编写、代码编译、代码调试等一体化的开发功能。
目前,终端侧IDE主要有Android Studio和XCode等。然而,这些IDE每次只能通过USB连线或者Wifi将程序包部署到单个设备上,当APP需要多设备同时参与调试时,程序包部署的操作难度大,部署效率低。
发明内容
有鉴于此,本申请实施例提供了一种程序包部署的方法、装置、终端设备和存储介质,可以同时将程序包部署到多个不同的设备上,有效提高程序包部署的效率。
第一方面,本申请实施例提供了一种程序包部署的方法,包括:
针对已注册的多个设备,分别查找所述多个设备中每个设备所适配的程序包,其中所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的;
将查找到的程序包分发部署到对应的设备中,所述对应的设备为所述多个设备中的设备。
在本申请中,所构建的IDE工具每次可以注册连接多个不同的设备,针对已注册的多个设备,分别查找每个设备所适配的程序包,然后将查找到的程序包分发部署到相应的各个设备中,从而实现同时将程序包部署到多个不同的设备,有效提高了程序包部署的效率。
在第一方面的一种可能的实现方式中,所述多个设备的注册操作可以包括:
通过所述IDE工具建立与所述多个设备的通信连接;
在通信连接建立成功后,分别接收所述多个设备中每个设备的状态信息;
将接收到的所述状态信息显示在所述IDE工具的设备列表界面,完成注册操作。
多个不同的设备可以通过有线或无线的方式和本申请构建的IDE工具建立通信连接,然后,可以通过该IDE工具分别接收该多个设备中每个设备的状态信息,比如设备的名称、型号、是否正常、是否已接受程序包等信息。最后,可以将接收到的状态信息展示于该IDE工具的设备列表界面,从而使得调试人员可以可视化地发现参与程序包部署调试的各个设备的相关信息。另外,记录每个设备的注册信息,完成注册操作。
进一步的,各个不同设备的状态信息可以用不同的图标、颜色、字体来区分,并采用预设的排列方式展示于该设备列表界面中,而且还可以将这些状态信息存储于某个指定的数据库中,以记录程序包部署调试的相关设备信息。
在第一方面的一种可能的实现方式中,所述将查找到的程序包分发部署到对应的设备中可以包括:
分别判断所述多个设备中的每个设备是否满足预设的程序包分发部署条件;
对于所述多个设备中满足所述程序包分发部署条件的第一设备,将与所述第一设备适配的程序包分发部署到对应的第一设备中;
对于所述多个设备中不满足所述程序包分发部署条件的第二设备,在所述设备列表界面中为所述第二设备的图标添加程序包部署失败的标记,并输出预设的提示信息。
在进行程序包的分发部署之前,需要判断已完成注册连接的各个设备是否满足程序包分发部署的条件,比如相适配的程序包是否准备完毕,设备自身的状态是否能够正常接收并运行程序包等条件。然后,对于满足条件的设备,将与这些设备适配的程序包分发给它们。对于不满足条件的设备,暂无法分发部署相应的程序包,此时可以等待直至满足条件,并且输出相应的提示信息。
具体的,判断所述多个设备中任一设备是否满足预设的程序包分发部署条件可以包括:
获取目标设备的设备标识码,所述目标设备为所述多个设备中的任一设备;
从指定的存储路径中查找与所述设备标识码对应的程序包;
若从所述存储路径中查找到与所述设备标识码对应的程序包,且所述目标设备的状态信息为正常状态,则判定所述目标设备满足所述程序包分发部署条件;
若从所述存储路径中未查到与所述设备标识码对应的程序包,或者所述目标设备的状态信息为异常状态,则判定所述目标设备不满足所述程序包分发部署条件。
在第一方面的一种可能的实现方式中,所述将与所述第一设备适配的程序包分发部署到对应的第一设备中可以包括:
若接收到第一操作指令,则为所有的第一设备分发部署适配的程序包;
若接收到第二操作指令,则从所述第一设备中选择至少一个设备,并为选择的所述至少一个设备分发部署适配的程序包。
比如,在构建的IDE工具中,可以设置一个“一键分发”的操作按钮,用户只需点击该按钮,即可为所有满足程序包分发部署条件的设备分发部署相应的程序包。或 者,也可以由用户自己选取一个或多个满足程序包分发部署条件的设备,为选取的设备分发部署相应的程序包。通过这样设置,可以灵活且便捷地完成程序包的分发部署操作。
在第一方面的一种可能的实现方式中,在将查找到的程序包分发部署到对应的设备中之后,还可以包括:
分别接收各个所述设备对各自部署的程序包的调试运行结果;
将所述调试运行结果添加到所述IDE工具的设备列表界面中。
在将各个程序包分发部署到相应的各个设备中之后,为了便于查看程序包在各个设备上的调试运行结果,可以将接收到的调试运行结果添加到该IDE工具的设备列表界面中。
第二方面,本申请实施例提供了一种程序包部署的装置,包括:
程序包查找模块,用于针对已注册的多个设备,分别查找所述多个设备中每个设备所适配的程序包,其中所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的;
程序包部署模块,用于将查找到的程序包分发部署到对应的设备中,所述对应的设备为所述多个设备中的设备。
进一步的,所述程序包部署的装置还可以包括:
通信建立模块,用于通过所述IDE工具建立与所述多个设备的通信连接;
状态信息接收模块,用于在通信连接建立成功后,分别接收所述多个设备中每个设备的状态信息;
状态信息显示模块,用于将接收到的所述状态信息显示在所述IDE工具的设备列表界面,完成注册操作。
进一步的,所述程序包部署模块可以包括:
条件判断单元,用于分别判断所述多个设备中的每个设备是否满足预设的程序包分发部署条件;
程序包部署单元,用于对于所述多个设备中满足所述程序包分发部署条件的第一设备,将与所述第一设备适配的程序包分发部署到对应的第一设备中。
进一步的,所述条件判断单元可以包括:
设备标识码获取子单元,用于获取目标设备的设备标识码,所述目标设备为所述多个设备中的任一设备;
程序包查找子单元,用于从指定的存储路径中查找与所述设备标识码对应的程序包;
第一判定子单元,用于若从所述存储路径中查找到与所述设备标识码对应的程序包,且所述目标设备的状态信息为正常状态,则判定所述目标设备满足所述程序包分发部署条件;
第二判定子单元,用于若从所述存储路径中未查到与所述设备标识码对应的程序包,或者所述目标设备的状态信息为异常状态,则判定所述目标设备不满足所述程序包分发部署条件。
进一步的,所述程序包部署模块还可以包括:
提示信息输出单元,用于对于所述多个设备中不满足所述程序包分发部署条件的第二设备,在所述设备列表界面中为所述第二设备的图标添加程序包部署失败的标记,并输出预设的提示信息。
进一步的,所述程序包部署单元可以包括:
第一程序包部署子单元,用于若接收到第一操作指令,则为所有的第一设备分发部署适配的程序包;
第二程序包部署子单元,用于若接收到第二操作指令,则从所述第一设备中选择至少一个设备,并为选择的所述至少一个设备分发部署适配的程序包。
进一步的,所述程序包部署的装置还可以包括:
运行结果接收模块,用于分别接收各个所述设备对各自部署的程序包的调试运行结果;
运行结果添加模块,用于将所述调试运行结果添加到所述IDE工具的设备列表界面中。
第三方面,本申请实施例提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例第一方面提出的程序包部署的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如本申请实施例第一方面提出的程序包部署的方法。
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面中任一项所述的程序包部署的方法。
本申请实施例与现有技术相比存在的有益效果是:能够同时将程序包部署到多个不同的设备上,从而降低多设备同时参与调试时程序包部署的操作难度,提升程序包部署的效率以及可靠性,具有较强的易用性和实用性。
附图说明
图1是本申请一实施例提供的程序包部署的方法所适用于的手机的硬件结构示意图;
图2是本申请一实施例所构建的一种IDE工具的软件系统架构图;
图3是本申请实施例提供的一种程序包部署的方法的流程图;
图4是本申请实施例提供的另一种程序包部署的方法的流程图;
图5是图4中步骤405的一种具体实施方式的流程图;
图6是图5中步骤4051的一种具体实施方式的流程图;
图7是图5中步骤4052的一种具体实施方式的流程图;
图8是本申请实施例提供的程序包部署的方法的一种实际应用场景的示意图;
图9是本申请实施例提供的程序包部署的方法的另一种实际应用场景的示意图;
图10是本申请实施例提供的程序包部署的方法的另一种实际应用场景的示意图;
图11是图10所示的实际应用场景中,IDE工具的设备列表界面的一种示意图;
图12是本申请实施例提供的一种程序包部署的装置的一个实施例的结构图;
图13是本申请实施例提供的一种终端设备的示意图。
具体实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个、两个或两个以上;“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
本申请实施例提供的程序包部署的方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等终端设备或者服务器上,本申请实施例对终端设备和服务器的具体类型不作任何限制。
例如,所述终端设备可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session InitiationProtocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)设备、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、车联网终端、电脑、膝上型计算机、手持式通信设备、手持式计算设备、卫星无线设备、无线调制解调器卡、电视机顶盒(set top box,STB)、用户驻地设备(customer premise equipment,CPE)和/或用于在无线系统上进行通信的其它设备以及下一代通信系统,例如,5G网络中的移动终端或者未来演进的公共陆地移动网络(Public Land Mobile Network,PLMN)网络中的移动终端等。
作为示例而非限定,当所述终端设备为可穿戴设备时,该可穿戴设备还可以是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,如智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。
以所述终端设备为手机为例。图1示出的是与本申请实施例提供的手机的部分结构的框图。参考图1,手机包括:射频(Radio Frequency,RF)电路110、存储器120、 输入单元130、显示单元140、传感器150、音频电路160、无线保真(wireless fidelity,WiFi)模块170、处理器180、以及电源190等部件。本领域技术人员可以理解,图1中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图1对手机的各个构成部件进行具体的介绍:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器180处理;另外,将设计上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元130可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板131。除了触控面板131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元140可包括显示面板141,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理 器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图1中,触控面板131与显示面板141是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板131与显示面板141集成而实现手机的输入和输出功能。
手机100还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在手机移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路160、扬声器161,传声器162可提供用户与手机之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一手机,或者将音频数据输出至存储器120以便进一步处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图1示出了WiFi模块170,但是可以理解的是,其并不属于手机100的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器180是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。
手机100还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机100还可以包括摄像头。可选地,摄像头在手机100的上的位置可以为前置的,也可以为后置的,本申请实施例对此不作限定。
可选地,手机100可以包括单摄像头、双摄像头或三摄像头等,本申请实施例对此不作限定。
例如,手机100可以包括三摄像头,其中,一个为主摄像头、一个为广角摄像头、一个为长焦摄像头。
可选地,当手机100包括多个摄像头时,这多个摄像头可以全部前置,或者全部后置,或者一部分前置、另一部分后置,本申请实施例对此不作限定。
另外,尽管未示出,手机100还可以包括蓝牙模块等,在此不再赘述。
本申请提出的程序包部署的方法,是采用预先构建的一个IDE工具完成的。IDE是用于提供程序开发环境的应用程序,一般包括代码编辑器、编译器、调试器和图形用户界面等工具,集成了代码编写、代码编译、代码调试等一体化的开发功能。目前,流行的终端侧IDE有Google公司的Android Studio和Apple公司的XCode,这两款工具仅可以实现单设备通过USB连线或Wifi将调试程序包分发(部署安装)到手机等设备上。
为了构建面向下一代新型应用的编程框架,极大的降低开发难度和技术门槛,为开发者提供更好的开发体验,本申请提出一种支持跨设备场景APP设计、开发、构建、发布功能的IDE。只需一次开发活动,APP可以在多设备上适配运行,让开发者的开发活动更加简单、高效,降低后期运营成本。
在一次开发多端适配的场景中,根据设备屏幕尺寸和交互逻辑的不同,一个APP可能会编译出多个程序包,分别适配不同的设备。例如:目前代码工程中的应用同时支持手机、Pad和大屏电视三种设备,在调试时需要分别编译出三种程序安装包以分别适配三种设备,同时需要高效的将程序安装包分发到这三种真实设备上,以便在三种设备上查看程序运行效果。IDE中需要一种机制,可以支持在开发调试过程中能够识别目前可用的调试设备,并且将可以运行的程序包分发部署到与其相匹配的调试设备上,完成多设备的分布式场景运行调试,本申请提出的IDE即具备这种机制。
请参阅图2,示出了本申请实施例所构建的一种IDE工具的软件系统架构图,在该系统架构图中:
程序包分发模块负责根据工程管理和编译构建提供的信息,完成程序包向各个端侧设备的分发(部署安装),该模块具体可以包含设备网络配置、路径解析和程序包分发三个功能单元,分别用于设置设备之间的网络、解析程序包的存储路径以及执行程序包的分发部署等功能。
工程管理模块负责维护和提供代码目录适配设备的相关信息;UI设计模块负责完成IDE工具的UI界面设计;代码编辑模块提供代码开发与编辑的功能;编译构建模块可以根据Gradle设置,编译生成可分发的程序包;调试器模块用于提供代码调试的功能;业务插件模块提供满足各类业务需求的相关插件;设备管理模块用于配置与管理与IDE连接的各个外部设备;优化分析模块可以对已编写的代码进行优化与分析;测试模块用于代码的测试工作;应用上架模块用于执行应用上架时所需的相关流程;SDK管理模块用于管理与维护软件开发安装包;插件管理模块用于管理相关的各类插件。
采用该IDE工具开发和生成程序包的过程通常如下:
(1)开发者使用IDE选择符合自身业务目标的工程类型(适配哪种端侧设备,例如:手机、Pad和大屏电视等设备);
(2)开发者选择符合自身业务目标的编译器,编译器可以来自于第三方,只要符合IDE集成接口规范,就可以通过IDE界面,可视化的与IDE挂接集成。编译器提供编程语言的语法编译支持,即:计算机可以通过编译器将开发者开发的代码翻译成计算机可识别的二进制机器码;
(3)开发者使用编译器支持的Java等编程语言在IDE中编写APP的界面(界面 布局、界面控件等界面元素)和业务逻辑(接口、类等实现),这些界面和业务逻辑是适配上一步选择的工程类型的;
(4)当开发者编写的代码可以使用编译器编译通过,没有编译错误时,就可以进行APP功能的验证;
(5)APP功能验证主要通过将编译生成的二进制程序安装包在端侧设备上(手机、Pad和大屏电视)运行,验证APP是否符合代码编写预期达到的目标,例如:界面控件大小、颜色、位置是否符合预期,输入值范围等业务处理逻辑是否符合预期等。APP的二进制安装包主要通过编译器通过计算机编译原理将开发者开发的Java等高级语言翻译成计算机可以识别、执行的二进制机器码。需要注意的是,为不同端侧设备编译生成的程序包(二进制)是不同的,分别适配不同设备的底层API;
(6)当程序安装包编译成功后,这些程序安装包会在开发者使用的终端设备的硬盘上存放。
以下实施例可以在具有上述硬件结构/软件结构的终端设备或服务器上实现。
图3示出了本申请提供的一种程序包部署的方法的流程图,包括:
301、针对已注册的多个设备,分别查找所述多个设备中每个设备所适配的程序包;
其中,所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的。关于该IDE工具的具体说明,可以参照上文所述的内容。不同终端侧的多个设备可以通过网络或者其它通信方式在该IDE工作中进行注册操作,在此处注册的各个设备将参与程序安装包的接收,即获得分发的程序包,并在其上自动部署。这多个设备可以是各种类型的不限数量的设备,比如手机、Pad或者大屏电视等设备。
在完成注册连接操作之后,分别查找所述多个设备中每个设备所适配的程序包。不同设备所适配的程序包是不同的,分别适配不同设备的底层API,因此需要分别查找各个设备所适配的程序包。具体的,可以为已生成的各个程序包分别添加相应的设备标识,用于指示该程序包所适配的设备,比如为适配于手机设备的程序包添加手机的设备标识等。各个程序包在采用该IDE工具开发完成后,可以存储于某个特定的存储路径,在步骤301中即可从该存储路径中查找各个程序包。
302、将查找到的程序包分发部署到对应的设备中。
最后,将查找到的程序包分发部署到对应的设备中,所述对应的设备为所述多个设备中的设备。也即,将手机适配的程序包,分发部署到手机设备中;将Pad适配的程序包,分发部署到Pad设备中,以此类推。该IDE工具与该多个设备是通讯连接的,故可以同时将查找到的多个程序包分别部署到各个不同的设备中。
常规的IDE工具每次只能通过USB连线或者Wifi的方式与单个设备连接,将程序包部署到该设备之后,再断开与该设备的连接,准备连接下一个设备。而在本申请中,所构建的IDE工具每次可以注册连接多个不同的设备,针对已注册的多个设备,分别查找每个设备所适配的程序包,然后将查找到的程序包分发部署到相应的各个设备中,从而实现同时将程序包部署到多个不同的设备,有效提高了程序包部署的效率。
图4示出了本申请实施例提供的另一种程序包部署的方法的流程图,包括:
401、通过预先构建的IDE工具建立与多个设备的通信连接;
关于该IDE工具的具体说明,同样可以参照上文所述的内容,不同终端侧的多个不同设备可以通过网络或者其它通信方式与该IDE工具建立通信连接关系。
402、在通信连接建立成功后,分别接收所述多个设备中每个设备的状态信息;
在建立通信连接关系之后,该IDE所应用的终端设备或服务器,可以分别接收所述多个设备中每个设备的状态信息,比如设备的名称、型号、是否正常、是否已接受程序包等信息。
403、将接收到的状态信息展示于所述IDE工具的设备列表界面,完成注册操作;
然后,可以将接收到的状态信息展示于该IDE工具的设备列表界面,完成注册操作,从而使得调试人员可以可视化地发现参与程序包部署调试的各个设备的相关信息。具体的,该设备列表界面可以包含已注册设备的名称、型号、通信状态、电源状态、连接方式、注册连接的时间等各类信息。
404、分别查找所述多个设备中每个设备所适配的程序包;
步骤401-403相当于完成各个设备在该IDE工具中的注册操作,接下来则分别查找所述多个设备中每个设备所适配的程序包,具体的程序包查找方式可以参照步骤301的相关说明。
405、将查找到的程序包分发部署到对应的设备中;
然后,将查找到的程序包分发部署到对应的设备中,具体说明可参照步骤302。
进一步的,如图5所示,步骤405可以包括以下步骤4051-4053:
4051、分别判断所述多个设备中的每个设备是否满足预设的程序包分发部署条件;
在将程序包分发部署到各个设备时,首先需要先判断各个设备是否满足预设的程序包分发部署条件,比如设备当前与IDE的连接状态是否正常,设备当前的状态是否可以接收程序包,与设备适配的程序包是否已经生成等条件。
具体的,如图6所示,所述多个设备中任意的一个目标设备是否满足所述程序包分发部署条件可以通过以下步骤判断:
40511、获取所述目标设备的设备标识码;
40512、从指定的存储路径中查找与所述设备标识码对应的程序包;
40513、若从所述存储路径中查找到与所述设备标识码对应的程序包,且所述目标设备的状态信息为正常状态,则判定所述目标设备满足所述程序包分发部署条件;
40514、若从所述存储路径中未查到与所述设备标识码对应的程序包,或者所述目标设备的状态信息为异常状态,则判定所述目标设备不满足所述程序包分发部署条件。
假设该目标设备是一台手机,则首先获取该手机的设备标识码,然后从某个指定的存储路径(该存储路径是采用该IDE工具开发生成各个不同类型的程序包后,各个程序包的默认存储路径)中查找与该设备标识码对应的程序包。若能够从该存储路径中查找到与手机的设备标识码对应的程序包,且该手机的各项状态信息均正常,比如电源正常,通信连接正常,处于可接受程序包的状态等,则可以判定该手机满足程序包分发部署的条件。反之,若从该存储路径中查找不到与手机的设备标识码对应的程序包,或者该手机的某个状态信息异常,则可以判定该手机不满足程序包分发部署的条件。
4052、对于所述多个设备中满足所述程序包分发部署条件的第一设备,将与所述第一设备适配的程序包分发部署到对应的第一设备中;
在通过步骤4051找到所述多个设备中满足所述程序包分发部署条件的第一设备之后,将与这些设备适配的程序包分发部署到这些设备中。
具体的,如图7所示,所述将与所述第一设备适配的程序包分发部署到所述第一设备中可以包括:
40521、判断接收到的操作指令为第一操作指令还是第二操作指令;
若接收到第一操作指令,则执行步骤40522;若接收到第二操作指令,则执行步骤40523。
40522、为所有的第一设备分发部署适配的程序包;
40523、从所述第一设备中选择至少一个设备,并为选择的所述至少一个设备分发部署适配的程序包。
在该IDE中,根据实际需求,可以设置多种不同的程序包分发部署方式。比如,可以设置一个“一键分发”的操作按钮,用户只需点击该按钮,即可为所有满足程序包分发部署条件的设备分发部署相应的程序包。或者,也可以由用户在该设备列表界面中选取一个或多个满足程序包分发部署条件的设备,为选取的设备分发部署相应的程序包。应当理解的是,用户输入第一操作指令和第二操作指令的方式可以有多种,比如单击、双击某个按钮,拖动某个窗口或滚动条等,具体不做任何限制。通过这样设置,可以灵活且便捷地完成程序包的分发部署操作。
4053、对于所述多个设备中不满足所述程序包分发部署条件的第二设备,在所述设备列表界面中为所述第二设备的图标添加程序包部署失败的标记,并输出预设的提示信息。
对于不满足所述程序包分发部署条件的设备,暂无法分发部署相应的程序包,此时可以等待直至满足条件。另外,还可以在该IDE的设备列表界面中为这些设备的图标添加程序包部署失败(或者是程序包暂无法部署)的标记,并输出预设的提示信息,以通知相关人员程序包部署失败的信息,并且还可以示出程序包部署失败的原因,比如适配的程序包尚未生成,设备通信连接异常等原因。通过这样设置,在该IDE的设备列表界面中,不仅可以可视化发现参与程序包部署调试的各个设备,还可以可视化地识别哪些设备满足程序包分发部署的条件,哪些设备不满足程序包分发部署的条件。
406、分别接收各个所述设备对各自部署的程序包的调试运行结果;
407、将所述调试运行结果添加到所述IDE工具的设备列表界面中。
在将各个程序包分发部署到相应的各个设备中之后,为了便于查看程序包在各个设备上的调试运行结果,还可以将从各个设备接收到的调试运行结果(比如运行通过或者运行未通过等)添加到该IDE工具的设备列表界面中。
在本申请实施例中,构建的IDE工具可以完成多个设备的注册连接操作,即每次可以连接多个不同的设备,自动检测已经注册并且符合程序包分发部署条件的设备,将查找到的程序包分发部署到这些设备中,从而实现同时将程序包部署到多个不同的设备上,降低多设备同时参与调试时程序包部署的操作难度,提升可靠性。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程 的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
为便于理解,下面以几个实际应用场景来说明本申请提出的程序包部署的方法。
场景一:如图8所示,IDE所处的终端设备需要向1个手机和1个Pad分发部署调试程序包。
基于此应用场景一,用户需要在IDE中进行的关键操作如下:
(1)在IDE中选择同时支持手机和Pad的工程模板;
(2)在该工程模板中编写APP适配手机和Pad的界面和业务逻辑;
(3)通过IDE的编译器分别编译生成手机和Pad的调试程序包;
(4)在IDE的设备注册功能中注册连接1个手机设备和1个Pad设备;
(5)点击“一键分发”按钮,将手机设备适配的调试程序包分发部署到该手机设备上,同时将Pad设备适配的调试程序包分发部署到该Pad设备上;
(6)在该手机设备和该Pad设备上调试运行部署的程序包,完成测试功能。
当用户点击“一键分发”按钮之后,该IDE会从指定的存储路径中查找已经编译生成的手机调试程序包和Pad调试程序包,并将查找到的程序包分别部署到该手机设备和该Pad设备上。
场景二:如图9所示,IDE所处的终端设备需要向1个手机、1个Pad和1个大屏电视分发部署调试程序包。
基于此应用场景二,开发人员需要在IDE中进行的关键操作如下:
(1)在IDE中选择同时支持手机、Pad和大屏电视的工程模板;
(2)在该工程模板中编写APP适配手机、Pad和大屏电视的界面和业务逻辑;
(3)通过IDE的编译器分别编译生成手机、Pad和大屏电视的调试程序包;
(4)在IDE的设备注册功能中注册连接1个手机设备、1个Pad设备和1个大屏电视设备;
(5)点击“一键分发”按钮,将手机设备适配的调试程序包分发部署到该手机设备上,同时将Pad设备适配的调试程序包分发部署到该Pad设备上,以及将大屏电视设备适配的调试程序包分发部署到该大屏电视设备上;
(6)在该手机设备、该Pad设备和该大屏电视设备上调试运行部署的程序包,完成测试功能。
当用户点击“一键分发”按钮之后,该IDE会从指定的存储路径中查找已经编译生成的手机调试程序包、Pad调试程序包和大屏电视设备调试程序包,并将查找到的程序包分别部署到该手机设备、该Pad设备和该大屏电视设备上。
场景三:如图10所示,IDE所处的终端设备需要向2个手机、2个pad和2个大屏电视设备分发部署调试程序包。
基于此应用场景三,开发人员需要在IDE中进行的关键操作如下:
(1)在IDE中选择同时支持手机、Pad和大屏电视的工程模板;
(2)在该工程模板中编写APP适配手机、Pad和大屏电视的界面和业务逻辑;
(3)通过IDE的编译器分别编译生成手机、Pad和大屏电视的调试程序包;
(4)在IDE的设备注册功能中注册连接2个手机设备、2个Pad设备和2个大屏 电视设备;
(5)点击“一键分发”按钮,将手机设备适配的调试程序包分发部署到该2个手机设备上,同时将Pad设备适配的调试程序包分发部署到该2个Pad设备上,以及将大屏电视设备适配的调试程序包分发部署到该2个大屏电视设备上;
(6)在该2个手机设备、该2个Pad设备和该2个大屏电视设备上调试运行部署的程序包,完成测试功能。
当用户点击“一键分发”按钮之后,该IDE会从指定的存储路径中查找已经编译生成的手机调试程序包、Pad调试程序包和大屏电视设备调试程序包,并将查找到的程序包分别部署到该2个手机设备、该2个Pad设备和该2个大屏电视设备上。
假设在步骤(3)中,大屏电视设备的调试程序包生成失败(即在该存储路径中不存在大屏电视设备的调试程序包),而且其中一个Pad设备(Pad2)在注册连接之后与IDE的通讯中断。那么,在判断各个已注册的设备是否满足程序包分发部署条件时,会得到“2个手机设备,1个Pad设备(Pad1)满足程序包分发部署条件,2个大屏电视设备,1个Pad设备(Pad2)不满足程序包分发部署条件”的结果。在这个情况下,IDE的设备列表界面可以如图11所示,用户可以在该界面中选择将调试程序包分发部署到该2个手机设备,1个Pad设备(Pad1)中的一个或多个设备;或者用户也可以点击“一键分发”的按钮,此时会将调试程序包同时分发部署到该2个手机设备和1个Pad设备(Pad1)中。而且,在该设备列表界面中,对于不满足程序包分发部署条件的2个大屏电视设备和1个Pad设备(Pad2),会添加用于指示无法部署程序包的错误标记,通过点击该错误标记还可以展示相应的指示信息(比如无法部署程序包的原因,相应的操作建议等信息)。
对应于上文实施例所述的程序包部署的方法,图12示出了本申请实施例提供的程序包部署的装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。
参照图12,该装置包括:
程序包查找模块501,用于针对已注册的多个设备,分别查找所述多个设备中每个设备所适配的程序包,其中所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的;
程序包部署模块502,用于将查找到的程序包分发部署到对应的设备中,所述对应的设备为所述多个设备中的设备。
进一步的,所述程序包部署的装置还可以包括:
通信建立模块,用于通过所述IDE工具建立与所述多个设备的通信连接;
状态信息接收模块,用于在通信连接建立成功后,分别接收所述多个设备中每个设备的状态信息;
状态信息显示模块,用于将接收到的所述状态信息显示在所述IDE工具的设备列表界面,完成注册操作。
进一步的,所述程序包部署模块可以包括:
条件判断单元,用于分别判断所述多个设备中的每个设备是否满足预设的程序包分发部署条件;
程序包部署单元,用于对于所述多个设备中满足所述程序包分发部署条件的第一 设备,将与所述第一设备适配的程序包分发部署到对应的第一设备中。
进一步的,所述条件判断单元可以包括:
设备标识码获取子单元,用于获取目标设备的设备标识码,所述目标设备为所述多个设备中的任一设备;
程序包查找子单元,用于从指定的存储路径中查找与所述设备标识码对应的程序包;
第一判定子单元,用于若从所述存储路径中查找到与所述设备标识码对应的程序包,且所述目标设备的状态信息为正常状态,则判定所述目标设备满足所述程序包分发部署条件;
第二判定子单元,用于若从所述存储路径中未查到与所述设备标识码对应的程序包,或者所述目标设备的状态信息为异常状态,则判定所述目标设备不满足所述程序包分发部署条件。
进一步的,所述程序包部署模块还可以包括:
提示信息输出单元,用于对于所述多个设备中不满足所述程序包分发部署条件的第二设备,在所述设备列表界面中为所述第二设备的图标添加程序包部署失败的标记,并输出预设的提示信息。
进一步的,所述程序包部署单元可以包括:
第一程序包部署子单元,用于若接收到第一操作指令,则为所有的第一设备分发部署适配的程序包;
第二程序包部署子单元,用于若接收到第二操作指令,则从所述第一设备中选择至少一个设备,并为选择的所述至少一个设备分发部署适配的程序包。
进一步的,所述程序包部署的装置还可以包括:
运行结果接收模块,用于分别接收各个所述设备对各自部署的程序包的调试运行结果;
运行结果添加模块,用于将所述调试运行结果添加到所述IDE工具的设备列表界面中。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如本申请提出的各个程序包部署的方法的步骤。
本申请实施例还提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行本申请提出的各个程序包部署的方法的步骤。
图13为本申请一实施例提供的终端设备的结构示意图。如图13所示,该实施例的终端设备6包括:至少一个处理器60(图6中仅示出一个)处理器、存储器61以及存储在所述存储器61中并可在所述至少一个处理器60上运行的计算机程序62,所述处理器60执行所述计算机程序62时实现上述任意程序包部署的方法实施例中的步骤。
所述终端设备6可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。该终端设备可包括,但不仅限于,处理器60、存储器61。本领域技术人员可以理解,图13仅仅是终端设备6的举例,并不构成对终端设备6的限定,可以包括比图示 更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入输出设备、网络接入设备等。
所称处理器60可以是中央处理单元(Central Processing Unit,CPU),该处理器60还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器61在一些实施例中可以是所述终端设备6的内部存储单元,例如终端设备6的硬盘或内存。所述存储器61在另一些实施例中也可以是所述终端设备6的外部存储设备,例如所述终端设备6上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器61还可以既包括所述终端设备6的内部存储单元也包括外部存储设备。所述存储器61用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器61还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显 示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种程序包部署的方法,其特征在于,包括:
    针对已注册的多个设备,分别查找所述多个设备中每个设备所适配的程序包,其中所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的;
    将查找到的程序包分发部署到对应的设备中,所述对应的设备为所述多个设备中的设备。
  2. 如权利要求1所述的程序包部署的方法,其特征在于,所述多个设备的注册操作包括:
    通过所述IDE工具建立与所述多个设备的通信连接;
    在通信连接建立成功后,分别接收所述多个设备中每个设备的状态信息;
    将接收到的所述状态信息显示在所述IDE工具的设备列表界面,完成注册操作。
  3. 如权利要求2所述的程序包部署的方法,其特征在于,所述将查找到的程序包分发部署到对应的设备中包括:
    分别判断所述多个设备中的每个设备是否满足预设的程序包分发部署条件;
    对于所述多个设备中满足所述程序包分发部署条件的第一设备,将与所述第一设备适配的程序包分发部署到对应的第一设备中。
  4. 如权利要求3所述的程序包部署的方法,其特征在于,判断所述多个设备中任一设备是否满足预设的程序包分发部署条件包括:
    获取目标设备的设备标识码,所述目标设备为所述多个设备中的任一设备;
    从指定的存储路径中查找与所述设备标识码对应的程序包;
    若从所述存储路径中查找到与所述设备标识码对应的程序包,且所述目标设备的状态信息为正常状态,则判定所述目标设备满足所述程序包分发部署条件;
    若从所述存储路径中未查到与所述设备标识码对应的程序包,或者所述目标设备的状态信息为异常状态,则判定所述目标设备不满足所述程序包分发部署条件。
  5. 如权利要求3所述的程序包部署的方法,其特征在于,在分别判断所述多个设备中的每个设备是否满足预设的程序包分发部署条件之后,还包括:
    对于所述多个设备中不满足所述程序包分发部署条件的第二设备,在所述设备列表界面中为所述第二设备的图标添加程序包部署失败的标记,并输出预设的提示信息。
  6. 如权利要求3所述的程序包部署的方法,其特征在于,所述将与所述第一设备适配的程序包分发部署到对应的第一设备中包括:
    若接收到第一操作指令,则为所有的第一设备分发部署适配的程序包;
    若接收到第二操作指令,则从所述第一设备中选择至少一个设备,并为选择的所述至少一个设备分发部署适配的程序包。
  7. 如权利要求1至6中任一项所述的程序包部署的方法,其特征在于,在将查找到的程序包分发部署到对应的设备中之后,还包括:
    分别接收各个所述设备对各自部署的程序包的调试运行结果;
    将所述调试运行结果添加到所述IDE工具的设备列表界面中。
  8. 一种程序包部署的装置,其特征在于,包括:
    程序包查找模块,用于针对已注册的多个设备,分别查找所述多个设备中每个设 备所适配的程序包,其中所述多个设备的注册操作是通过预先构建的集成开发环境IDE工具完成的;
    程序包部署模块,用于将查找到的程序包分发部署到对应的设备中,所述对应的设备为所述多个设备中的设备。
  9. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述的程序包部署的方法。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的程序包部署的方法。
PCT/CN2020/125519 2019-11-27 2020-10-30 程序包部署的方法、装置、终端设备和存储介质 WO2021103936A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20891504.1A EP4047475A4 (en) 2019-11-27 2020-10-30 METHOD AND DEVICE FOR USE OF A PROGRAM PACKAGE, TERMINAL AND STORAGE MEDIUM
US17/825,897 US20220283795A1 (en) 2019-11-27 2022-05-26 Package deployment method and apparatus, terminal device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911184397.3 2019-11-27
CN201911184397.3A CN112860274A (zh) 2019-11-27 2019-11-27 程序包部署的方法、装置、终端设备和存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/825,897 Continuation US20220283795A1 (en) 2019-11-27 2022-05-26 Package deployment method and apparatus, terminal device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021103936A1 true WO2021103936A1 (zh) 2021-06-03

Family

ID=75985770

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125519 WO2021103936A1 (zh) 2019-11-27 2020-10-30 程序包部署的方法、装置、终端设备和存储介质

Country Status (4)

Country Link
US (1) US20220283795A1 (zh)
EP (1) EP4047475A4 (zh)
CN (1) CN112860274A (zh)
WO (1) WO2021103936A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035797A (zh) * 2014-06-13 2014-09-10 四川长虹电器股份有限公司 应用程序的分发方法和应用程序的接收方法
CN106126286A (zh) * 2016-06-22 2016-11-16 天维尔信息科技股份有限公司 一种软件部署方法及终端
CN106294158A (zh) * 2016-08-11 2017-01-04 北京小米移动软件有限公司 终端测试方法、装置及系统
US20170344449A1 (en) * 2016-05-27 2017-11-30 Wistron Corp. Testing method of electronic devices
CN108509333A (zh) * 2017-02-28 2018-09-07 腾讯科技(深圳)有限公司 调试方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070067426A1 (en) * 2005-09-22 2007-03-22 Sun Microsystems, Inc. Computer implemented methods for transferring files from a development environment to target mobile devices
US20110225579A1 (en) * 2010-03-12 2011-09-15 Nikhil Khandelwal Configurable software deployment
US20130205277A1 (en) * 2012-02-07 2013-08-08 Telerik, AD Environment and method for cross-platform development of software applications
US9052979B2 (en) * 2012-12-06 2015-06-09 International Business Machines Corporation Program code library searching and selection in a networked computing environment
US9430207B1 (en) * 2013-03-13 2016-08-30 MobileForce Software, Inc. Automated cross-platform native mobile application generation with cloud driven user interface and workflow synthesis
CN105786495B (zh) * 2016-02-24 2019-03-01 中国联合网络通信集团有限公司 软件发布系统及方法、软件开发发布系统
US10255067B2 (en) * 2016-11-22 2019-04-09 Sap Se Development of internet of things (IoT) applications
CN106951186B (zh) * 2017-03-07 2020-02-07 合肥兆芯电子有限公司 数据程序化方法、存储器存储装置及存储器控制电路单元
CN108073400A (zh) * 2017-12-07 2018-05-25 湖北三新文化传媒有限公司 软件自动化构建方法、服务器及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035797A (zh) * 2014-06-13 2014-09-10 四川长虹电器股份有限公司 应用程序的分发方法和应用程序的接收方法
US20170344449A1 (en) * 2016-05-27 2017-11-30 Wistron Corp. Testing method of electronic devices
CN106126286A (zh) * 2016-06-22 2016-11-16 天维尔信息科技股份有限公司 一种软件部署方法及终端
CN106294158A (zh) * 2016-08-11 2017-01-04 北京小米移动软件有限公司 终端测试方法、装置及系统
CN108509333A (zh) * 2017-02-28 2018-09-07 腾讯科技(深圳)有限公司 调试方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Android Airtest IDE realizes multi-device management and automatic package installation", 17 March 2019 (2019-03-17), pages 1 - 5, XP055816657, Retrieved from the Internet <URL:https://www.cnblogs.com/starkYang/p/10547278.html> *

Also Published As

Publication number Publication date
US20220283795A1 (en) 2022-09-08
CN112860274A (zh) 2021-05-28
EP4047475A1 (en) 2022-08-24
EP4047475A4 (en) 2022-12-07

Similar Documents

Publication Publication Date Title
CN106970790B (zh) 一种应用程序创建的方法、相关设备及系统
CN106254436A (zh) 一种远程调试的方法、相关设备及系统
CN110032512A (zh) 一种小程序的调试方法、相关设备及终端
CN110168487A (zh) 一种触摸控制方法及装置
CN109753276A (zh) 一种基于虚幻引擎的控制方法及相关装置
CN109766080B (zh) 微服务注册方法、装置、电子设备及可读存储介质
CN106227588A (zh) 一种多实例对象的创建方法、装置及移动终端
CN108595203A (zh) 应用功能执行方法、移动终端和计算机可读存储介质
CN110058850A (zh) 一种应用的开发方法、装置以及存储介质
CN111931102A (zh) 一种构建页面的方法、装置及系统
CN108320148A (zh) 一种资源转移方法及相关设备
CN110147186A (zh) 一种应用的控制方法及终端设备
CN110225180A (zh) 一种内容输入方法及终端设备
CN108780400B (zh) 数据处理方法及电子设备
CN107861827B (zh) 卡屏检测方法、移动终端及计算机可读存储介质
WO2017005080A1 (zh) 网页显示方法、终端设备及存储介质
WO2015101254A1 (zh) 一种信息交互的方法、装置及系统
CN106203015A (zh) 应用程序的配置方法、装置及终端设备
WO2021103936A1 (zh) 程序包部署的方法、装置、终端设备和存储介质
CN105898738A (zh) 获取副号的方法、装置和便携式多功能设备
CN109582565A (zh) 防止应用崩溃的方法、终端及计算机存储介质
CN109885317A (zh) 一种信息处理方法、服务器及终端
CN115600213A (zh) 基于应用程序的漏洞管理方法、装置、介质及设备
CN108829416A (zh) 一种升级推荐方法、服务器及终端
CN109451295A (zh) 一种获取虚拟信息的方法和系统

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: 20891504

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020891504

Country of ref document: EP

Effective date: 20220519

NENP Non-entry into the national phase

Ref country code: DE