CN114338580B - Public number project development method, device and storage medium - Google Patents

Public number project development method, device and storage medium Download PDF

Info

Publication number
CN114338580B
CN114338580B CN202111656118.6A CN202111656118A CN114338580B CN 114338580 B CN114338580 B CN 114338580B CN 202111656118 A CN202111656118 A CN 202111656118A CN 114338580 B CN114338580 B CN 114338580B
Authority
CN
China
Prior art keywords
request
public number
information
database
project
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.)
Active
Application number
CN202111656118.6A
Other languages
Chinese (zh)
Other versions
CN114338580A (en
Inventor
刘睿
王彬彬
李梁
滑立栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Jinxi Intelligent Technology Co ltd
Original Assignee
Suzhou Jinxi Intelligent Technology Co ltd
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 Suzhou Jinxi Intelligent Technology Co ltd filed Critical Suzhou Jinxi Intelligent Technology Co ltd
Priority to CN202111656118.6A priority Critical patent/CN114338580B/en
Publication of CN114338580A publication Critical patent/CN114338580A/en
Application granted granted Critical
Publication of CN114338580B publication Critical patent/CN114338580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a public number project development method, a public number project development device and a storage medium, wherein the method comprises the following steps: starting the project and loading database configuration; judging whether a corresponding database configuration exists or not; if so, carrying out request initialization; creating and initializing WxEntity; sending request information; the WxBase carries a WxEntity execution request, wherein the request comprises the steps of calling a general request method, maintaining a token, calling a custom method, and returning data or a request log; and returning unified formatted data. According to the method, services of the WeChat public number three-party platform are orderly put into the cache, the unified request class library is developed, and unified management and maintenance of request and response information can be achieved; the class library for integrated calling is developed, so that multiplexing and management are facilitated.

Description

Public number project development method, device and storage medium
Technical Field
The present invention relates to a WeChat public number project development technology, and in particular, to a public number project development method, apparatus and storage medium.
Background
In practical application of public number project development, when the public number part function is realized, the WeChat part resource needs to be acquired through a WeChat developer platform service development interface so as to realize the business requirement of the project by utilizing WeChat development capability in the public number. When the HttpClient requests WeChat service, a request mode, an address and a return mode are required to be managed, and the problems of toke generation, expiration and the like are required to be managed, so that management is difficult.
Disclosure of Invention
The invention aims to provide a public number project development method, a public number project development device and a storage medium which are more convenient to manage and maintain.
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
According to an aspect of the present invention, there is provided a public number project development method comprising the steps of:
starting the project and loading database configuration;
judging whether a corresponding database configuration exists or not;
if so, carrying out request initialization;
creating and initializing WxEntity;
sending request information;
the WxBase carries a WxEntity execution request, wherein the request comprises the steps of calling a general request method, maintaining a token, calling a custom method, and returning data or a request log;
and returning unified formatted data.
In one embodiment, the database is pre-structured with app libraries and api libraries.
In an embodiment, the app repository has application information stored therein.
In an embodiment, the application information includes: app id, secret, and default homepage information.
In an embodiment, the api library stores resource request information.
In one embodiment, the resource request information includes an address, a request mode, and return data.
In one embodiment, the database configuration is preloaded in memory.
In one embodiment, static classes or enumeration configuration information is loaded if no corresponding database configuration exists.
According to another aspect of the present invention, there is provided a service development apparatus including a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the public number project development method of any one of the above, when executing the computer program.
According to still another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the public number item development method as described in any one of the above.
The embodiment of the invention has the beneficial effects that: through regular warehousing of services of three-party platforms such as WeChat public numbers into a cache, a unified request class library is developed, and unified management and maintenance of request and response information can be realized; the class library for integrated calling is developed, so that multiplexing and management are facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
The above features and advantages of the present invention will be better understood after reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
FIG. 1 is a schematic flow diagram of a method of an embodiment of the present application;
Detailed Description
The invention is described in detail below with reference to the drawings and the specific embodiments. It is noted that the aspects described below in connection with the drawings and the specific embodiments are merely exemplary and should not be construed as limiting the scope of the invention in any way.
As shown in fig. 1, an embodiment of the present application provides a method for developing public number projects, including the following steps:
s100, when developing public number application, the request resources related to access to the WeChat open platform in the service are required to be regulated into a database. When the project is started, loading database configuration;
s200, judging whether corresponding database configuration exists or not;
if the corresponding database configuration exists, carrying out request initialization; if no corresponding database configuration exists, static class or enumeration configuration information is loaded.
S300, creating WxEntity and initializing, and packaging request metadata, including request information, logs, returned data and the like;
s400, sending request information;
s500, the WxBase carries a WxEntity execution request, and the request comprises: calling a general request method, maintaining a token, calling a custom method, and returning data or request logs; in a possible embodiment, the method may further include customized methods for acquiring user information, submitting various pictures and other resources.
And S600, returning unified formatted data to complete the complete request.
In a possible embodiment, the database is pre-regularly configured with an app library and an api library. Wherein, application information such as app id, secret, default homepage and the like is stored in the app library. The api library stores resource request information, such as address, request mode, and returned data. When the project is started, the database configuration is preloaded in the memory for standby.
In project development, service call of a three-party platform generally needs to be managed in a unified way, specific configuration information of a request service needs to be collected in a unified enumeration or class, but the problem that dynamic configuration cannot be carried out in project operation exists. The method is characterized in that request configuration information and specific public number example information of each service of the public number are respectively accessed through supporting database api and app classification rules. The test environments of different examples can be accessed by setting different states, meanwhile, after all calling interfaces are integrated, the project loads information into the memory, when specific service is called, metadata information is requested through the developed WxEntity class package, and the actual request actions such as maintenance, request sending, data package returning and the like are obtained through the specific token executed through the developed WxBase class.
It is readily understood that embodiments of the present application also provide a public number project development apparatus including a memory and a processor.
Wherein the memory may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory may include a storage program area and a storage data area, wherein the storage program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-described public number item development method, and the like; the storage data area may store data and the like involved in the above-described public number project development method.
The processor may include one or more processing cores. The processor performs the various functions of the present application and processes the data by executing or executing instructions, programs, code sets, or instruction sets stored in memory, calling data stored in memory. The processor may be at least one of an application specific integrated circuit, a digital signal processor, a digital signal processing device, a programmable logic device, a field programmable gate array, a central processing unit, a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronic device for implementing the above-mentioned processor function may be other for different apparatuses, and embodiments of the present application are not specifically limited.
The public number development device according to the embodiment of the present application may be stored in a computer-readable storage medium if implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Accordingly, the embodiment of the present invention also provides a computer storage medium in which computer executable instructions are stored, which when executed by a processor, implement the above-mentioned public number project development method of the embodiment of the present invention.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description is of the preferred embodiment of the present application and is not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents, alternatives, and alternatives falling within the spirit and scope of the invention.

Claims (5)

1. A method of developing a public number project comprising the steps of:
s100, when a project public number application is developed and started, firstly, regulating request resources related to access to a WeChat open platform in a service into a database, wherein an app library and an api library are pre-configured in the database, application information is stored in the app library, and resource request information is stored in the api library; when the project is started, specific configuration information of the request service is collected in unified enumeration or class, an app database and an api database are classified and regulated, the request configuration information of each service of a public number and specific public number example information are respectively accessed, test environments of different examples are accessed by setting different states, and after all call interfaces are integrated, database configuration is loaded into a memory for standby;
s200, judging whether corresponding database configuration exists, and if so, carrying out request initialization; if the corresponding database configuration does not exist, loading static class or enumeration configuration information;
s300, creating WxEntity and initializing when specific service is called, and packaging request metadata, wherein the request data at least comprises request information, logs and return data;
s400, sending request information;
s500, wxBase carries a WxEntity execution request, wherein the request comprises a general request method, a token maintenance method, a custom method, a data or request log return method, a custom user information acquisition method and a method for submitting various resources;
and S600, returning unified formatted data to complete the complete request.
2. The public number item development method of claim 1, wherein: the application information includes app id, secret, and default homepage information.
3. The public number item development method of claim 1, wherein: the resource request information includes an address, a request mode and return data.
4. A public number project development device, comprising a memory and a processor;
the memory is used for storing a computer program;
the processor, when executing the computer program, is configured to implement the public number project development method of any one of claims 1 to 3.
5. A computer-readable storage medium, wherein the storage medium has stored thereon a computer program which, when executed by a processor, implements the public number item development method of any one of claims 1 to 3.
CN202111656118.6A 2021-12-30 2021-12-30 Public number project development method, device and storage medium Active CN114338580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111656118.6A CN114338580B (en) 2021-12-30 2021-12-30 Public number project development method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111656118.6A CN114338580B (en) 2021-12-30 2021-12-30 Public number project development method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114338580A CN114338580A (en) 2022-04-12
CN114338580B true CN114338580B (en) 2023-08-01

Family

ID=81018107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111656118.6A Active CN114338580B (en) 2021-12-30 2021-12-30 Public number project development method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114338580B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189502A (en) * 2018-09-17 2019-01-11 网易(杭州)网络有限公司 A kind of message treatment method and relevant device based on instant messaging public platform
WO2019080460A1 (en) * 2017-10-26 2019-05-02 平安科技(深圳)有限公司 Management method for official wechat account, electronic device and computer-readable storage medium
CN113468491A (en) * 2021-06-07 2021-10-01 深圳供电局有限公司 API service engine method, system, electronic equipment and computer readable storage medium
CN113742702A (en) * 2021-07-21 2021-12-03 南方电网深圳数字电网研究院有限公司 Method, system, equipment and storage medium for safety access based on enterprise WeChat

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019080460A1 (en) * 2017-10-26 2019-05-02 平安科技(深圳)有限公司 Management method for official wechat account, electronic device and computer-readable storage medium
CN109189502A (en) * 2018-09-17 2019-01-11 网易(杭州)网络有限公司 A kind of message treatment method and relevant device based on instant messaging public platform
CN113468491A (en) * 2021-06-07 2021-10-01 深圳供电局有限公司 API service engine method, system, electronic equipment and computer readable storage medium
CN113742702A (en) * 2021-07-21 2021-12-03 南方电网深圳数字电网研究院有限公司 Method, system, equipment and storage medium for safety access based on enterprise WeChat

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
weixin4j开发-为大家提供一个Weixin对象的工具类;谦奕爸爸;https://blog.csdn.net/weinichendian/article/details/74927501;全文 *
基于微信公众平台的应用系统开发模式研究;万春旭;;科技视界(第22期);全文 *

Also Published As

Publication number Publication date
CN114338580A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US9665841B2 (en) Cross-platform application framework
US8074231B2 (en) Configuration of isolated extensions and device drivers
CN110007980B (en) Method and device for realizing multi-service server
WO2017166447A1 (en) Method and device for loading kernel module
US20130067600A1 (en) Selective file access for applications
US20130067457A1 (en) Method and system for installing portable executable applications
KR101682738B1 (en) Managed system extensibility
US20150186161A1 (en) Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product
CN111782668A (en) Data structure reading and updating method and device, and electronic equipment
CN106796521B (en) API version control independent of product release
WO2007137403A1 (en) System and method of generating applications for mobile devices
US8200938B2 (en) Computer system and method providing a memory buffer for use with native and platform-independent software code
US20080141219A1 (en) Multiple inheritance facility for java script language
CN115357940A (en) Data processing method and device, storage medium and electronic equipment
KR20120037381A (en) Controlling access to software component state
US11586482B2 (en) Deployment of services with dependencies
US20020087737A1 (en) Computer system and method providing a memory buffer for use with native and platform-independent software code
US20070038572A1 (en) Method, system and computer program for metering software usage
CN110941443B (en) Method and device for modifying file name in SDK (software development kit) and electronic equipment
CN114338580B (en) Public number project development method, device and storage medium
CN115659340B (en) Counterfeit applet identification method and device, storage medium and electronic equipment
US6721809B1 (en) Method and apparatus for configuring extensible application programming interfaces
US8615736B2 (en) Module facility for JAVASCRIPT language
CN114416402A (en) Information transmission method, terminal device and storage medium
CN116700841B (en) Method and device for calling native API (application program interface)

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