CN110308917A - Small program distribution method, device, equipment and computer storage medium - Google Patents
Small program distribution method, device, equipment and computer storage medium Download PDFInfo
- Publication number
- CN110308917A CN110308917A CN201910565822.7A CN201910565822A CN110308917A CN 110308917 A CN110308917 A CN 110308917A CN 201910565822 A CN201910565822 A CN 201910565822A CN 110308917 A CN110308917 A CN 110308917A
- Authority
- CN
- China
- Prior art keywords
- small routine
- data
- task
- version
- content
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000003860 storage Methods 0.000 title claims abstract description 25
- 230000008569 process Effects 0.000 claims abstract description 21
- 238000012546 transfer Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims description 31
- 230000003068 static effect Effects 0.000 claims description 24
- 238000004519 manufacturing process Methods 0.000 claims description 20
- 238000012986 modification Methods 0.000 claims description 7
- 230000004048 modification Effects 0.000 claims description 7
- 238000009826 distribution Methods 0.000 claims description 4
- 238000001514 detection method Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 7
- 230000007613 environmental effect Effects 0.000 abstract 2
- 238000004891 communication Methods 0.000 description 6
- 238000007726 management method Methods 0.000 description 6
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- FGUUSXIOTUKUDN-IBGZPJMESA-N C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 Chemical compound C1(=CC=CC=C1)N1C2=C(NC([C@H](C1)NC=1OC(=NN=1)C1=CC=CC=C1)=O)C=CC=C2 FGUUSXIOTUKUDN-IBGZPJMESA-N 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/76—Adapting program code to run in a different environment; Porting
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明涉及金融科技(Fintech)技术领域,并公开了一种小程序发布方法,该方法包括:在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;当接收到基于所述小程序体验版的预览指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对所述小程序体验版的内容数据进行修改;若否,则将任务事件传递到小程序正式版中。本发明还公开了一种小程序发布装置、设备和一种计算机存储介质。本发明提高了小程序内容发布流程的可移植性。
The present invention relates to the technical field of financial science and technology (Fintech), and discloses a method for releasing a small program. The method includes: when a small program to be updated is detected, acquiring a task event preset in the small program, and based on the The task event updates the content data in the applet to obtain a trial version of the applet; when a preview instruction based on the trial version of the small program is received, the preview screen corresponding to the trial version of the small program is displayed, And obtain the first environmental parameter in the preview screen, determine whether the content data of the trial version of the mini program needs to be modified based on the first environmental parameter; if not, then transfer the task event to the official version of the mini program . The invention also discloses a small program issuing device, equipment and a computer storage medium. The invention improves the portability of the applet content publishing process.
Description
技术领域technical field
本发明涉及金融科技(Fintech)技术领域,尤其涉及小程序发布方法、装置、设备及计算机存储介质。The present invention relates to the technical field of financial technology (Fintech), in particular to a small program publishing method, device, equipment and computer storage medium.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(大数据、分布式、区块链Blockchain、人工智能等)应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,但由于金融行业的安全性、实时性要求,也对技术提出了更高的要求。目前的金融科技领域中,有各种程序内容更新发布的技术,例如,对小程序内容的更新,目前,会有一个内容管理平台,对小程序内容进行编辑更新,当操作员点击发布时,通过小程序就可以访问到这些更新内容。但是,由于发布的目的是对目标区域的内容进行更新,而数据类型是多样化的,每个系统技术方案实现也是多样化的,一般发布操作和待发布内容耦合严重,数据类型变更时,发布流程经常需要进行调整,从而导致不同系统发布流程的可移植性很差。因此,如何提高小程序内容发布流程的可移植性成为了目前亟待解决的技术问题。With the development of computer technology, more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) The industry's security and real-time requirements also put forward higher requirements for technology. In the current financial technology field, there are various technologies for updating and publishing program content. For example, to update the content of small programs. At present, there will be a content management platform to edit and update the content of small programs. When the operator clicks to publish, These updates can be accessed through the applet. However, since the purpose of publishing is to update the content of the target area, and the data types are diverse, the implementation of each system technical solution is also diverse. Generally, the coupling between publishing operations and the content to be released is serious. When the data type changes, the publishing The process often needs to be adjusted, resulting in poor portability of the release process for different systems. Therefore, how to improve the portability of the mini program content release process has become a technical problem that needs to be solved urgently.
发明内容Contents of the invention
本发明的主要目的在于提出一种小程序发布方法、装置、设备及计算机存储介质,旨在提高对小程序内容发布流程的可移植性。The main purpose of the present invention is to provide a small program publishing method, device, equipment and computer storage medium, aiming at improving the portability of the small program content publishing process.
为实现上述目的,本发明提供一种小程序发布方法,所述小程序发布方法包括如下步骤:In order to achieve the above purpose, the present invention provides a small program publishing method, the small program publishing method includes the following steps:
在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;When the applet to be updated is detected, a task event preset in the applet is obtained, and based on the task event, the content data in the applet is updated to obtain a trial version of the applet;
当接收到基于所述小程序体验版的预览指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对任务事件进行修改;When a preview instruction based on the trial version of the applet is received, the preview screen corresponding to the trial version of the small program is displayed, and the first environment parameter is acquired in the preview screen, and based on the first environment parameter, it is determined whether to Modify task events;
若否,则将所述任务事件传递到与所述小程序体验版对应的小程序正式版中。If not, the task event is delivered to the official version of the applet corresponding to the trial version of the applet.
可选地,所述获取所述小程序中预设的任务事件,并基于所述任务事件对所述内容数据进行数据更新的步骤,包括:Optionally, the step of acquiring preset task events in the applet and updating the content data based on the task events includes:
获取所述小程序中的内容分发网络CDN内容和预设的数据处理任务,并确定是否对所述CDN内容进行更新;Acquiring the CDN content and preset data processing tasks in the applet, and determining whether to update the CDN content;
若是,则根据所述内容数据的数据类型对所述CDN内容进行更新,以获取CDN发布任务,并将所述数据处理任务和所述CDN发布任务作为预设的任务事件对所述内容数据进行数据更新。If so, update the CDN content according to the data type of the content data to obtain the CDN release task, and use the data processing task and the CDN release task as preset task events to perform the processing on the content data Data Update.
可选地,所述展示所述小程序体验版对应的预览画面的步骤,包括:Optionally, the step of displaying the preview screen corresponding to the trial version of the applet includes:
检测所述任务事件中是否存在重复任务,若存在重复任务,则删除所述任务事件中的重复任务,以得到新任务事件,并基于所述新任务事件展示所述小程序体验版对应的预览画面。Detect whether there is a repeated task in the task event, and if there is a repeated task, delete the repeated task in the task event to obtain a new task event, and display a preview corresponding to the trial version of the applet based on the new task event screen.
可选地,所述基于所述新任务事件展示所述小程序体验版对应的预览画面的步骤,包括:Optionally, the step of displaying the preview screen corresponding to the trial version of the applet based on the new task event includes:
获取输入的操作指令,并确定所述操作指令是否为更新指令;Obtain an input operation instruction, and determine whether the operation instruction is an update instruction;
若所述操作指令是更新指令,则获取所述新任务事件对应的资源数据表,并根据所述资源数据表展示所述小程序体验版对应的预览画面。If the operation instruction is an update instruction, obtain the resource data table corresponding to the new task event, and display the preview screen corresponding to the trial version of the applet according to the resource data table.
可选地,所述资源数据表包括预览表,所述获取所述新任务事件对应的资源数据表的步骤,包括:Optionally, the resource data table includes a preview table, and the step of acquiring the resource data table corresponding to the new task event includes:
获取所述新任务事件中的数据处理任务,并基于所述新任务事件中的数据处理任务将所述小程序中的动态数据同步到新任务事件对应的预览表,并获取具有所述动态数据的预览表;Obtain the data processing task in the new task event, and based on the data processing task in the new task event, synchronize the dynamic data in the applet to the preview table corresponding to the new task event, and obtain the the preview table;
可选地,所述资源数据表包括CDN内容存储目录,所述获取所述新任务事件对应的资源数据表的步骤,包括:Optionally, the resource data table includes a CDN content storage directory, and the step of acquiring the resource data table corresponding to the new task event includes:
获取所述新任务事件中的CDN发布任务,并基于所述新任务事件中的CDN发布任务将所述小程序中的静态资源上传至所述CDN内容存储目录,并获取具有所述静态资源的CDN内容存储目录。Acquiring the CDN release task in the new task event, and uploading the static resources in the applet to the CDN content storage directory based on the CDN release task in the new task event, and obtaining the CDN content storage directory.
可选地,所述将所述任务事件传递到与所述小程序体验版对应的小程序正式版中的步骤,包括:Optionally, the step of transferring the task event to the official version of the mini program corresponding to the trial version of the mini program includes:
将所述任务事件传递到与所述小程序体验版对应的小程序正式版中,并检测所述小程序正式版接收到的操作类型是否为更新,若所述操作类型为更新,则将所述资源数据表中的动态数据和静态资源传递至所述小程序正式版中的资源数据表,其中,所述小程序正式版根据所述小程序正式版中的第二环境参数对所述生产表进行检测,若检测合格,则所述小程序正式版中的内容数据不进行修改。Transfer the task event to the official version of the applet corresponding to the trial version of the applet, and detect whether the operation type received by the official version of the applet is an update, if the operation type is an update, send the The dynamic data and static resources in the resource data table are transferred to the resource data table in the official version of the applet, wherein the official version of the applet is based on the second environment parameter in the official version of the applet. If the test is qualified, the content data in the official version of the applet will not be modified.
此外,为实现上述目的,本发明还提供一种小程序发布装置,所述小程序发布装置包括:In addition, in order to achieve the above purpose, the present invention also provides a small program publishing device, the small program publishing device includes:
获取模块,用于在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;An acquisition module, configured to acquire a preset task event in the applet when detecting the applet to be updated, and update the content data in the applet based on the task event, so as to obtain the applet Trial Version;
确定模块,用于当接收到基于所述小程序体验版的预览指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对所述小程序体验版的内容数据进行修改;A determining module, configured to display a preview screen corresponding to the mini program trial version when receiving a preview instruction based on the mini program trial version, and acquire a first environment parameter in the preview screen, based on the first The environment parameter determines whether the content data of the trial version of the mini program needs to be modified;
传递模块,用于若否,则将所述任务事件传递到与所述小程序体验版对应的小程序正式版中。A transfer module, configured to, if not, transfer the task event to the official version of the applet corresponding to the trial version of the applet.
此外,为实现上述目的,本发明还提供一种小程序发布设备,所述小程序发布设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的小程序发布程序,所述小程序发布程序被所述处理器执行时实现如上所述的小程序发布方法的步骤。In addition, in order to achieve the above object, the present invention also provides a small program distribution device, which includes: a memory, a processor, and a small program distribution device stored in the memory and operable on the processor. A program, when the applet publishing program is executed by the processor, implements the steps of the above applet publishing method.
此外,为实现上述目的,本发明还提供一种计算机存储介质,所述计算机存储介质上存储有小程序发布程序,所述小程序发布程序被处理器执行时实现如上所述的小程序发布方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer storage medium, on which a small program release program is stored, and when the small program release program is executed by a processor, the above-mentioned small program release method is realized A step of.
本发明通过在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;当接收到基于所述小程序体验版的预览指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对所述小程序体验版的内容数据进行修改;若否,则将所述任务事件传递到与所述小程序体验版对应的小程序正式版中。通过在对待更新的小程序中的内容数据进行更新后,获取更新后的预览画面,从而可以及时的知道进行修改的内容数据是否符合预设要求,避免了现有技术中由于缺少预览机制,在进行数据更新时,新增的数据内容可能会影响小程序某个页面的排版展示而不能及时发现的现象发生,并在新内容数据符合要求后,再发送至小程序正式版,从而进一步地提高了小程序发布的准确性,并且对小程序发布内容的修改和对小程序发布内容的发布是在不同的位置进行的,因此也避免了现有技术中发布操作和待发布内容耦合严重,数据类型变更时,发布流程需要经常调整的现象发生,提高了小程序内容发布流程的可移植性。In the present invention, when the applet to be updated is detected, the task event preset in the applet is obtained, and the content data in the applet is updated based on the task event, so as to obtain the experience version of the applet ; When a preview instruction based on the trial version of the applet is received, a preview screen corresponding to the trial version of the small program is displayed, and a first environment parameter is acquired in the preview screen, and whether to determine based on the first environment parameter It is necessary to modify the content data of the trial version of the applet; if not, transfer the task event to the official version of the applet corresponding to the trial version of the applet. By obtaining the updated preview screen after updating the content data in the applet to be updated, it is possible to know in time whether the modified content data meets the preset requirements, avoiding the lack of preview mechanism in the prior art. When updating data, the newly added data content may affect the typesetting display of a certain page of the Mini Program and cannot be detected in time. After the new content data meets the requirements, it will be sent to the official version of the Mini Program to further improve The accuracy of the release of the applet is improved, and the modification of the release content of the applet and the release of the release content of the applet are carried out in different locations, so it also avoids the serious coupling between the release operation and the content to be released in the prior art, and the data When the type changes, the publishing process needs to be adjusted frequently, which improves the portability of the mini program content publishing process.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图;Fig. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present invention;
图2为本发明小程序发布方法第一实施例的流程示意图;FIG. 2 is a schematic flow chart of the first embodiment of the method for publishing a small program in the present invention;
图3为本发明小程序发布装置的装置模块示意图;Fig. 3 is a schematic diagram of the device modules of the applet publishing device of the present invention;
图4为本发明小程序发布方法中小程序内容更新的流程示意图;Fig. 4 is a schematic flow chart of updating the contents of the applet in the applet publishing method of the present invention;
图5为本发明小程序发布方法中发布预览的流程示意图;Fig. 5 is a schematic flow chart of releasing a preview in the applet publishing method of the present invention;
图6为本发明小程序发布方法中发布生产的流程示意图;Fig. 6 is a schematic flow chart of release production in the applet release method of the present invention;
图7为本发明小程序发布方法中发布策略的时序示意图。FIG. 7 is a schematic timing diagram of publishing strategies in the applet publishing method of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic diagram of the equipment structure of the hardware operating environment involved in the solution of the embodiment of the present invention.
本发明实施例小程序发布设备可以是PC机或服务器设备,其上运行有Java虚拟机。The applet publishing device in the embodiment of the present invention may be a PC or a server device on which a Java virtual machine runs.
如图1所示,该小程序发布设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the applet publishing device may include: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in FIG. 1 does not constitute a limitation to the device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及小程序发布程序。As shown in FIG. 1 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an applet publishing program.
在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的小程序发布程序,并执行下述小程序发布方法中的操作。In the equipment shown in Fig. 1, the network interface 1004 is mainly used to connect the background server and carry out data communication with the background server; the user interface 1003 is mainly used to connect the client (client) and carry out data communication with the client; and the processor 1001 may be used to call the applet publishing program stored in the memory 1005, and execute the operations in the following applet publishing method.
基于上述硬件结构,提出本发明小程序发布方法实施例。Based on the above hardware structure, an embodiment of the applet publishing method of the present invention is proposed.
参照图2,图2为本发明小程序发布方法第一实施例的流程示意图,所述方法包括:Referring to Fig. 2, Fig. 2 is a schematic flow chart of the first embodiment of the method for publishing a small program according to the present invention, the method comprising:
步骤S10,在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;Step S10, when the applet to be updated is detected, obtain the task event preset in the applet, and update the content data in the applet based on the task event, so as to obtain a trial version of the applet ;
在本实施例中,小程序可以是一种不需要下载安装即可使用的应用,它实现了应用触手可及的梦想,用户扫一下或搜一下即可打开应用。小程序中包含有发布流程和数据,该数据内容解耦(其中,数据内容解耦是提前规划好通用的任务事件,在操作员更新小程序内容时,根据任务事件对小程序中的静态资源和动态数据进行更新,实现数据解耦。),而发布流程是操作员通过任务事件对小程序进行内容更新,并在内容更新完成,且检查无误后,将任务事件进行发布。该小程序中自定义一个数据结构“任务事件”,以描述操作类型、数据类型,源数据信息(所属表、数据主键、文件地址等)、目标数据信息(服务地址、目的数据表、文件地址等)等信息,通用描述各种涉及的发布操作,文件上传,文件删除、数据同步、数据删除、文件复制等。把需要发布的数据类型,作为这一系列任务事件,异步按顺序记录在数据库中,触发发布时后台系统获取这些任务事件,识别执行。任务事件是系统识别执行的,是操作员操作数据后台抽象的一种待执行任务。In this embodiment, the applet can be an application that can be used without downloading and installing. It realizes the dream of having an application at your fingertips, and the user can open the application by scanning or searching. The applet contains the publishing process and data, and the data content is decoupled (wherein, the data content decoupling is to plan the common task event in advance, and when the operator updates the applet content, the static resource in the applet is updated according to the task event and dynamic data to achieve data decoupling.), and the publishing process is that the operator updates the content of the applet through the task event, and after the content update is completed and checked, the task event is released. In this applet, a data structure "task event" is customized to describe the operation type, data type, source data information (belonging table, data primary key, file address, etc.), target data information (service address, destination data table, file address, etc.) etc.) and other information, generally describing various involved release operations, file upload, file deletion, data synchronization, data deletion, file copy, etc. The data types that need to be published are recorded as a series of task events asynchronously and sequentially in the database. When the release is triggered, the background system obtains these task events and identifies them for execution. The task event is recognized and executed by the system, and it is a kind of task to be executed abstracted by the operator to operate the data background.
当检测到操作员进入内部管理平台对相应小程序内容进行编辑时,也就是检测到对待更新的小程序数据库中的内容数据进行数据更新时,需要先获取小程序中预设的任务事件,再根据任务事件来确定内容数据的数据类型,数据属性、操作的动作(新增、删除、修改)等来确定对小程序中的内容数据进行数据更新,并获取进行数据更新后的小程序,将其作为小程序体验版。为了辅助理解操作员对小程序内容更新进行的理解,下面进行举例说明。When it is detected that the operator enters the internal management platform to edit the content of the corresponding applet, that is, when it is detected that the content data in the database of the applet to be updated is updated, it is necessary to obtain the preset task events in the applet first, and then According to the task event, determine the data type of the content data, data attributes, operation actions (addition, deletion, modification), etc. to determine the data update of the content data in the applet, and obtain the applet after the data update. It serves as a small program trial version. In order to assist the understanding of the operator's understanding of the content update of the applet, an example is given below.
例如,如图4所示,程序内容由存储在数据库的数据和存储在CDN(ContentDelivery Network,内容分发网络)的静态资源组成,在操作员更新小程序内容时,即进行数据更新,更新DB(数据库)时,添加数据处理任务(数据处理任务的操作类型为删除或更新,任务状态为待预发布,所属表table,数据主键,目标table等信息),并确定是否需要更新CDN(Content Delivery Network,内容分发网络)内容。若经过判断发现需要更新CDN内容,则根据内容数据的数据类型,添加CDN发布任务(CDN发布任务的操作类型为上传或者删除,任务状态为待预发布,CDN服务地址,目标文件地址,所属table,数据主键、源文件地址等信息)。For example, as shown in Figure 4, the program content is composed of data stored in the database and static resources stored in the CDN (ContentDelivery Network, Content Delivery Network). When the operator updates the content of the applet, the data is updated, and the DB ( database), add a data processing task (the operation type of the data processing task is delete or update, the task status is to be pre-released, the table it belongs to, the data primary key, the target table, etc.), and determine whether it is necessary to update the CDN (Content Delivery Network , content delivery network) content. If it is determined that the CDN content needs to be updated, then according to the data type of the content data, add a CDN publishing task (the operation type of the CDN publishing task is upload or delete, the task status is pending pre-release, the CDN service address, the target file address, and the table it belongs to , data primary key, source file address and other information).
步骤S20,当接收到基于所述小程序体验版的预览指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对所述小程序体验版的内容数据进行修改;Step S20, when a preview instruction based on the trial version of the applet is received, a preview screen corresponding to the trial version of the small program is displayed, and a first environment parameter is acquired in the preview screen, based on the first environment parameter Determine whether it is necessary to modify the content data of the trial version of the Mini Program;
第一环境参数可以是小程序通过API接口请求获取到的环境参数。预览指令可以是用户输入的展示小程序体验版内容数据的指令。在小程序体验版中接收操作员输入的预览指令,并根据预览指令将具有小程序体验版的内容数据的预览画面,以便操作员根据预览画面进行检查。在预览画面中通过API接口请求来增加header(标头)参数evn=pre,即第一环境参数,并通过第一环境参数对小程序体验版的内容数据进行检测,以此确定是否需要对小程序体验版的内容数据进行修改。若不需要对小程序体验版的内容数据进行修改,则可以将任务事件传递到小程序正式版中,若需要对小程序体验版的内容数据进行修改,则对小程序体验版的内容数据进行修改,并在修改完成后,再次通过第一环境参数进行检测,直至小程序体验版内容数据无需进行修改。为了辅助理解操作员点击发布预览后,小程序管理后台运行的过程,下面进行举例说明。The first environment parameter may be an environment parameter acquired by the applet through an API interface request. The preview instruction may be an instruction input by the user to display the content data of the trial version of the mini program. The preview instruction input by the operator is received in the trial version of the applet, and a preview image of the content data of the trial version of the applet is displayed according to the preview instruction, so that the operator can check according to the preview image. In the preview screen, add the header (header) parameter evn=pre through the API interface request, that is, the first environment parameter, and use the first environment parameter to detect the content data of the trial version of the applet, so as to determine whether it is necessary to update the applet Modify the content data of the trial version of the program. If you do not need to modify the content data of the trial version of the mini program, you can pass the task event to the official version of the mini program. If you need to modify the content data of the trial version of the After the modification is completed, the first environment parameter is used to detect again until the content data of the trial version of the mini program does not need to be modified. In order to help understand the process of the mini-program management running in the background after the operator clicks Publish Preview, an example is given below.
例如,如图5所述,任务事件包括数据处理任务和CDN发布任务,当操作员在小程序中的内部管理平台点击发布预览后,获取待预发布的数据处理任务,并过滤重复任务,确定操作员输入的操作类型,当操作类型为更新时,数据从{table}同步到pre+{table}表,再更新任务状态为待发布生产状态;当操作类型为删除时,删除pre+{table}表数据,并更新任务状态为待发布生产。与此同时,还需要获取CDN预发布任务,并过滤重复任务,确定是否对内容进行删除或者更新,若对小程序中的内容进行更新,则根据任务信息获取多媒体文件,数据json文件,并上传文件到CDN预发布目录中,再更新发布任务状态为待发布生产。若对内容进行删除,则删除CDN预发布任务对应文件,并更新发布任务状态为待发布生产。For example, as shown in Figure 5, task events include data processing tasks and CDN publishing tasks. When the operator clicks release preview on the internal management platform in the applet, the data processing tasks to be pre-released are obtained, and repeated tasks are filtered to determine The operation type input by the operator. When the operation type is update, the data is synchronized from {table} to the pre+{table} table, and then the status of the update task is the production status to be released; when the operation type is delete, the pre+{table} table is deleted data, and update the task status to Pending Production. At the same time, it is also necessary to obtain CDN pre-release tasks, filter duplicate tasks, and determine whether to delete or update the content. If the content in the applet is updated, obtain multimedia files and data json files according to the task information, and upload them file to the CDN pre-release directory, and then update the status of the release task to pending release. If the content is deleted, delete the file corresponding to the CDN pre-release task, and update the status of the release task to Pending Release Production.
步骤S30,若否,则将所述任务事件传递到与所述小程序体验版对应的小程序正式版中。Step S30, if not, transfer the task event to the official version of the applet corresponding to the trial version of the applet.
进一步地,所述小程序正式版根据所述小程序正式版中的第二环境参数确定是否对所述小程序正式版中的内容数据进行修改,若是,则输出对所述小程序中的内容数据进行修改的提示信息。Further, the official version of the applet determines whether to modify the content data in the official version of the applet according to the second environment parameter in the official version of the applet, and if so, outputs the content data in the applet A prompt message for data modification.
需要说明的是,在本实施例中,待更新的小程序在小程序体验版中,操作员在小程序体验版中对待更新的小程序进行数据更新,更新完成且检查合格后,会将任务事件发送到小程序正式版中,由管理员进行检测,若合格,则对任务事件进行发布,若不合格,则输出通知信息,让操作员对小程序内容再次进行修改。也就是在小程序体验版对小程序中的内容数据进行数据更新,在小程序正式版中对已生产发布的数据内容进行检测。It should be noted that, in this embodiment, the applet to be updated is in the applet trial version, and the operator updates the data of the applet to be updated in the applet trial version. The event is sent to the official version of the applet, and the administrator will check it. If it is qualified, the task event will be published. If it is not qualified, a notification message will be output to let the operator modify the content of the applet again. That is to update the content data in the applet in the trial version of the applet, and test the data content that has been produced and released in the official version of the applet.
例如,如图6所示,银行等金融机构的内容管理平台中,任务事件包括数据处理任务和CDN发布任务,当用户(如管理员)点击在小程序正式版中点击生产发布后,获取待发布生产的数据处理任务,并过滤重复任务,确定任务的操作类型,当操作类型为更新时,数据从pre+{table}同步到pro+{table}表,并更新任务记录状态为DONE(完结),当操作类型为删除时,删除pro+{table}表数据,并更新任务记录状态为DONE。与此同时,还需要获取CDN发布生产任务,并过滤重复记录,确定是否对小程序中的内容进行删除或者更新,若对内容进行更新,则通知CDN服务把文件从pre目录复制到pro目录,并更新任务状态为DONE。若对内容进行删除,则通知CDN服务删除与内容对应的对应文件,并更新任务状态为DONE。For example, as shown in Figure 6, in the content management platforms of banks and other financial institutions, task events include data processing tasks and CDN publishing tasks. Publish the production data processing task, filter the repeated tasks, and determine the operation type of the task. When the operation type is update, the data is synchronized from pre+{table} to the pro+{table} table, and the status of the updated task record is DONE. When the operation type is delete, delete the pro+{table} table data, and update the task record status to DONE. At the same time, it is also necessary to obtain the CDN to publish production tasks, filter duplicate records, and determine whether to delete or update the content in the applet. If the content is updated, notify the CDN service to copy the file from the pre directory to the pro directory. And update the task status to DONE. If the content is deleted, the CDN service is notified to delete the corresponding file corresponding to the content, and the task status is updated as DONE.
还需要说明的是,在本实施例中对小程序访问的内容可以分为静态资源和动态数据。静态资源(多媒体文件、内容json文件等)存放在CDN服务中,有pre、pro两个访问目录,小程序体验版访问的数据在pre目录,生产小程序访问pro目录数据。动态数据(内容变动频繁,不适合生成文件内容的数据)存储在数据库中,操作保存的数据信息存储在表{tableName},进行发布预览是数据存储在预览表pre_{table Name},发布生产时数据存储在生产表pro{table Name},小程序通过API接口增加header参数evn={pre/pro}访问不同数据表内容。It should also be noted that in this embodiment, the content accessed by the applet can be divided into static resources and dynamic data. Static resources (multimedia files, content json files, etc.) are stored in the CDN service. There are two access directories: pre and pro. The data accessed by the mini program trial version is in the pre directory, and the production applet accesses the data in the pro directory. Dynamic data (data that changes frequently and is not suitable for generating file content) is stored in the database, and the data information saved by the operation is stored in the table {tableName}. For release preview, the data is stored in the preview table pre_{table Name}. When publishing production The data is stored in the production table pro{table Name}, and the applet adds the header parameter evn={pre/pro} through the API interface to access the contents of different data tables.
另外,为辅助理解对小程序内容发布的原理,下面进行举例说明。In addition, in order to help understand the principle of publishing mini program content, an example is given below.
例如,如图7所示,用户、管理台服务、小程序、CND服务、小程序后台、DB(数据库),用户进行小程序发布需要进行三个步骤,步骤一,编辑内容,用户通过管理台服务更新/删除内容,并更新内容,新增任务到DB,DB返回结果让用户进行查看。并进入步骤二,用户点击发布预览后,在DB中获取待同步数据任务,并同步数据到预览表。在DB中获取待发布CDN任务,并根据待发布CDN任务通过CDN服务进行文件上传pre目录或者删除文件,访问小程序体验版,并在静态资源中加载pre目录内容到数据库,再通过小程序的API接口请求,即header带上环境参数env=pre操作预览表中的数据,即对预览表中的数据进行检查,若合格,则进入步骤三。进行发布生产,获取待数据同步任务,并同步预览表中的数据到生产表,同时还需要在DB中获取待发布CDN任务,并根据待发布CDN任务通过CND服务进行文件复制或者删除文件。访问小程序正式版,并在静态资源中加载pro路径的内容文件,再通过小程序正式版中的API接口请求即header带上环境参数env=pro访问生产表中的数据,即对生产表中的数据进行检查,若合格,则确认生产表中的数据没有问题。实现了银行等金融机构的小程序发布过程,准确性和可移植性更高,从而保证了业务(存款业务、贷款业务等)的正常开展。For example, as shown in Figure 7, users, management console services, applets, CND services, applet background, DB (database), users need to go through three steps to publish applets, step 1, editing content, users through the management console The service updates/deletes the content, and updates the content, adds tasks to the DB, and the DB returns the results for users to view. And enter step 2, after the user clicks release preview, the data task to be synchronized is obtained in the DB, and the data is synchronized to the preview table. Get the CDN task to be released in the DB, and upload the pre directory or delete the file through the CDN service according to the CDN task to be released, access the trial version of the applet, and load the content of the pre directory in the static resource to the database, and then pass the applet The API interface request, that is, the header carries the environment parameter env=pre to operate the data in the preview table, that is, check the data in the preview table, and if it is qualified, go to step 3. Release production, obtain the pending data synchronization task, and synchronize the data in the preview table to the production table. At the same time, it is also necessary to obtain the pending CDN task in the DB, and copy or delete the file through the CND service according to the pending CDN task. Access the official version of the applet, load the content file of the pro path in the static resource, and then request the API interface in the official version of the applet, that is, the header with the environment parameter env=pro to access the data in the production table, that is, to access the data in the production table Check the data, if it is qualified, then confirm that there is no problem with the data in the production table. Realized the small program release process of banks and other financial institutions, with higher accuracy and portability, thus ensuring the normal development of business (deposit business, loan business, etc.).
在本实施例中,通过在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;当接收到基于所述小程序体验版的预设指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对所述小程序体验版的内容数据进行修改;若否,则将所述任务事件传递到与所述小程序体验版对应的小程序正式版中。通过在对待更新的小程序中的内容数据进行更新后,获取更新后的预览画面,从而可以及时的知道进行修改的内容数据是否符合预设要求,避免了现有技术中由于缺少预览机制,在进行数据更新时,新增的数据内容可能会影响小程序某个页面的排版展示而不能及时发现的现象发生,并在新内容数据符合要求后,再发送至小程序正式版,从而进一步地提高了小程序发布的准确性,并且对小程序发布内容的修改和对小程序发布内容的发布是在不同的位置进行的,因此也避免了现有技术中发布操作和待发布内容耦合严重,数据类型变更时,发布流程需要经常调整的现象发生,提高了小程序内容发布流程的可移植性。In this embodiment, when the applet to be updated is detected, the task event preset in the applet is obtained, and the content data in the applet is updated based on the task event, to obtain Small program trial version; when a preset instruction based on the small program trial version is received, the preview screen corresponding to the small program trial version is displayed, and the first environment parameter is obtained in the preview screen, based on the first An environment parameter determines whether the content data of the trial version of the mini program needs to be modified; if not, the task event is transferred to the official version of the mini program corresponding to the trial version of the mini program. By obtaining the updated preview screen after updating the content data in the applet to be updated, it is possible to know in time whether the modified content data meets the preset requirements, avoiding the lack of preview mechanism in the prior art. When updating data, the newly added data content may affect the typesetting display of a certain page of the Mini Program and cannot be detected in time. After the new content data meets the requirements, it will be sent to the official version of the Mini Program to further improve The accuracy of the release of the applet is improved, and the modification of the release content of the applet and the release of the release content of the applet are carried out in different locations, so it also avoids the serious coupling between the release operation and the content to be released in the prior art, and the data When the type changes, the publishing process needs to be adjusted frequently, which improves the portability of the mini program content publishing process.
进一步地,基于本发明小程序发布方法第一实施例,提出本发明小程序发布方法第二实施例。本实施例是本发明第一实施例的步骤S10,获取所述小程序中预设的任务事件,并基于所述任务事件对所述内容数据进行数据更新的步骤的细化,包括:Further, based on the first embodiment of the mini-program publishing method of the present invention, a second embodiment of the mini-program publishing method of the present invention is proposed. This embodiment is the step S10 of the first embodiment of the present invention. The step of obtaining the task event preset in the applet, and updating the content data based on the task event, includes:
步骤a,获取所述小程序中的内容分发网络CDN内容和预设的数据处理任务,并确定是否对所述CDN内容进行更新;Step a, obtaining CDN content and preset data processing tasks in the applet, and determining whether to update the CDN content;
CDN是构建在网络之上的内容分发网络,依靠部署在各地的边缘服务器,通过中心平台的负载均衡、内容分发、调度等功能模块,使用户就近获取所需内容,降低网络拥塞,提高用户响应速度和命中率。获取小程序中预设的数据处理任务和CDN内容,并确定是否需要对CDN内容进行更新,基于确定结果执行不同的操作。CDN is a content distribution network built on the Internet. Relying on the edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, users can obtain the required content nearby, reduce network congestion, and improve user response. Speed and hit rate. Obtain the preset data processing tasks and CDN content in the applet, determine whether the CDN content needs to be updated, and perform different operations based on the determination result.
步骤b,若是,则根据所述内容数据的数据类型对所述CDN内容进行更新,以获取CDN发布任务,并将所述数据处理任务和所述CDN发布任务作为预设的任务事件对所述内容数据进行数据更新。Step b, if yes, update the CDN content according to the data type of the content data to obtain the CDN release task, and use the data processing task and the CDN release task as preset task events for the The content data performs data update.
当经过判断发现需要对CDN内容进行更新时,则获取内容数据的数据类型,再根据数据类型来添加CDN发布任务,即对CDN内容进行更新,获取CDN发布任务,此时就可以将数据处理任务和CDN发布任务作为预设的任务事件对内容数据进行数据更新。但是当经过判断发现不需要对CDN内容进行更新时,则可以直接将数据处理任务作为任务事件对内容数据进行更新。When it is judged that the CDN content needs to be updated, the data type of the content data is obtained, and the CDN publishing task is added according to the data type, that is, the CDN content is updated, and the CDN publishing task is obtained. At this time, the data processing task can be processed And the CDN publishes the task as a preset task event to update the content data. However, when it is judged that there is no need to update the CDN content, the data processing task can be directly used as a task event to update the content data.
在本实施例中,通过确定是否对CDN内容进行更新,并在确定对CDN内容进行更新时,将CDN发布任务和数据处理任务作为预设的任务事件,从而保障了获取到的任务事件的准确性。In this embodiment, by determining whether to update the CDN content, and when determining to update the CDN content, the CDN release task and data processing task are used as preset task events, thereby ensuring the accuracy of the acquired task events sex.
进一步地,基于本发明小程序发布方法第一至第二任意一个实施例的基础上,提出本发明小程序发布方法第三实施例。本实施例是本发明第一实施例的步骤S20,展示所述小程序体验版对应的预览画面的步骤的细化。Further, on the basis of any one of the first to second embodiments of the mini-program publishing method of the present invention, a third embodiment of the mini-program publishing method of the present invention is proposed. This embodiment is step S20 of the first embodiment of the present invention, which is a refinement of the step of displaying the preview screen corresponding to the trial version of the applet.
步骤c,检测所述任务事件中是否存在重复任务,若存在重复任务,则删除所述任务事件中的重复任务,以得到新任务事件,并基于所述新任务事件展示所述小程序体验版对应的预览画面。Step c: Detect whether there are repeated tasks in the task event, and if there is a repeated task, delete the repeated task in the task event to obtain a new task event, and display the trial version of the applet based on the new task event corresponding preview screen.
检测任务事件中的待发布的数据处理任务和CDN预发布任务中是否存在重复任务,若存在重复任务,则需要删除任务事件中的重复任务,即若数据处理任务中存在重复任务,则删除数据处理任务中的重复任务,若CDN预发布任务中存在重复任务,则删除CDN预发布任务中的重复任务,并将删除重复任务后的任务事件作为新任务事件,再根据新任务事件来展示具有小程序体验版内容数据的预览画面。Detect whether there are duplicate tasks in the data processing tasks to be released in the task event and CDN pre-release tasks. If there are duplicate tasks, you need to delete the duplicate tasks in the task event, that is, if there are duplicate tasks in the data processing tasks, delete the data Process the duplicate tasks in the task. If there are duplicate tasks in the CDN pre-release task, delete the duplicate task in the CDN pre-release task, and use the task event after deleting the duplicate task as a new task event, and then display the task event according to the new task event. The preview screen of the content data of the trial version of the Mini Program.
在本实施例中,通过检测任务事件中是否存在重复任务,若存在重复任务时,对重复任务进行删除,从而保障了获取到的任务事件的准确性。In this embodiment, by detecting whether there is a repeated task in the task event, if there is a repeated task, the repeated task is deleted, thereby ensuring the accuracy of the acquired task event.
具体地,基于所述新任务事件展示所述小程序体验版对应的预览画面的步骤,包括:Specifically, the step of displaying the preview screen corresponding to the trial version of the applet based on the new task event includes:
步骤c1,获取输入的操作指令,并确定所述操作指令是否为更新指令;Step c1, obtaining an input operation instruction, and determining whether the operation instruction is an update instruction;
获取输入的操作指令(可以是用户输入的操作指令,也可以是其它终端传递过来的操作指令),并确定操作指令是否为更新指令,并基于不同的操作指令执行不同的操作。Obtain the input operation instruction (which may be the operation instruction input by the user, or the operation instruction transmitted from other terminals), and determine whether the operation instruction is an update instruction, and perform different operations based on different operation instructions.
步骤c2,若所述操作指令是更新指令,则获取所述新任务事件对应的资源数据表,并根据所述资源数据表展示所述小程序体验版对应的预览画面。Step c2, if the operation instruction is an update instruction, obtain the resource data table corresponding to the new task event, and display the preview screen corresponding to the trial version of the applet according to the resource data table.
当经过判断发现操作指令是更新指令,则需要将小程序中的内容数据同步到资源数据表中,并调用资源数据表中的数据,根据资源数据表中的数据来展示与该数据对应的预览画面。需要说明的是,操作指令还可以是删除指令,新增指令和修改指令等,并会根据操作指令的不同类型执行不同的操作。资源数据表可以包括预览表和数据库表,预览表中放置小程序的动态数据,数据库表放置小程序的静态资源。When it is judged that the operation command is an update command, it is necessary to synchronize the content data in the applet to the resource data table, and call the data in the resource data table, and display the preview corresponding to the data according to the data in the resource data table screen. It should be noted that the operation instruction can also be a deletion instruction, an addition instruction, a modification instruction, etc., and different operations will be performed according to different types of operation instructions. The resource data table can include a preview table and a database table, where the dynamic data of the applet is placed in the preview table, and the static resources of the applet are placed in the database table.
在本实施例中,通过判断获取到的操作指令是否为更新指令,并在操作指令是更新指令时,根据资源数据表展示小程序体验版对应的预览画面,从而保障了用户能及时地查看对内容数据进行数据更新后的效果。In this embodiment, by judging whether the obtained operation instruction is an update instruction, and when the operation instruction is an update instruction, the preview screen corresponding to the mini program trial version is displayed according to the resource data table, thereby ensuring that the user can view the updated version in a timely manner. The effect after the content data is updated.
进一步地,获取所述新任务事件对应的资源数据表的步骤,包括:Further, the step of obtaining the resource data table corresponding to the new task event includes:
步骤d,获取所述新任务事件中的数据处理任务,并基于所述新任务事件中的数据处理任务将所述小程序中的动态数据同步到新任务事件对应的预览表,并获取具有所述动态数据的预览表。Step d, acquire the data processing task in the new task event, and based on the data processing task in the new task event, synchronize the dynamic data in the applet to the preview table corresponding to the new task event, and obtain the A preview table describing the dynamic data.
需要说明的是,在本实施例中,资源数据表包括预览表。获取新任务事件中的数据处理任务,并在接收到的操作指令为更新指令时,将小程序数据库中的动态数据同步到新任务事件对应的预览表中,并获取具有动态数据的预览表。需要说明的是,当操作指令为删除指令时,则会删除预览表中的数据。其中,动态数据可以是内容变动频繁,不适合生成文件内容的数据。It should be noted that, in this embodiment, the resource data table includes a preview table. Obtain the data processing task in the new task event, and when the received operation instruction is an update instruction, synchronize the dynamic data in the applet database to the preview table corresponding to the new task event, and obtain the preview table with dynamic data. It should be noted that when the operation instruction is a delete instruction, the data in the preview table will be deleted. Among them, dynamic data may be data whose content changes frequently and is not suitable for generating file content.
在本实施例中,通过将动态数据上传至预览表中,从而能够保障预览表中数据的完整性,可以让用户较为直观地知道需要对哪些数据进行检测。In this embodiment, by uploading the dynamic data to the preview table, the integrity of the data in the preview table can be guaranteed, and the user can intuitively know which data needs to be detected.
进一步地,获取所述新任务事件对应的资源数据表的步骤,包括:Further, the step of obtaining the resource data table corresponding to the new task event includes:
步骤e,获取所述新任务事件中的CDN发布任务,并基于所述新任务事件中的CDN发布任务将所述小程序中的静态资源上传至所述CDN内容存储目录,并获取具有所述静态资源的CDN内容存储目录。Step e, obtain the CDN release task in the new task event, and upload the static resources in the applet to the CDN content storage directory based on the CDN release task in the new task event, and obtain the CDN content storage directory for static resources.
需要说明的是,在本实施例中,资源数据表包括CDN内容存储目录。It should be noted that, in this embodiment, the resource data table includes a CDN content storage directory.
获取新任务事件中的CDN发布任务,并在接收到的操作指令为更新指令时,将小程序数据库中的静态资源上传至CDN内容存储目录中。其中,静态资源可以是多媒体文件、内容json文件等。在确定资源数据表已获取静态资源和动态数据后,进行获取,以便将具有静态资源和动态数据的资源数据表放置在预览画面中进行展示。Obtain the CDN release task in the new task event, and upload the static resources in the applet database to the CDN content storage directory when the received operation instruction is an update instruction. Wherein, the static resource may be a multimedia file, a content json file, and the like. After it is determined that the resource data table has obtained static resources and dynamic data, the resource data table is obtained so as to place the resource data table with static resources and dynamic data on the preview screen for display.
在本实施例中,通过将静态资源上传至CDN内容存储目录中,从而能够保障预览表中数据的完整性,可以让用户较为直观地知道需要对哪些数据进行检测。In this embodiment, by uploading the static resource to the CDN content storage directory, the integrity of the data in the preview table can be guaranteed, and the user can intuitively know which data needs to be checked.
具体地,将所述任务事件传递到与所述小程序体验版对应的小程序正式版中的步骤,包括:Specifically, the step of transferring the task event to the official version of the mini program corresponding to the trial version of the mini program includes:
步骤f,将所述任务事件传递到与所述小程序体验版对应的小程序正式版中,并检测所述小程序正式版接收到的操作类型是否为更新,若所述操作类型为更新,则将所述资源数据表中的动态数据和静态资源传递至所述小程序正式版中的资源数据表,其中,所述小程序正式版根据所述小程序正式版中的第二环境参数对所述生产表进行检测,若检测合格,则所述小程序正式版中的内容数据不进行修改。Step f, transfer the task event to the official version of the applet corresponding to the trial version of the applet, and detect whether the operation type received by the official version of the applet is update, if the operation type is update, Then transfer the dynamic data and static resources in the resource data table to the resource data table in the official version of the applet, wherein the official version of the applet is based on the second environment parameter in the official version of the applet. The production table is tested, and if the test is qualified, the content data in the official version of the applet will not be modified.
当将任务事件传递至与小程序体验版对应的小程序正式版中时,会检测小程序正式版接收到的操作类型,并在操作类型为更新时,将获取到的资源数据表也传递至小程序正式版中的资源数据表中,即将预览表中的动态数据和静态资源均传递至小程序正式版中,并且小程序正式版会根据小程序正式版中接收到的第二环境参数对生产表中的数据进行检测,确定是否存在检测不合格的数据,若不存在检测不合格的数据,则可以通知体验版不用对小程序中的内容数据进行修改。但是当操作类型为删除时,则会删除生产表中的数据,并通知CDN服务删除对应文件。When the task event is passed to the official version of the applet corresponding to the trial version of the applet, the operation type received by the official version of the applet will be detected, and when the operation type is update, the obtained resource data table will also be passed to In the resource data table in the official version of the applet, the dynamic data and static resources in the preview table will be transferred to the official version of the applet, and the official version of the applet will The data in the production table is tested to determine whether there is unqualified data. If there is no unqualified data, the trial version can be notified not to modify the content data in the applet. However, when the operation type is delete, the data in the production table will be deleted, and the CDN service will be notified to delete the corresponding file.
在本实施例中,通过在任务事件传递至小程序正式版,且操作类型为更新时,则将预览表中的动态数据和静态资源传递至生产表,从而保障了生产表获取到的数据的准确性。In this embodiment, when the task event is transmitted to the official version of the applet, and the operation type is update, the dynamic data and static resources in the preview table are transmitted to the production table, thereby ensuring the integrity of the data obtained by the production table. accuracy.
本发明还提供一种小程序发布装置,参照图3,所述小程序发布装置包括:The present invention also provides a small program publishing device. Referring to FIG. 3, the small program publishing device includes:
获取模块,用于在检测到待更新的小程序时,获取所述小程序中预设的任务事件,并基于所述任务事件对所述小程序中的内容数据进行数据更新,以得到小程序体验版;An acquisition module, configured to acquire a preset task event in the applet when detecting the applet to be updated, and update the content data in the applet based on the task event, so as to obtain the applet Trial Version;
确定模块,用于当接收到基于所述小程序体验版的预览指令时,展示所述小程序体验版对应的预览画面,并在所述预览画面中获取第一环境参数,基于所述第一环境参数确定是否需要对所述小程序体验版的内容数据进行修改;A determining module, configured to display a preview screen corresponding to the mini program trial version when receiving a preview instruction based on the mini program trial version, and acquire a first environment parameter in the preview screen, based on the first The environment parameter determines whether the content data of the trial version of the mini program needs to be modified;
传递模块,用于若否,则将所述任务事件传递到与所述小程序体验版对应的小程序正式版中。A transfer module, configured to, if not, transfer the task event to the official version of the applet corresponding to the trial version of the applet.
可选地,所述获取模块,还用于:Optionally, the acquisition module is also used for:
获取所述小程序中的内容分发网络CDN内容和预设的数据处理任务,并确定是否对所述CDN内容进行更新;Acquiring the CDN content and preset data processing tasks in the applet, and determining whether to update the CDN content;
若是,则根据所述内容数据的数据类型对所述CDN内容进行更新,以获取CDN发布任务,并将所述数据处理任务和所述CDN发布任务作为预设的任务事件对所述内容数据进行数据更新。If so, update the CDN content according to the data type of the content data to obtain the CDN release task, and use the data processing task and the CDN release task as preset task events to perform the processing on the content data Data Update.
可选地,所述确定模块,还用于:Optionally, the determination module is also used for:
检测所述任务事件中是否存在重复任务,若存在重复任务,则删除所述任务事件中的重复任务,以得到新任务事件,并基于所述新任务事件展示所述小程序体验版对应的预览画面。Detect whether there is a repeated task in the task event, and if there is a repeated task, delete the repeated task in the task event to obtain a new task event, and display a preview corresponding to the trial version of the applet based on the new task event screen.
可选地,所述确定模块,还用于:Optionally, the determination module is also used for:
获取输入的操作指令,并确定所述操作指令是否为更新指令;Obtain an input operation instruction, and determine whether the operation instruction is an update instruction;
若所述操作指令是更新指令,则获取所述新任务事件对应的资源数据表,并根据所述资源数据表展示所述小程序体验版对应的预览画面。If the operation instruction is an update instruction, obtain the resource data table corresponding to the new task event, and display the preview screen corresponding to the trial version of the applet according to the resource data table.
可选地,所述资源数据表包括预览表,所述确定模块,还用于:Optionally, the resource data table includes a preview table, and the determining module is further configured to:
获取所述新任务事件中的数据处理任务,并基于所述新任务事件中的数据处理任务将所述小程序中的动态数据同步到新任务事件对应的预览表,并获取具有所述动态数据的预览表。Obtain the data processing task in the new task event, and based on the data processing task in the new task event, synchronize the dynamic data in the applet to the preview table corresponding to the new task event, and obtain the preview table.
可选地,所述资源数据表包括CDN内容存储目录,所述确定模块,还用于:Optionally, the resource data table includes a CDN content storage directory, and the determining module is also used for:
获取所述新任务事件中的CDN发布任务,并基于所述新任务事件中的CDN发布任务将所述小程序中的静态资源上传至所述CDN内容存储目录,并获取具有所述静态资源的CDN内容存储目录。Acquiring the CDN release task in the new task event, and uploading the static resources in the applet to the CDN content storage directory based on the CDN release task in the new task event, and obtaining the CDN content storage directory.
可选地,所述确定模块,还用于:Optionally, the determination module is also used for:
将所述任务事件传递到与所述小程序体验版对应的小程序正式版中,并检测所述小程序正式版接收到的操作类型是否为更新,若所述操作类型为更新,则将所述资源数据表中的动态数据和静态资源传递至所述小程序正式版中的资源数据表,其中,所述小程序正式版根据所述小程序正式版中的第二环境参数对所述生产表进行检测,若检测合格,则所述小程序正式版中的内容数据不进行修改。Transfer the task event to the official version of the applet corresponding to the trial version of the applet, and detect whether the operation type received by the official version of the applet is an update, if the operation type is an update, send the The dynamic data and static resources in the resource data table are transferred to the resource data table in the official version of the applet, wherein the official version of the applet is based on the second environment parameter in the official version of the applet. If the test is qualified, the content data in the official version of the applet will not be modified.
上述各程序模块所执行的方法可参照本发明小程序发布方法各个实施例,此处不再赘述。For the methods executed by the above program modules, reference may be made to the various embodiments of the applet publishing method of the present invention, which will not be repeated here.
本发明还提供一种计算机存储介质。The invention also provides a computer storage medium.
本发明计算机存储介质上存储有小程序发布程序,所述小程序发布程序被处理器执行时实现如上所述的小程序发布方法的步骤。A small program publishing program is stored on the computer storage medium of the present invention, and when the small program publishing program is executed by a processor, the steps of the above small program publishing method are realized.
其中,在所述处理器上运行的小程序发布程序被执行时所实现的方法可参照本发明小程序发布方法各个实施例,此处不再赘述。For the method implemented when the applet publishing program running on the processor is executed, reference may be made to the various embodiments of the applet publishing method of the present invention, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , magnetic disk, optical disk), including several instructions to make a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910565822.7A CN110308917B (en) | 2019-06-26 | 2019-06-26 | Applet issuing method, device, equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910565822.7A CN110308917B (en) | 2019-06-26 | 2019-06-26 | Applet issuing method, device, equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110308917A true CN110308917A (en) | 2019-10-08 |
CN110308917B CN110308917B (en) | 2024-02-23 |
Family
ID=68077529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910565822.7A Active CN110308917B (en) | 2019-06-26 | 2019-06-26 | Applet issuing method, device, equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110308917B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110806870A (en) * | 2019-10-09 | 2020-02-18 | 北京字节跳动网络技术有限公司 | Shortcut application implementation method and device, electronic equipment, server and storage medium |
CN112035161A (en) * | 2020-08-31 | 2020-12-04 | 上海识装信息科技有限公司 | A method for publishing and verifying a small program and a method for parallel publishing |
CN112328235A (en) * | 2020-11-06 | 2021-02-05 | 广州朗国电子科技有限公司 | Method for quickly customizing software application interactive logic |
CN112579092A (en) * | 2020-12-07 | 2021-03-30 | 广东亿润网络技术有限公司 | Multifunctional small program multi-end updating and publishing system |
CN112631654A (en) * | 2020-12-28 | 2021-04-09 | 厦门市美亚柏科信息股份有限公司 | Program linkage method and system based on evidence obtaining platform |
CN113553095A (en) * | 2021-07-16 | 2021-10-26 | 北京奇艺世纪科技有限公司 | Method, device, electronic device and storage medium for publishing applet |
WO2022000869A1 (en) * | 2020-06-28 | 2022-01-06 | 北京百度网讯科技有限公司 | Batch processing method and apparatus for mini programs, and electronic device and readable storage medium |
CN114036442A (en) * | 2021-11-25 | 2022-02-11 | 北京房江湖科技有限公司 | Data publishing method and apparatus, system, and computer-readable storage medium |
US12014170B2 (en) | 2020-06-28 | 2024-06-18 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Mini program batch processing method and apparatus, electronic device, and readable storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1481635A (en) * | 2000-10-26 | 2004-03-10 | 普里斯梅迪亚网络有限公司 | Method and appts. for large payload distribution in network |
CN102282804A (en) * | 2008-11-24 | 2011-12-14 | 瞻博网络公司 | adaptive network content delivery system |
US20140047061A1 (en) * | 2012-08-09 | 2014-02-13 | Limelight Networks, Inc. | Inter point of presence split architecture |
CN105324779A (en) * | 2013-04-15 | 2016-02-10 | 亚马逊技术有限公司 | Host recovery using a secure store |
CN105493099A (en) * | 2013-07-01 | 2016-04-13 | 亚马逊技术有限公司 | Cryptographically attested resources for hosting virtual machines |
US20160378454A1 (en) * | 2015-06-29 | 2016-12-29 | Verizon Patent And Licensing Inc. | Software updates using client self-reporting and a hierarchical data structure |
CN107038085A (en) * | 2016-02-03 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of restorative procedure of client application, apparatus and system |
CN108319483A (en) * | 2018-01-30 | 2018-07-24 | 腾讯科技(深圳)有限公司 | Web page processing method, device, terminal and storage medium |
CN109299709A (en) * | 2018-12-04 | 2019-02-01 | 中山大学 | Data recommendation method, device, server and client based on face recognition |
CN109313655A (en) * | 2016-06-11 | 2019-02-05 | 苹果公司 | Configure the context-specific user interface |
CN109460279A (en) * | 2018-12-14 | 2019-03-12 | 平安城市建设科技(深圳)有限公司 | Forms pages development approach, device, equipment and storage medium based on small routine |
-
2019
- 2019-06-26 CN CN201910565822.7A patent/CN110308917B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1481635A (en) * | 2000-10-26 | 2004-03-10 | 普里斯梅迪亚网络有限公司 | Method and appts. for large payload distribution in network |
CN102282804A (en) * | 2008-11-24 | 2011-12-14 | 瞻博网络公司 | adaptive network content delivery system |
US20140047061A1 (en) * | 2012-08-09 | 2014-02-13 | Limelight Networks, Inc. | Inter point of presence split architecture |
CN105324779A (en) * | 2013-04-15 | 2016-02-10 | 亚马逊技术有限公司 | Host recovery using a secure store |
CN105493099A (en) * | 2013-07-01 | 2016-04-13 | 亚马逊技术有限公司 | Cryptographically attested resources for hosting virtual machines |
US20160378454A1 (en) * | 2015-06-29 | 2016-12-29 | Verizon Patent And Licensing Inc. | Software updates using client self-reporting and a hierarchical data structure |
CN107038085A (en) * | 2016-02-03 | 2017-08-11 | 阿里巴巴集团控股有限公司 | A kind of restorative procedure of client application, apparatus and system |
CN109313655A (en) * | 2016-06-11 | 2019-02-05 | 苹果公司 | Configure the context-specific user interface |
CN108319483A (en) * | 2018-01-30 | 2018-07-24 | 腾讯科技(深圳)有限公司 | Web page processing method, device, terminal and storage medium |
CN109299709A (en) * | 2018-12-04 | 2019-02-01 | 中山大学 | Data recommendation method, device, server and client based on face recognition |
CN109460279A (en) * | 2018-12-14 | 2019-03-12 | 平安城市建设科技(深圳)有限公司 | Forms pages development approach, device, equipment and storage medium based on small routine |
Non-Patent Citations (2)
Title |
---|
S. BORST 等: "Distributed Caching Algorithms for Content Distribution Networks", 《2010 PROCEEDINGS IEEE INFOCOM》, pages 132 - 138 * |
朱玉强 等: "微信小程序在图书馆移动服务中的应用实践——以排架游戏为例", 《图书馆论坛》, vol. 37, no. 07, pages 132 - 138 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110806870A (en) * | 2019-10-09 | 2020-02-18 | 北京字节跳动网络技术有限公司 | Shortcut application implementation method and device, electronic equipment, server and storage medium |
CN110806870B (en) * | 2019-10-09 | 2023-07-18 | 北京字节跳动网络技术有限公司 | Shortcut application implementation method and device, electronic equipment, server and storage medium |
WO2022000869A1 (en) * | 2020-06-28 | 2022-01-06 | 北京百度网讯科技有限公司 | Batch processing method and apparatus for mini programs, and electronic device and readable storage medium |
US12014170B2 (en) | 2020-06-28 | 2024-06-18 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Mini program batch processing method and apparatus, electronic device, and readable storage medium |
CN112035161A (en) * | 2020-08-31 | 2020-12-04 | 上海识装信息科技有限公司 | A method for publishing and verifying a small program and a method for parallel publishing |
CN112328235A (en) * | 2020-11-06 | 2021-02-05 | 广州朗国电子科技有限公司 | Method for quickly customizing software application interactive logic |
CN112579092A (en) * | 2020-12-07 | 2021-03-30 | 广东亿润网络技术有限公司 | Multifunctional small program multi-end updating and publishing system |
CN112631654A (en) * | 2020-12-28 | 2021-04-09 | 厦门市美亚柏科信息股份有限公司 | Program linkage method and system based on evidence obtaining platform |
CN113553095A (en) * | 2021-07-16 | 2021-10-26 | 北京奇艺世纪科技有限公司 | Method, device, electronic device and storage medium for publishing applet |
CN114036442A (en) * | 2021-11-25 | 2022-02-11 | 北京房江湖科技有限公司 | Data publishing method and apparatus, system, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110308917B (en) | 2024-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110308917A (en) | Small program distribution method, device, equipment and computer storage medium | |
US10462002B2 (en) | Automatically determining requirements for provisioning a hosted computing environment | |
US11423041B2 (en) | Maintaining data lineage to detect data events | |
US10291704B2 (en) | Networked solutions integration using a cloud business object broker | |
US9910895B2 (en) | Push subscriptions | |
US9128964B2 (en) | Selective mapping of integrated data | |
US20100262632A1 (en) | Data transfer from on-line to on-premise deployment | |
US20190102237A1 (en) | Recommending applications based on call requests between applications | |
US11941070B2 (en) | Systems and methods for managed asset distribution in a distributed heterogeneous storage environment | |
US20090234902A1 (en) | System, method and apparatus for making content available over multiple devices | |
CN112035205A (en) | Data processing method, device, equipment and storage medium | |
US20200097266A1 (en) | Saving a snippet of visual programming logic for reuse amongst programs created using an automation building tool | |
CN112685499A (en) | Method, device and equipment for synchronizing process data of work service flow | |
WO2022057525A1 (en) | Method and device for data retrieval, electronic device, and storage medium | |
CN109614271A (en) | Control method, device, device and storage medium for data consistency of multiple clusters | |
TW200301634A (en) | Apparatus and method for collecting information from information providing server | |
CN114428723A (en) | Test system, system test method, related device and storage medium | |
CN112783842B (en) | Log collection method and device | |
US12282484B2 (en) | Federation of data during query time in computing systems | |
CN117668327A (en) | Component identification method, device, terminal equipment and storage medium | |
CN117614943A (en) | Internet application management methods and systems | |
US20110055816A1 (en) | Method to derive software use and software data object use characteristics by analyzing attributes of related files | |
US11263216B2 (en) | Decentralized aggregation and collection of data from multiple sources | |
CN114547121A (en) | Information detection method, device, electronic device and computer storage medium | |
CN114185845A (en) | File management method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |