WO2022000869A1 - 小程序的批量处理方法、装置、电子设备以及可读存储介质 - Google Patents

小程序的批量处理方法、装置、电子设备以及可读存储介质 Download PDF

Info

Publication number
WO2022000869A1
WO2022000869A1 PCT/CN2020/122315 CN2020122315W WO2022000869A1 WO 2022000869 A1 WO2022000869 A1 WO 2022000869A1 CN 2020122315 W CN2020122315 W CN 2020122315W WO 2022000869 A1 WO2022000869 A1 WO 2022000869A1
Authority
WO
WIPO (PCT)
Prior art keywords
package
applet
bag
virtual
information
Prior art date
Application number
PCT/CN2020/122315
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 KR1020217020641A priority Critical patent/KR20210091327A/ko
Priority to EP20911300.0A priority patent/EP3958115A4/en
Priority to JP2021544309A priority patent/JP2022542203A/ja
Priority to US17/397,185 priority patent/US12014170B2/en
Publication of WO2022000869A1 publication Critical patent/WO2022000869A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Definitions

  • the present disclosure relates to the field of human-computer interaction, and in particular, to a batch processing method, apparatus, electronic device and readable storage medium for small programs.
  • a third-party development platform has been launched for enterprises that did not have development capabilities, so that third-party service providers can provide small program development services in the form of authorization.
  • third-party development platform there are many small programs that need to be managed, and business iterative upgrades are frequent, resulting in low development efficiency and unable to meet the needs of users.
  • a method for batch processing of mini-programs comprising: establishing a batch bag-lifting creation event; and in response to the batch-receiving bag creation event, creating a batch bag-lifting task to generate a batch of mini-program bag-raising tasks.
  • the package is updated to an online mini-program package and the mini-program online package is automatically published.
  • an apparatus for batch processing of small programs comprising: a building module configured to create a new event for batch pickup; a batch pickup task creation module configured to respond to the A new event for bulk pickup, creating a bulk pickup task to generate a pickup work queue including a plurality of applet pickup tasks; an extraction module, configured to take out a first number of applet pickup tasks from the pickup work queue; a virtual package A creation module is configured to create a virtual applet package for each of the first number of applet package tasks; an update release module is configured to update the virtual applet package to a small package program online package and automatically publish the mini-program online package.
  • an electronic device comprising: a processor; and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to perform the present invention method described in the publication.
  • a computer-readable storage medium storing a program, the program comprising instructions that, when executed by a processor of an electronic device, cause the electronic device to perform the functions described in the present disclosure. method described.
  • the method, apparatus, electronic device, and readable storage medium for batch processing of small programs provided by the present disclosure can process small programs in batches, improve the updating and/or processing efficiency of small programs, and thereby improve user experience.
  • FIG. 1 is a flowchart illustrating a method for batch processing of small programs according to the first exemplary embodiment of the present disclosure
  • FIG. 2 is a flowchart showing part of steps of a method for batch processing of applet according to the second exemplary embodiment of the present disclosure
  • FIG. 3 is a flowchart showing part of steps of a method for batch processing of applet according to a third exemplary embodiment of the present disclosure
  • FIG. 4 is a flowchart illustrating part of steps of a method for batch processing of applet according to a fourth exemplary embodiment of the present disclosure
  • FIG. 5 is a topology diagram illustrating a batch processing system for small programs according to an exemplary embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram illustrating an apparatus for batch processing small programs according to an exemplary embodiment of the present disclosure
  • FIG. 7 is a structural block diagram illustrating an exemplary computing device that can be applied to exemplary embodiments of the present disclosure.
  • mini-program platforms such as Baidu APP, WeChat, Alipay, etc., often only provide code package management methods for a single mini-program.
  • each applet platform is not capable of providing management methods for batch applet code packages. Therefore, third-party service providers often use existing capabilities to package and implement them according to their own business characteristics.
  • third-party service providers such as Baidu APP platform and Zhongguancun Online
  • processing services such as agent development and agent launch for more than 100,000 small programs.
  • a large number of small programs need to be managed uniformly by third-party service providers, and business iterative upgrades are quite frequent.
  • the third-party service provider referred to in this disclosure may be a small program generation developer or a small program developer, and this disclosure does not limit the subject.
  • FIG. 1 is a flowchart illustrating a method for batch processing of applet according to the first exemplary embodiment of the present disclosure.
  • the batch processing apparatus may be configured on electronic equipment.
  • the applet can be hosted on a host application, and the host application can be installed on the electronic device.
  • the electronic device may be a mobile terminal, and the mobile terminal may be a hardware device with various operating systems, such as a mobile phone, a tablet computer, and a personal digital assistant.
  • the applet referred to in this disclosure refers to a cloud application developed based on a specific programming language and can be used without downloading and installation. to install. Therefore, the method, apparatus, electronic device and readable storage medium for batch processing of small programs relate to the field of computer technology, more specifically, the field of human-computer interaction, and can also be used in scenarios related to image, video, voice, VR, and user understanding.
  • a batch processing method 100 of small programs including:
  • Step 101 establishing a new event for carrying bags in batches
  • Step 102 in response to the batch bag-lifting new event, create a batch bag-lifting task to generate a bag-handling work queue including a plurality of mini-program bag-handling tasks;
  • Step 103 taking out a first number of mini-program bag-handling tasks from the bag-handling work queue, and creating a virtual applet package for each bag-handling task in the first number of mini-program bag-handling tasks;
  • Step 104 Update the virtual applet package to an online applet package and automatically publish the online applet package.
  • establishing a new event for bulk pickup may include: receiving a source template, a target template, and package expansion information; and establishing a new event for bulk pickup for multiple applets associated with the source template.
  • the applet platform receives one or more source templates, target templates, and package expansion information provided by a third-party service provider. Whether it is the applet source template or the applet target template, it can be exemplarily owned by the third-party service provider and applied to the applet developed by the third-party service provider.
  • the package extension information includes personalized data of the applet.
  • the package expansion information includes fields that the developer or the third-party service provider wants to add, such as: serial number, identification, platform ID identification, third-party service provider ID identification, etc., and the above-mentioned package expansion information is used for loading and rendering related content. , which is of great significance to developers or third-party developers.
  • creating a batch package task to generate a package task queue including a plurality of applet package tasks includes: parsing the source template associated multiple Add the relevant information of each applet in the multiple applet associated with the source template to the bag-lifting work queue, and return the information of this batch bag-lifting task through the task tag.
  • the task information is persistently written into the task database, and the specific information of the current task is synchronously returned in the form of a task tag.
  • the applet associated with the source template received in step 101 is parsed, the relevant information of each applet is written into the package work queue, and the information of this batch package task is returned to the developer or the developer in the form of a task tag. third-party developers.
  • the information returned to the developer or third-party developer is the task details, and the developer or third-party developer has obtained the task tag.
  • the developer or third-party developer can pass the received task label to actively query the progress of task processing.
  • the first quantity is determined based on a slicing rule; and wherein the slicing rule slices the bag work queue to form N task slices, the N The top N-1 task pieces of each task piece all contain the first number of mini-program bag tasks.
  • the applet in it is extracted by sharding.
  • the applet is taken out from the bag work queue of the task according to a certain slicing rule, for example, 10 pieces. Assuming that there are a total of 98 bag-handling tasks in the entire bag-handling queue, then 10 pieces of each piece are extracted, and 10 task pieces can be obtained. The first 9 task pieces all contain 10 bag-handling tasks, and the 10th task piece contains 10 pieces of bag-handling tasks. Contains 8 bag tasks.
  • the applet batch processing method in the embodiment of the present disclosure can process a large number and an ultra-large batch of applet programs.
  • the update task status is: processing. It is understandable that the developer or third-party service provider can query the task status through the task tag.
  • a first number of applet bag tasks are taken from the bag work queue, and a virtual applet is created for each bag task in the first number of applet bag tasks
  • the program package includes: linking the code of the virtual applet package to the code of the target template; setting the package extension information as the package extension information of the target template or using the default package extension information; initializing the basic information of the virtual applet package information; wherein, the default package extension information is the last used package extension information.
  • a new virtual applet package is generated for the current group of small programs in batches, the code of the virtual applet package is linked to the code of the target template, and the target template and the package expansion information uploaded this time are combined to generate a new virtual package.
  • Package extension information is provided.
  • the virtual package code is linked to the code of the target template, and the package expansion information defaults to the last package expansion information, that is, the source
  • the package expansion information in the template, or combined with the package expansion information submitted this time, is set as the package expansion field of the target template.
  • the task status is marked as: under development.
  • the basic information may include the name of the applet, the logo of the applet, main body information, etc.
  • the main information may include but not limited to individuals, enterprises, Media, government agencies, etc.
  • the batch processing method for applet may further include, after updating the virtual applet package to an online applet package and automatically publishing the online applet package: receiving a request from the host program information; scan the online package of the applet according to the request information; and deliver the information of the online package of the applet to the client where the host program is located.
  • step 104 the virtual applet package has been updated to an online applet package and the online applet package is automatically released. At this point, the online package of the applet is ready. If the applet platform receives the request information of the host program, it will scan the online package of the current applet according to the request information of the host program. And the virtual applet package information is delivered to the client where the host program is located.
  • the information of the online package of the applet includes: the source address linking the target template, the package expansion information and the basic information of the applet.
  • the source address of the linked target template may point to at least one of a template, a publicly available code base fragment, or a reusable code fragment, and the package extension information and the basic information of the applet are the same as those described above. It is not repeated here.
  • the client where the host program is located pulls the template source code nearby through the content distribution network (CDN), and dynamically merges it with the package extension field and the basic information of the applet to form the final package.
  • CDN content distribution network
  • the SDK software development kit on the client side where the host program is located loads the final package and starts, and the applet independently obtains personalized configuration and data, and completes final rendering and display.
  • the above distribution process can also be exemplarily described as: the user opens a certain applet P1 that has been successfully released.
  • the host program requests the applet virtual package management center.
  • the applet virtual package management center queries the applet package record table in the background, and delivers the code package address of the target template, the package expansion information of the applet P1 in the package record table, and the basic information of the applet P1. Further, the host program pulls the target template code from the content distribution network (CDN) nearby according to the delivered address, merges the package expansion information, and forms a complete package with the basic information of the applet P1, and loads the applet P1 through the client SDK. After the startup is successful.
  • CDN content distribution network
  • the mini-program virtual package does not contain the specific code of the target template, which contains the link source address of the target template, and the target template code is not involved in the previous package and release links Therefore, even in the face of repeated generation and distribution of a large number of small program packages, it will not cause slow package delivery, and can also reduce storage, save download bandwidth, and content distribution network (CDN) resource occupation.
  • CDN content distribution network
  • the method further includes, after establishing a new event for bulk pickup and before creating a bulk pickup task to generate a pickup work queue including a plurality of applet pickup tasks: determining the source template, the target template and the validity of the package extension information to obtain a determination result; based on the determination result, create the batch bag picking task and update the status of the bag picking task.
  • determining the validity of the source template, the target template, and the package extension information to obtain a determination result includes: determining the development authority of the source template and the target template; and determining all the The status and authorization status of multiple applets associated with the source template.
  • FIG. 2 is a flowchart 200 illustrating part of steps of a method for batch processing of applet according to the second exemplary embodiment of the present disclosure.
  • step 105 a verification step, is further included.
  • the Mini Program platform verifies the rights of the developer or third-party service provider, including but not limited to: whether the developer or the third-party service provider has development rights for the source template and the target template, the source template and the target template. Whether all of them are in a valid state, whether the package expansion information is valid, etc.
  • FIG. 5 is a topology diagram illustrating a system for batch processing of small programs according to an exemplary embodiment of the present disclosure.
  • the content of verification includes template authority control, template validity verification and applet authorization verification.
  • template authority control the applet platform checks whether the developer or third-party service provider has development authority for both the source template and the target template.
  • template validity verification the applet platform checks the source template and target template. Whether the template status is valid, for applet authorization verification, the platform scans the applet associated with the source template to verify the validity and authorization status of the applet.
  • step 102 when the development authority and validity are satisfied and the verification is passed, then step 102 will continue to be executed to create a batch of package pickup tasks to generate a package pickup work queue including multiple applet package pickup tasks.
  • the task creation will fail, and the bag task queue will be updated, and the failed applet bag task will no longer be placed in the bag work queue.
  • the creating a virtual applet package for each of the first number of applet bag-lifting tasks further includes: confirming whether the virtual applet package is created successfully for the first time; If the creation of the virtual applet package fails once, execute the second creation of the virtual applet package; and if the creation of the virtual applet package fails for the second time, update the package delivery work queue accordingly, and push a creation failure message.
  • FIG. 3 is a flowchart 300 illustrating part of steps of a method for batch processing of applet according to the third exemplary embodiment of the present disclosure.
  • step 103 may further include judging step 1032 and judging step 1033 .
  • the determining step 1032 is used to determine whether the virtual applet package created in step 1031 is successfully created, that is, to confirm whether the virtual applet package is created successfully for the first time. If the creation is successful for the first time, continue to perform subsequent steps, for example, step 104, update the virtual applet package to an online applet package and automatically publish the online applet package.
  • the work queue for picking up the package is re-plugged, and the second creation of the virtual applet package (not shown) is performed.
  • the judging step 1033 is used for judging whether the creation of the virtual applet package for the second time is successful. If the creation of the virtual applet package fails for the second time, the package delivery work queue is updated accordingly, and a creation failure message is pushed. For example, push creation failure messages to developers or third-party service providers. The creation failure message pushed to the developer or the third-party service provider includes the specific reason for the failure to create the virtual package.
  • the method for batch processing of applet may further include: before updating the virtual applet package to an online applet package and automatically publishing the online applet package: receiving the virtual applet auditing information of the program package; auditing the auditing information to obtain an auditing result; and based on the auditing result, updating the virtual applet package to an online applet package and automatically publishing the online applet package.
  • FIG. 4 is a flowchart 400 illustrating part of steps of a method for batch processing of applet according to the fourth exemplary embodiment of the present disclosure. Exemplarily, as shown in FIG. 4 , before step 104 , an auditing step 106 is further included, and the virtual package successfully created in step 103 is audited.
  • step 104 is performed on the virtual applet package successfully created in step 103 .
  • the audit failure message is pushed and the package work queue is updated.
  • the audit information includes subject information of the virtual applet package, and auditing the audit information includes performing compliance audit on the subject information. For example, review the basic information of the applet, the main authentication information, the target template code, and the package expansion information.
  • mini-program platforms do not allow individual developers to develop mini-programs, so when the developer is an individual, the subject information of the developer will not pass the review step 106 .
  • the review step may further include reviewing the business license information, the authenticity of the legal entity, and so on.
  • auditing can be divided into machine auditing and manual auditing.
  • machine auditing for most small programs, it is generally a machine review.
  • manual review is generally required.
  • the review platform simulates the host program, merges the code of the target template, the package extension information, and the basic information of the applet, and simulates the operation of the applet, thereby completing the relevant review.
  • the auditing step 106 is exemplarily shown in FIG. 5 as code package auditing. After the auditing is successful, the process proceeds to step 104, updating the virtual applet package to an online applet package and automatically publishing the online applet package , if the audit fails, push the audit failure message and update the package work queue.
  • the batch processing method for an applet may further include: after automatically publishing the online package of the applet, pushing a publishing success message and updating the package delivery work queue.
  • step 104 a publishing success message is pushed and the package work queue is updated.
  • the status of batch processing of the applet is updated.
  • the virtual package creation failure information generated in step 103, the auditing failure message generated in step 106, and the small program package publishing success message in step 104 all affect the batch processing status of the applet, and the status is updated.
  • the package delivery failure processing sends a package delivery failure message according to the message that the virtual package creation step failed to retry, and the code package audit sends an audit failure message based on the generated virtual package audit failed message, and the release code package is launched according to the virtual package and published as Small program online package, send out the release result message.
  • FIG. 5 is a topology diagram illustrating a small program batch processing system according to yet another exemplary embodiment of the present disclosure.
  • a third-party service provider a TP service provider
  • 10 mini-programs based on template A and 2 mini-programs based on template B After the later operation, it was found that the effect of template B was better, so the TP service provider wanted to upgrade all the mini programs to template B.
  • step 102, step 103, step 104 and a terminal step are included.
  • step 102 includes:
  • the TP service provider needs to submit the source template (template A), target template (template B) and extension information to the Mini Program platform.
  • the applet platform checks whether the service provider has development rights for both template A and template B, and whether the template status is valid. Scan the associated applet under the source template, verify the validity and authorization status of the applet, and obtain 10 valid applet.
  • create a new batch bag pickup task including the task label (ID), source template A, target template B, 10 mini programs to be processed, etc.
  • the task is in the new state. Synchronously return the task details to the TP service provider.
  • the TP service provider can then actively query the task processing progress according to the task tag (ID).
  • start the task asynchronously: add the information about the to-be-pickup applet associated under the source template to the package-pickup task queue, and push the event to the next link: there is a new task to be processed.
  • step 103 includes:
  • the package code is linked to the code of template B, and the package expansion field can be the last time by default, or combined with this Determine the content of the next submission, set it as the extension field of template B, mark the task status as under development, and initialize the basic information of the current applet package.
  • step 104 includes:
  • the release result of the applet code package if one of the applet code packages fails to be released, +1 will be added to the batch pickup task failure, and a failure message of the one applet release failure will be pushed to the service provider.
  • the update task status is online, then the batch pickup task is successful +3, and the three Mini Programs are released successfully to the service provider.
  • the user opens a small program P1 that has been successfully published.
  • the host program requests the applet virtual package management center.
  • the applet virtual package management center queries the applet virtual package record table in the background, delivers the code package address of template B, the package expansion information of the applet P1 in the virtual package record table, and the basic information of the applet P1.
  • the host program then pulls the template code from the content distribution network (CDN) nearby according to the delivered address, and merges the package expansion information.
  • the basic information of the applet P1 forms a complete applet code package, and the client SDK software development kit is loaded and finally The package is started, and the applet P1 independently obtains the personalized configuration and data, and completes the final rendering and display.
  • the mini-programs are launched in batches, and the message notification process is fully asynchronous, each step provides results, and effectively reduces traffic peaks for intensive scheduling.
  • the complete code package is not directly generated in the stage of package delivery and release. Instead, the original package information is directly downloaded, and the host program pulls the template source code from the CDN (content distribution network) and merges the package expansion information locally for dynamic rendering.
  • CDN content distribution network
  • FIG. 6 is a schematic structural diagram of a batch processing apparatus for small programs according to an embodiment of the present disclosure.
  • the batch processing apparatus 600 of the applet may include: a creation module 610 , a batch package delivery task creation module 620 , a virtual package creation module 630 and an update release module 640 . Specifically, including:
  • the establishment module 610 is configured to be used for establishing a new event for carrying bags in batches
  • the batch bag-lifting task creation module 620 is configured to, in response to the batch bag-handling creation event, create a batch bag-handling task to generate a bag-handling work queue including a plurality of mini-program bag-handling tasks;
  • the virtual package creation module 630 is configured to take out a first number of applet package tasks from the package work queue, and create a virtual applet package for each package task in the first number of applet package tasks ;
  • the update publishing module 640 is configured to update the virtual applet package to an online applet package and automatically publish the online applet package.
  • the present disclosure also provides an electronic device including: a processor; and a memory storing a program, the program including instructions that, when executed by the processor, cause The processor executes the startup method according to the above-mentioned applet.
  • a computer-readable storage medium storing a program, the program including instructions which, when executed by a processor of an electronic device, cause the electronic device to execute the above-mentioned small How to start the program.
  • FIG. 7 is a block diagram of an electronic device for implementing a batch processing method of an applet according to an embodiment of the present disclosure.
  • Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
  • the electronic device 700 includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
  • the various components are interconnected using different buses and may be mounted on a common motherboard or otherwise as desired.
  • the processor may process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface.
  • multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired.
  • multiple electronic devices may be connected, each providing some of the necessary operations (eg, as a server array, a group of blade servers, or a multiprocessor system).
  • a processor 701 is taken as an example in FIG. 7 .
  • the memory 702 is the non-transitory computer-readable storage medium provided by the present disclosure.
  • the memory stores instructions executable by at least one processor, so that the at least one processor executes the batch processing method of the applet provided by the present disclosure.
  • the non-transitory computer-readable storage medium of the present disclosure stores computer instructions for causing the computer to execute the batch processing method of the applet provided by the present disclosure.
  • the memory 702 can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules ( For example, the establishment module 610, the batch package delivery task creation module 620, the virtual package creation module 630 and the update release module 640 shown in FIG. 6).
  • the processor 701 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 702 , that is, implementing the batch processing method of the applet in the above method embodiments.
  • the memory 702 may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required by at least one function; Use the created data, etc. Additionally, memory 702 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 702 may optionally include memory located remotely relative to the processor 701, and these remote memories may be connected to the electronic device for implementing the batch processing method of the applet through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the electronic device 700 for implementing the batch processing method of the applet may further include: an input device 703 and an output device 704 .
  • the processor 701 , the memory 702 , the input device 703 and the output device 704 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 7 .
  • the input device 703 can receive input numerical or character information, and generate key signal input related to user settings and function control of the electronic device used to implement the batch processing method of the applet, such as touch screen, keypad, mouse, trackpad, Input devices such as touchpads, pointing sticks, one or more mouse buttons, trackballs, joysticks, etc.
  • Output devices 704 may include display devices, auxiliary lighting devices (eg, LEDs), haptic feedback devices (eg, vibration motors), and the like.
  • the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
  • Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
  • the processor which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
  • machine-readable medium and “computer-readable medium” refer to any computer program product, apparatus, and/or apparatus for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals.
  • machine-readable signal refers to any signal used to provide machine instructions and/or data to a programmable processor.
  • the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer.
  • a display device eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
  • the systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  • a computer system can include clients and servers.
  • Clients and servers are generally remote from each other and usually interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

提供一种小程序的批量处理方法、装置、电子设备以及可读存储介质。涉及人机交互领域,也可用于与图像,视频,语音,vr,用户理解相关的场景。包括:建立批量提包新建事件;响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;从所述提包工作队列中取出第一数量的小程序提包任务;为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。

Description

小程序的批量处理方法、装置、电子设备以及可读存储介质 技术领域
本公开涉及人机交互领域,尤其涉及一种小程序的批量处理方法、装置、电子设备以及可读存储介质。
背景技术
随着互联网技术的飞速发展,各种应用程序走进了人们日常生活中,而小程序作为一种不需要下载安装即可使用的应用,更是得到了各行各业的广泛关注,如此,越来越多的应用程序上都加载有小程序,以实现对用户提供更加便捷的服务。
针对原本不具备开发能力的企业,推出了第三方开发平台,使得第三方服务商可以通过授权的形式提供小程序代开发服务。然而第三方开发平台中,需要管理的小程序众多,业务迭代升级频繁,导致开发效率低下,无法满足用户的需求。
发明内容
根据本公开的第一个方面,提供一种小程序的批量处理方法,包括:建立批量提包新建事件;响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;从所述提包工作队列中取出第一数量的小程序提包任务;为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
根据本公开的第二个方面,提供一种小程序的批量处理装置,包括:建立模块,被配置为用于建立批量提包新建事件;批量提包任务创建模块,被配置为用于响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;提取模块,被配置为用于从所述提包工作队列中取出第一数量的小程序提包任务;虚拟包创建模块,被配置为用于为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;更新发布模块,被配置为用于将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
根据本公开的第三个方面,提供一种电子设备,包括:处理器;以及存储程序的存储器,所述程序包括指令,所述指令在由所述处理器执行时使所述处理器执行本公开中所述的方法。
根据本公开的第四个方面,提供一种存储程序的计算机可读存储介质,所述程序包括指令,所述指令在由电子设备的处理器执行时,致使所述电子设备执行本公开中所述的方法。
本公开提供的小程序批量处理方法、装置、电子设备以及可读存储介质,能够批量处理小程序,提高小程序的更新和/或处理效率,从而提升用户体验。
附图说明
附图示例性地示出了实施例并且构成说明书的一部分,与说明书的文字描述一起用于讲解实施例的示例性实施方式。所示出的实施例仅出于例示的目的,并不限制权利要求的范围。在所有附图中,相同的附图标记指代类似但不一定相同的要素。
图1是示出根据本公开第一示例性实施例的小程序批量处理方法的流程图;
图2是示出根据本公开第二示例性实施例的小程序批量处理方法的部分步骤的流程图;
图3是示出根据本公开第三示例性实施例的小程序批量处理方法的部分步骤的流程图;
图4是示出根据本公开第四示例性实施例的小程序批量处理方法的部分步骤的流程图;
图5是示出根据本公开示例性实施例的小程序批量处理***的拓扑图;
图6是示出根据本公开示例性实施例的小程序批量处理装置的结构示意图;
图7是示出能够应用于本公开示例性实施例的示例性计算设备的结构框图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
相关的各小程序平台,例如百度APP、微信、支付宝等,往往只提供面向单个小程序的代码包管理方法。
在面对批量操作的业务场景时,各个小程序平台没有能力为批量的小程序代码包提供管理方法,因此,往往由第三方服务商,根据自身业务特点,借助已有能力进行封装实现。
示例性地,以百度APP平台和中关村在线等第三方服务商为例,其有可能为超过10万的小程序提供代开发,代上线等处理服务。大量的小程序需要由第三方服务商统一管理,且业务迭代升级相当频繁。
面对如此大量的批量处理需求,如果第三方服务商使用单次接口串行进行操作,将由于大量提交而造成耗时长、效率低。如果第三方服务商并发进行提包,则会导致服务端的压力不可控,影响稳定性。而且,对于同一批次的小程序,需要第三方服务商自行记录和维护小程序包状态流转等信息,缺乏统一管理。
此外,对于基于模板进行小程序的开发和管理的第三方服务商而言,对于模板提包,在提包发布环节会涉及模板代码拷贝,生成新的代码包。而大量小程序的批量处理将导致大量小程序包的重复生成和下发,导致提包速度缓慢,存储、带宽、CDN资源占用紧张。
本公开中所称的第三方服务商可以为小程序代开发商,也可以为小程序开发者,本公开中对于该主体不作出限定。
下面参照附图来描述根据本公开实施例提出的小程序的批量处理方法、装置、电子设备和计算机可读存储介质。
图1是示出根据本公开第一示例性实施例的小程序批量处理方法的流程图。需要说明的是,本公开实施例的小程序的批量处理方法可应用于本公开实施例的小程序的批量处理装置。该批量处理装置可被配置于电子设备上。作为一种示例,该小程序可寄宿在宿主应用上,该宿主应用可安装于该电子设备上。其中,该电子设备可以是移动终端,该移动终端可以是手机、平板电脑、个人数字助理等具有各种操作***的硬件设备。本公开中所称的小程序,是指一种基于特定编程语言开发完成,无需下载和安装就可以使用的云端应用程序,小程序的特点之一就是使用便捷,无需手动在终端的操作***中进行安装。因此,小程序的批量处理方法、装置、电子设备和可读存储介质涉及计算机技术领域,更具体地,为人机交互领域,也可用于与图像,视频,语音,vr,用户理解相关的场景。
如图1所示,提供了一种小程序的批量处理方法100,包括:
步骤101,建立批量提包新建事件;
步骤102,响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;
步骤103,从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;
步骤104,将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
在本公开的实施例中,在步骤101中,建立批量提包新建事件可以包括:接收源模板、目标模板和包拓展信息;对源模板关联的多个小程序建立批量提包新建事件。
示例性地,小程序平台接收到第三方服务商提供的一个或者多个源模板,目标模板,以及包拓展信息。其中无论是小程序源模板,还是小程序目标模板,示例性地可以均为第三方服务商所拥有,并应用于其所开发的小程序当中。其中,包拓展信息包含小程序的个性化数据。
示例性地,包拓展信息包括开发者或第三方服务商想要添加的字段,如:编号,标识,平台ID标识,第三方服务商ID标识等等,上述包拓展信息用于加载渲染相关内容,对于开发者或第三方开发商来有着重要的意义。
在本公开的实施例中,在步骤102中,所述响应于批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列,包括:解析所述源模板关联的多个小程序,将与所述源模板关联的多个小程序中每个小程序的相关信息添加到提包工作队列,并通过任务标签返回本次批量提包任务的信息。
示例性地,响应于步骤101,将任务信息持久化写入任务数据库,以任务标签形式,同步返回本次任务的具体信息。
具体地,解析与步骤101中接收到的源模板关联的小程序,将每个小程序的相关信息写入提包工作队列,以任务标签的形式将本次批量提包任务的信息返回给开发者或第三方开发商。
其中,返回给开发者或第三方开发商的信息为任务详情,并且开发者或第三方开发商得到了任务标签,在后续的处理流程中,开发者或第三方开发商可以通过接收到的任务标签,主动查询任务处理进度。
在本公开的实施例中,在步骤103中,所述第一数量是基于切片规则确定的;并且其中,所述切片规则对所述提包工作队列进行切片以形成N个任务片,所述N个任务片的前N-1的任务片均包含第一数量的小程序提包任务。
示例性地,对于步骤102所生成的提包工作队列,分片取出其中的小程序。
具体地,根据任务标签,从该任务的提包工作队列中,按照一定的切片规则,例如10个一片,取出小程序。假设在整个提包队列中,一共有98个提包任务,那么按照每片10个来提取,则可以得到10个任务片,前9个任务片中均包含10个提包任务,第10个任务片中包含8个提包任务。
通过分片提取提包任务,避免了大量提包任务密集调度,有效地进行流量削峰,因此,本公开实施例中的小程序批量处理方法能够对大量以及超大量的批量小程序进行处理。
示例性地,更新任务状态为:处理中。可以理解的是,开发者或者第三方服务商可以通过任务标签查询到该任务状态。
在本公开的实施例中,在步骤103中,从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包,包括:将虚拟小程序包代码链接至所述目标模板的代码;将所述包拓展信息设置为所述目标模板的包拓展信息或使用默认包拓展信息;初始化虚拟小程序包的基本信息;其中,所述默认包拓展信息为上一次使用的包拓展信息。
示例性地,批量为当前这组小程序生成新的虚拟小程序包,将虚拟小程序包的代码链接到目标模板的代码,合并目标模板和本次上传的包拓展信息生成新的虚拟包的包拓展信息。
具体地,对于每个任务片中的10个小程序,批量为这10个小程序分别创建虚拟包:虚拟包代码链接至目标模板的代码,包拓展信息默认上一次的包拓展信息,即源模板中的包拓展信息,或结合本次提交的包拓展信息,将其设置成目标模板的包拓展字段。
示例性地,标记任务状态为:开发中。
示例性地,对于初始化当前虚拟小程序包的基本信息而言,其中的基本信息可以包括小程序的名字、小程序的logo、主体信息等,具体地主体信息可以包括但不限于个人,企业,媒体,政府机构等。
在本公开的实施例中,小程序的批量处理方法还可以包括,在将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包之后:接收宿主程序的请求信息;根 据所述请求信息,扫描所述小程序线上包;以及向所述宿主程序所在的客户端下发所述小程序线上包的信息。
示例性地,执行了步骤104之后,虚拟小程序包已经被更新为小程序线上包并自动发布所述小程序线上包。此时,小程序线上包已经准备好,如果小程序平台接收到宿主程序的请求信息,那么根据宿主程序的请求信息,扫描当前小程序的线上包。并且向宿主程序所在的客户端下发虚拟小程序包信息。
在本公开的实施例中,具体的下发流程中,所述小程序线上包的信息包括:链接所述目标模板的源码地址,所述包拓展信息和小程序基本信息。其中,链接的目标模板的源码地址指向的可以是模板、公共可利用的代码库片段或可重用的代码片段中的至少一种,包拓展信息和小程序基本信息与前文中描述的内容相同,在此不再赘述。
具体地,宿主程序所在的客户端通过内容分发网络(CDN)就近拉取模板源码,并将其与包拓展字段、小程序的基本信息进行动态合并,形成最终包。
示例性地,宿主程序所在客户端SDK软件开发工具包加载最终包启动,小程序自主获取个性化配置和数据,并完成最终渲染和展示。
上述下发流程还可以示例性地描述为:用户打开某一发布成功的小程序P1。宿主程序请求小程序虚拟包管理中心。小程序虚拟包管理中心在后台查询小程序包记录表,下发目标模板的代码包地址,包记录表中小程序P1的包拓展信息,以及小程序P1的基本信息。进一步地,宿主程序根据下发的地址,就近从内容分发网络(CDN)中拉取目标模板代码,合并包拓展信息,小程序P1的基本信息形成完整包,通过客户端的SDK加载后小程序P1后启动成功。
基于以上的小程序包的下发流程可以看出,小程序虚拟包中并不包含目标模板的具体代码,其中包含了链接的目标模板源码地址,在之前的提包和发布环节不涉及目标模板代码的拷贝,因此,即使是面对大量小程序包的重复生成和下发,也不会造成提包速度缓慢,并且还能减小存储、节省下载带宽以及内容分发网络(CDN)资源的占用。
在本公开的实施例中,还包括,在建立批量提包新建事件之后,并且在创建批量提包任务以生成包括多个小程序提包任务的提包工作队列之前:确定所述源模板、所述目标模板和所述包拓展信息的有效性以获得确定结果;基于所述确定结果,创建所述批量提包任务并更新所述提包任务的状态。
在本公开的实施例中,确定所述源模板、所述目标模板和所述包拓展信息的有效性以获得确定结果包括:确定所述源模板和所述目标模板的开发权限;以及确定所述源模板关联的多个小程序的状态以及授权状态。
图2是示出根据本公开第二示例性实施例的小程序批量处理方法的部分步骤的流程图200。
如图2所示,在步骤101建立批量提包新建事件之后,并且在步骤102创建批量提包任务以生成包括多个小程序提包任务的提包工作队列之前,还包括步骤105,校验步骤。
示例性地,小程序平台对开发者或第三方服务商的权限进行校验,包括但不限于:开发者或第三方服务商是否对源模板、目标模板均有开发权限,源模板、目标模板是否均处于有效状态,包拓展信息是否有效等。
具体地,校验的内容示例性地如图5中所示,图5是示出根据本公开示例性实施例的小程序批量处理***的拓扑图。
其中,校验的内容包括模板权限控制、模板有效性校验和小程序授权校验。具体地,对于模板权限控制来说,由小程序平台检查开发者或第三方服务商对源模板、目标模板是否都具有开发权限,对于模板有效性校验,由小程序平台检查源模板、目标模板状态是否有效,对于小程序授权校验,由平台对源模板下关联的小程序进行扫描,校验小程序的有效性以及授权状态。
具体地,继续参考图2,当开发权限、有效性均得到满足后,校验通过,那么将继续执行步骤102创建批量提包任务以生成包括多个小程序提包任务的提包工作队列。
如果任何一个校验条件没有得到满足,那么将任务创建失败,更新提包任务队列,将不会再将创建失败的小程序提包任务放入提包工作队列。
在本公开的实施例中,所述为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包,还包括:确认第一次创建虚拟小程序包是否成功;如果第一次创建虚拟小程序包失败,则执行第二次创建虚拟小程序包;以及如果第二次创建虚拟小程序包失败,则相应更新所述提包工作队列,并推送创建失败消息。
图3是示出根据本公开第三示例性实施例的小程序批量处理方法的部分步骤的流程图300。如图3所示,步骤103还可以包括判断步骤1032和判断步骤1033。其中,判断步骤1032用来判断步骤1031中所创建的虚拟小程序包是否创建成功,即,确认第一次创建虚拟小程序包是否成功。如果第一次创建成功,则继续执行后续步骤,例如,步骤104,将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。如果第一 次创建虚拟小程序包失败,则对于创建失败的小程序,重新塞回提包工作队列,执行第二次创建虚拟小程序包(未示出)。判断步骤1033用于判断第二次创建虚拟小程序包是否成功。如果第二次创建虚拟小程序包失败,则相应更新所述提包工作队列,并推送创建失败消息。例如,向开发者或第三方服务商推送创建失败消息。其中,向开发者或第三方服务商推送的创建失败消息中包含虚拟包创建失败的具体原因。
在本公开的实施例中,小程序的批量处理方法还可以包括,在将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包之前:接收所述虚拟小程序包的审核信息;对所述审核信息进行审核以得到审核结果;以及基于所述审核结果,将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
图4是示出根据本公开第四示例性实施例的小程序批量处理方法的部分步骤的流程图400。示例性地,如图4所示,在步骤104之前,还包括审核步骤106,对步骤103中创建成功的虚拟包进行审核。
具体地,当审核结果为成功时,对步骤103中创建成功的虚拟小程序包执行步骤104。
在本公开的实施例中,如图4所示,如果所述审核结果为失败,则推送审核失败消息并更新所述提包工作队列。
在本公开的实施例中,所述审核信息包括所述虚拟小程序包的主体信息,并且对所述审核信息进行审核包括对于所述主体信息进行合规性审核。例如,对小程序基本信息、主体认证信息、目标模板代码、包拓展信息进行审核。
例如,某些小程序平台没有开放个人开发者开发小程序,那么当开发者为个人,其主体信息将无法通过审核步骤106。
例如,审核步骤还可以包括对工商执照信息,法人主体真实性进行审核等等。
示例性地,审核可以分为机器审核和人工审核。例如,对于大多数的小程序,一般是机器审核,当涉及到特殊主体、特殊内容或特殊行业的小程序,一般需要人工审核。示例性地,如果采用人工审核,则由审核平台模拟宿主程序,将目标模板的代码,包拓展信息,以及小程序的基本信息进行合并,模拟小程序运行,从而完成相关审核。
审核步骤106示例性地在图5中示出为代码包审核,审核成功后,则进入步骤104,将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包,如果审核失败,则推送审核失败消息并更新所述提包工作队列。
在本公开的实施例中,小程序的批量处理方法还可以包括:在自动发布所述小程序线上包之后,推送发布成功消息并更新所述提包工作队列。
示例性地,如图4所示,在步骤104之后,推送发布成功消息并更新提包工作队列。
在本公开的实施例中,基于所述创建失败消息、所述审核失败消息和所述发布成功消息,更新小程序的批量处理的状态。
示例性地,步骤103产生的虚拟包创建失败信息、步骤106产生的审核失败消息以及步骤104小程序包发布成功的消息,均对小程序批量处理状态产生影响,并对其状态进行更新。
示例性地,如图5中所示,消息推送的来源有三个:提包失败处理、代码包审核和发布代码包。
其中,提包失败处理根据重试虚拟包创建步骤失败的消息,发出提包失败消息,代码包审核根据生成的虚拟包审核未通过的消息,发出审核失败消息,发布代码包根据虚拟包上线并发布为小程序线上包,发出发布结果消息。
图5是示出根据本公开又一个示例性实施例的小程序批量处理***的拓扑图。
下面结合图5,对本公开的实施例进行说明。
在本公开的实施例中,假设一位第三方服务商:TP服务商,基于模板A开发了10款小程序,又基于模板B开发了2款小程序。经过后期运营发现,模板B效果更好,于是,TP服务商想将小程序都升级成模板B。
在该实施例中,包括步骤102、步骤103、步骤104以及终端步骤。
其中,步骤102包括:
TP服务商需要向小程序平台提交,源模板(模板A),目标模板(模板B)和拓展信息。
接下来,进行模板权限控制、模板有效性校验、模板小程序解析以及小程序授权校验。
具体地,由小程序平台检查服务商对模板A、模板B是否都具有开发权限,以及模板状态是否有效。对源模板下关联的小程序进行扫描,校验小程序的有效性,以及授权状态,获取有效小程序10款。
进行上述校验步骤后,创建批量提包任务,并生成批量提包任务表。
具体地,新建批量提包任务,包含任务标签(ID),源模板A,目标模板B,需要处理的10款小程序等,任务处于新建状态。同步向TP服务商返回任务详情。TP服务商后续可以根据任务标签(ID),主动查询任务处理进度。
并且,异步开启任务:将源模板下关联的待提包小程序信息添加到提包任务队列中,并向下一环节推送事件:有新任务待处理。
进入步骤103,其中,步骤103包括:
根据任务标签(ID),从该任务的提包工作队列中,按照一定的切片规则(例如10个一组),取出小程序。更新任务状态:处理中。
对于每个批次10个小程序,在小程序包记录表中,批量为这10个小程序分别创建虚拟包:包代码链接至模板B的代码,包拓展字段可以默认上一次,或结合本次提交的内容来确定,设置成模板B的拓展字段,标记任务状态为开发中,以及初始化当前小程序包的基本信息。
其中,若有6个小程序虚拟包生成成功,则将另外4个失败的重新塞回工作队列。若重试依然失败,更新批量提包任务失败数量+4,同时给服务商推送这四个小程序代码包生成失败的具体原因。
对完成代码包生成的6个小程序,将小程序基本信息,主体信息,模板B代码推送至审核平台,进行基本信息,以及主体真实性审核。
进入步骤104,其中步骤104包括:
订阅审核平台的消息,通过小程序标识(ID)和代码包标识(ID),过滤出送审的6个小程序审核结果。若有2个审核结果为不通过,则更新批量提包任务失败数量+2,同时给服务商推送这两个小程序代码包审核失败的具体原因。对审核结果通过的4个小程序,进行代码包自动发布。
按照小程序代码包的发布结果,若有1个发布失败,则批量提包任务失败+1,向服务商推送这1个小程序发布失败消息。对于成功发布的3个小程序,更新任务状态为上线状态,则批量提包任务成功+3,向服务商推送这三个小程序发布成功消息。
基于全局异步脚本,检测到发布成功(3)+代码包生成失败(4)+审核失败(2)+发布失败(1)=任务包含的小程序总数(10),更新任务状态为已完成。
进一步地,还包括小程序的下发过程,其中包括终端步骤:终端动态以及合并渲染。
用户打开某一发布成功的小程序P1。宿主程序请求小程序虚拟包管理中心。
小程序虚拟包管理中心在后台中查询小程序虚拟包记录表,下发模板B的代码包地址,虚拟包记录表中小程序P1的包拓展信息,以及小程序P1的基本信息。
宿主程序再根据下发的地址,就近从内容分发网络(CDN)中拉取模板代码,合并包拓展信息,小程序P1的基本信息形成完整小程序代码包,客户端SDK软件开发工具包加载最终包启动,小程序P1自主获取个性化配置和数据,并完成最终渲染和展示。
因此,在本公开的实施例中,小程序批量提包上线、消息通知流程全异步化,各个步骤提供结果,有效对密集调度进行流量削峰,理论上对提包时长,提包数量均没有限制。并且由于采用了小程序虚拟包的形式,在提包和发布阶段不直接生成完整代码包。而是直接下原始包信息,由宿主程序从CDN(内容分发网络)拉取模板源码在本地合并包拓展信息,进行动态渲染。在批量处理小程序的过程中,减少了提包、发布等处理环节的重复拷贝代码,节省云端和CDN环节的包存储和下载带宽,有效提升批量提包、发布以及下发的效率,极大地提升了小程序批量处理的效率。
与上述几种实施例提供的小程序的批量处理方法相对应,本公开的一种实施例还提供一种小程序的批量处理装置,由于本公开实施例提供的小程序的批量处理装置与上述几种实施例提供的小程序的批量处理方法相对应,因此在前述小程序的批量处理方法的实施方式也适用于本实施例提供的小程序的批量处理装置,在本实施例中不再详细描述。图6是根据本公开一个实施例的小程序的批量处理装置的结构示意图。如图6所示,该小程序的批量处理装置600可以包括:建立模块610、批量提包任务创建模块620、虚拟包创建模块630和更新发布模块640。具体地,包括:
建立模块610,被配置为用于建立批量提包新建事件;
批量提包任务创建模块620,被配置为用于响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;
虚拟包创建模块630,被配置为用于从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;
更新发布模块640,被配置为用于将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
根据本公开的实施例,本公开还提供了一种电子设备,该电子设备包括:处理器;以及,存储程序的存储器,所述程序包括指令,所述指令在由所述处理器执行时使所述处理器执行根据上述的小程序的启动方法。
根据本公开的实施例,还提供了一种存储程序的计算机可读存储介质,所述程序包括指令,所述指令在由电子设备的处理器执行时,致使所述电子设备执行根据上述的小程序的启动方法。
图7是根据本公开实施例的用以实现小程序的批量处理方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图7所示,该电子设备700包括:一个或多个处理器701、存储器702,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器***)。图7中以一个处理器701为例。
存储器702即为本公开所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本公开所提供的小程序的批量处理方法。本公开的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本公开所提供的小程序的批量处理方法。
存储器702作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本公开实施例中的小程序的批量处理方法对应的程序指令/模块(例如,图6所示的建立模块610、批量提包任务创建模块620、虚拟包创建模块630和更新发布模块640)。处理器701通过运行存储在存储器702中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的小程序的批量处理方法。
存储器702可以包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需要的应用程序;存储数据区可存储根据用以实现小程序的批量处理方法的电子设备的使用所创建的数据等。此外,存储器702可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器702可选包括相对于处理器701远程设置的存储器, 这些远程存储器可以通过网络连接至用以实现小程序的批量处理方法的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
用以实现小程序的批量处理方法的电子设备700还可以包括:输入装置703和输出装置704。处理器701、存储器702、输入装置703和输出装置704可以通过总线或者其他方式连接,图7中以通过总线连接为例。
输入装置703可接收输入的数字或字符信息,以及产生与用以实现小程序的批量处理方法的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置704可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。
此处描述的***和技术的各种实施方式可以在数字电子电路***、集成电路***、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程***上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储***、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储***、该至少一个输入装置、和该至少一个输出装置。
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。
为了提供与用户的交互,可以在计算机上实施此处描述的***和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供 给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的***和技术实施在包括后台部件的计算***(例如,作为数据服务器)、或者包括中间件部件的计算***(例如,应用服务器)、或者包括前端部件的计算***(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的***和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算***中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将***的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机***可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。

Claims (18)

  1. 一种小程序的批量处理方法,包括:
    建立批量提包新建事件;
    响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;
    从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;
    将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
  2. 如权利要求1所述的方法,其中,所述建立批量提包新建事件,包括:
    接收源模板、目标模板和包拓展信息;
    对源模板关联的多个小程序建立批量提包新建事件。
  3. 如权利要求2所述的方法,其中,
    所述响应于批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列,包括:
    解析所述源模板关联的多个小程序,将与所述源模板关联的多个小程序中每个小程序的相关信息添加到提包工作队列,并通过任务标签返回本次批量提包任务的信息。
  4. 如权利要求1所述的方法,其中,所述第一数量是基于切片规则确定的;并且
    其中,所述切片规则对所述提包工作队列进行切片以形成N个任务片,所述N个任务片的前N-1的任务片均包含第一数量的小程序提包任务。
  5. 如权利要求2所述的方法,其中,
    所述从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包,包括:
    将虚拟小程序包代码链接至所述目标模板的代码;
    将所述包拓展信息设置为所述目标模板的包拓展信息或使用默认包拓展信息;
    初始化虚拟小程序包的基本信息;
    其中,所述默认包拓展信息为上一次使用的包拓展信息。
  6. 如权利要求5所述的方法,还包括,在将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包之后:
    接收宿主程序的请求信息;
    根据所述请求信息,扫描所述小程序线上包;以及
    向所述宿主程序所在的客户端下发所述小程序线上包的信息。
  7. 如权利要求6所述的方法,其中,
    所述小程序线上包的信息包括:链接所述目标模板的源码地址,所述包拓展信息和小程序基本信息。
  8. 如权利要求2所述的方法,还包括,在建立批量提包新建事件之后,并且在创建批量提包任务以生成包括多个小程序提包任务的提包工作队列之前:
    确定所述源模板、所述目标模板和所述包拓展信息的有效性以获得确定结果;
    基于所述确定结果,创建所述批量提包任务并更新所述提包任务的状态。
  9. 如权利要求8所述的方法,其中,
    确定所述源模板、所述目标模板和所述包拓展信息的有效性以获得确定结果包括:
    确定所述源模板和所述目标模板的开发权限;以及
    确定所述源模板关联的多个小程序的状态以及授权状态。
  10. 如权利要求5所述的方法,其中,
    所述从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包,还包括:
    确认第一次创建虚拟小程序包是否成功;
    如果第一次创建虚拟小程序包失败,则执行第二次创建虚拟小程序包;以及
    如果第二次创建虚拟小程序包失败,则相应更新所述提包工作队列,并推送创建失败消息。
  11. 如权利要求10所述的方法,还包括,在所述将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包之前:
    接收所述虚拟小程序包的审核信息;
    对所述审核信息进行审核以得到审核结果;以及
    基于所述审核结果,将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
  12. 如权利要求11所述的方法,其中,
    如果所述审核结果为失败,则推送审核失败消息并更新所述提包工作队列。
  13. 如权利要求11所述的方法,其中,
    所述审核信息包括所述虚拟小程序包的主体信息,并且
    对所述审核信息进行审核包括对于所述主体信息进行合规性审核。
  14. 如权利要求12所述的方法,还包括:
    在所述自动发布所述小程序线上包之后,推送发布成功消息并更新所述提包工作队列。
  15. 如权利要求14所述的方法,还包括:
    基于所述创建失败消息、所述审核失败消息和所述发布成功消息,更新小程序的批量处理的状态。
  16. 一种小程序的批量处理装置,包括:
    建立模块,被配置为用于建立批量提包新建事件;
    批量提包任务创建模块,被配置为用于响应于所述批量提包新建事件,创建批量提包任务以生成包括多个小程序提包任务的提包工作队列;
    虚拟包创建模块,被配置为用于从所述提包工作队列中取出第一数量的小程序提包任务,为所述第一数量的小程序提包任务中的每个提包任务创建虚拟小程序包;
    更新发布模块,被配置为用于将所述虚拟小程序包更新为小程序线上包并自动发布所述小程序线上包。
  17. 一种电子设备,包括:
    处理器;以及
    存储程序的存储器,所述程序包括指令,所述指令在由所述处理器执行时使所述处理器执行根据权利要求1-15中任一项所述的方法。
  18. 一种存储程序的计算机可读存储介质,所述程序包括指令,所述指令在由电子设备的处理器执行时,致使所述电子设备执行根据权利要求1-15中任一项所述的方法。
PCT/CN2020/122315 2020-06-28 2020-10-21 小程序的批量处理方法、装置、电子设备以及可读存储介质 WO2022000869A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020217020641A KR20210091327A (ko) 2020-06-28 2020-10-21 애플릿의 배치 처리방법, 장치, 전자 기기 및 판독가능 저장매체
EP20911300.0A EP3958115A4 (en) 2020-06-28 2020-10-21 METHOD AND DEVICE FOR PROCESSING MINIPROGRAM BATCH, ELECTRONIC DEVICE AND READABLE STORAGE MEDIUM
JP2021544309A JP2022542203A (ja) 2020-06-28 2020-10-21 ミニプログラムのバッチ処理方法、装置、電子機器及び可読記憶媒体
US17/397,185 US12014170B2 (en) 2020-06-28 2021-08-09 Mini program batch processing method and apparatus, electronic device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010600458.6 2020-06-28
CN202010600458.6A CN111752587B (zh) 2020-06-28 2020-06-28 小程序的批量处理方法、装置、电子设备以及可读存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/397,185 Continuation US12014170B2 (en) 2020-06-28 2021-08-09 Mini program batch processing method and apparatus, electronic device, and readable storage medium

Publications (1)

Publication Number Publication Date
WO2022000869A1 true WO2022000869A1 (zh) 2022-01-06

Family

ID=72677722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/122315 WO2022000869A1 (zh) 2020-06-28 2020-10-21 小程序的批量处理方法、装置、电子设备以及可读存储介质

Country Status (2)

Country Link
CN (1) CN111752587B (zh)
WO (1) WO2022000869A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114399292A (zh) * 2022-01-21 2022-04-26 中欧基金管理有限公司 用于控制业务审批流程的方法、计算设备和介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752587B (zh) * 2020-06-28 2024-05-10 北京百度网讯科技有限公司 小程序的批量处理方法、装置、电子设备以及可读存储介质
JP2022542203A (ja) 2020-06-28 2022-09-30 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド ミニプログラムのバッチ処理方法、装置、電子機器及び可読記憶媒体
CN112328333B (zh) * 2020-10-27 2023-03-17 武汉联影医疗科技有限公司 内置程序操作方法、装置、计算机设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170019456A1 (en) * 1998-03-18 2017-01-19 Implicit, Llc Application server for delivering applets to client computing devices in a distributed environment
CN110308917A (zh) * 2019-06-26 2019-10-08 深圳前海微众银行股份有限公司 小程序发布方法、装置、设备及计算机存储介质
CN110569050A (zh) * 2019-08-01 2019-12-13 阿里巴巴集团控股有限公司 一种小程序更新方法和装置
CN110688124A (zh) * 2019-08-23 2020-01-14 北京奇艺世纪科技有限公司 小程序处理方法、装置、电子设备及计算机可读存储介质
CN111258565A (zh) * 2020-01-21 2020-06-09 深圳乐信软件技术有限公司 小程序的生成方法、***、服务器及存储介质
CN111338684A (zh) * 2020-03-20 2020-06-26 成都药王科技股份有限公司 一种程序发布方法
CN111752587A (zh) * 2020-06-28 2020-10-09 北京百度网讯科技有限公司 小程序的批量处理方法、装置、电子设备以及可读存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106709288B (zh) * 2016-12-22 2018-07-24 腾讯科技(深圳)有限公司 应用程序审核操作权限处理方法和装置
CN110865855B (zh) * 2019-11-18 2023-10-27 百度在线网络技术(北京)有限公司 小程序处理方法及相关设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170019456A1 (en) * 1998-03-18 2017-01-19 Implicit, Llc Application server for delivering applets to client computing devices in a distributed environment
CN110308917A (zh) * 2019-06-26 2019-10-08 深圳前海微众银行股份有限公司 小程序发布方法、装置、设备及计算机存储介质
CN110569050A (zh) * 2019-08-01 2019-12-13 阿里巴巴集团控股有限公司 一种小程序更新方法和装置
CN110688124A (zh) * 2019-08-23 2020-01-14 北京奇艺世纪科技有限公司 小程序处理方法、装置、电子设备及计算机可读存储介质
CN111258565A (zh) * 2020-01-21 2020-06-09 深圳乐信软件技术有限公司 小程序的生成方法、***、服务器及存储介质
CN111338684A (zh) * 2020-03-20 2020-06-26 成都药王科技股份有限公司 一种程序发布方法
CN111752587A (zh) * 2020-06-28 2020-10-09 北京百度网讯科技有限公司 小程序的批量处理方法、装置、电子设备以及可读存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114399292A (zh) * 2022-01-21 2022-04-26 中欧基金管理有限公司 用于控制业务审批流程的方法、计算设备和介质

Also Published As

Publication number Publication date
CN111752587B (zh) 2024-05-10
CN111752587A (zh) 2020-10-09

Similar Documents

Publication Publication Date Title
WO2022000869A1 (zh) 小程序的批量处理方法、装置、电子设备以及可读存储介质
US11036696B2 (en) Resource allocation for database provisioning
WO2022073354A1 (zh) 业务审核通知方法及网关、电子设备、可读介质
US11093232B2 (en) Microservice update system
US7305672B2 (en) Dynamic software update system, method and program product
US12014170B2 (en) Mini program batch processing method and apparatus, electronic device, and readable storage medium
WO2019201039A1 (zh) 一种更新应用程序的方法、***及应用服务器
CN110825479A (zh) 页面处理方法、装置、终端设备、服务器和存储介质
US20130318512A1 (en) Hot Pluggable Extensions for Access Management System
CN111400000B (zh) 网络请求处理方法、装置、设备和存储介质
US20210342203A1 (en) Api manager
CN111090423B (zh) 一种webhook框架***和实现主动调用、实现事件触发的方法
CN111459813B (zh) 测试处理方法及装置
CN111478956A (zh) 小程序包的部署、预览方法和装置
CN111694620A (zh) 第三方业务的交互方法、装置、设备及计算机存储介质
WO2023169193A1 (zh) 用于生成智能合约的方法和装置
CN111414154A (zh) 前端开发的方法、装置、电子设备和存储介质
EP4009611A1 (en) Service auditing notification method, gateway, electronic device, and readable medium
CN114489674A (zh) 动态数据模型的数据校验方法和装置
CN111309380A (zh) 服务实例的配置方法、装置及***
CN114500630A (zh) 消息推送的方法、装置、***、存储介质和电子设备
CN112241332A (zh) 一种接口补偿的方法和装置
CN113032004A (zh) 在开发环境中管理开发作业的方法、设备和程序产品
US20230247111A1 (en) Runtime module conversion
CN116680213A (zh) 数据处理方法、计算机设备及可读存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 20217020641

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2020911300

Country of ref document: EP

Effective date: 20210712

ENP Entry into the national phase

Ref document number: 2021544309

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE