CN114338580A - Public account project development method, device and storage medium - Google Patents

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

Info

Publication number
CN114338580A
CN114338580A CN202111656118.6A CN202111656118A CN114338580A CN 114338580 A CN114338580 A CN 114338580A CN 202111656118 A CN202111656118 A CN 202111656118A CN 114338580 A CN114338580 A CN 114338580A
Authority
CN
China
Prior art keywords
request
project development
development method
public
public account
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
Application number
CN202111656118.6A
Other languages
Chinese (zh)
Other versions
CN114338580B (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

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a public number project development method, a device and a storage medium, wherein the method comprises the following steps: starting a project and loading database configuration; judging whether corresponding database configuration exists or not; if yes, performing request initialization; creating and initializing WxEntity; sending request information; WxBase carries a WxEntity execution request, wherein the request comprises a general request calling method, a token maintenance method, a customization calling method, and returned data or a request log; and returning the unified formatted data. The method and the system have the advantages that services of a three-party platform such as WeChat public numbers are regularly put into a cache, a class library of unified requests is developed, and unified management and maintenance of the requests and response information can be realized; and the multiplexing and management are facilitated by developing and integrating the called class library.

Description

Public account project development method, device and storage medium
Technical Field
The invention relates to a WeChat public number project development technology, in particular to a public number project development method, a device and a storage medium.
Background
In practical application of public number project development, when a public number part function is realized, a 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 encapsulated http client requests the WeChat service, a request mode, an address and a return mode need to be managed, and the problems of token generation and expiration need to be managed, which brings management difficulty.
Disclosure of Invention
The invention aims to provide a public number project development method, a public number project development device and a public number project development 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, including the steps of:
starting a project and loading database configuration;
judging whether corresponding database configuration exists or not;
if yes, performing request initialization;
creating and initializing WxEntity;
sending request information;
WxBase carries a WxEntity execution request, wherein the request comprises a general request calling method, a token maintenance method, a customization calling method, and returned data or a request log;
and returning the unified formatted data.
In one embodiment, the database is pre-structured with an app library and an api library.
In one embodiment, the app repository stores application information.
In one embodiment, the application information includes: appid, secret, and default home page information.
In one 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 pre-loaded in memory.
In one embodiment, if there is no corresponding database configuration, a static class or enumerate configuration information is loaded.
According to another aspect of the present invention, there is provided a service development apparatus including a memory and a processor;
the memory for storing a computer program;
the processor is configured to implement the public account project development method according to any one of the above items when the computer program is executed.
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 project development method as in any one of the above.
The embodiment of the invention has the beneficial effects that: services of a three-party platform such as WeChat public numbers are regularly put into a cache to develop a class library of unified requests, so that unified management and maintenance of the requests and response information can be realized; and the multiplexing and management are facilitated by developing and integrating the called class library.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
The above features and advantages of the present disclosure will be better understood upon reading the detailed description of embodiments of the disclosure in conjunction with the following drawings. In the drawings, components are not necessarily drawn to scale, and components having similar relative characteristics or features may have the same or similar reference numerals.
FIG. 1 is a schematic flow chart of a method of an embodiment of the present application;
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. It is noted that the aspects described below in connection with the figures and the specific embodiments are only exemplary and should not be construed as imposing any limitation on the scope of the present invention.
As shown in fig. 1, an embodiment of the present application provides a public account project development method, including the following steps:
s100, when the public application is developed, request resources related to accessing the WeChat open platform in the business need to be structured into a database. Loading the database configuration when starting the project;
s200, judging whether corresponding database configuration exists or not;
if the corresponding database configuration exists, performing request initialization; if no corresponding database configuration exists, loading a static class or enumerating configuration information.
S300, establishing and initializing WxEntity, and packaging request metadata including request information, logs, return data and the like;
s400, sending request information;
s500, carrying a WxEntity execution request by the WxBase, wherein the request comprises: calling a general request method, maintaining a token, calling a customized method, and returning data or request logs; in a possible embodiment, the method may further include a customized method for acquiring user information, submitting various pictures and other resources.
And S600, returning the unified formatted data to complete the complete request.
In a possible embodiment, the database is configured with app library and api library in advance. The app library stores application information, such as appid, secret, and default homepage. The api library stores resource request information, such as address, request mode, return data and the like. When the project is started, the database configuration is loaded in the memory in advance for standby.
In project development, service invocation of a three-party platform generally needs to be managed in a unified mode, specific configuration information of a request service needs to be collected in a unified enumeration or class, and the problem that dynamic configuration cannot be achieved in project operation exists. The method supports the classification regulation of the database api and the app, and respectively accesses the request configuration information and the specific public number example information of each service of the public number. The testing environments of different examples can be accessed by setting different states, meanwhile, the project loads information into a memory after integrating all calling interfaces, requests metadata information through developed WxEntity class encapsulation when calling specific services, and executes actual request actions such as specific token acquisition and maintenance, request sending, data package returning and the like through the developed WxBase class.
It is to be appreciated that the embodiments of the present application also provide a public number project development device, which includes a memory and a processor.
Wherein the memory is operable to store an instruction, a program, code, a set of codes, or a set 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, and instructions for implementing the above-described public number project development method, and the like; the storage data area may store data and the like involved in the above-described public account project development method.
A processor may include one or more processing cores. The processor executes or executes the instructions, programs, code sets, or instruction sets stored in the memory, calls data stored in the memory, performs various functions of the present application, and processes the data. 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 is understood that the electronic devices for implementing the above processor functions may be other devices, and the embodiments of the present application are not limited in particular.
The public number project development device in the embodiment of the present application may also be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as an independent product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Accordingly, an embodiment of the present invention further provides a computer storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the method for developing the public account project is implemented.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred 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 above description is only a preferred example of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the scope of the present application.

Claims (10)

1. A public number project development method is characterized by comprising the following steps:
starting a project and loading database configuration;
judging whether corresponding database configuration exists or not;
if yes, performing request initialization;
creating and initializing WxEntity;
sending request information;
WxBase carries a WxEntity execution request, wherein the request comprises a general request calling method, a token maintenance method, a customization calling method, and returned data or a request log;
and returning the unified formatted data.
2. The public account project development method according to claim 1, characterized in that: the database is pre-structured with an app library and an api library.
3. The public account project development method according to claim 2, characterized in that: the app library stores application information.
4. The public account project development method according to claim 3, characterized in that: the application information includes: appid, secret, and default home page information.
5. The public account project development method according to claim 2, characterized in that: the api library stores resource request information.
6. The public account project development method according to claim 5, characterized in that: the resource request information comprises an address, a request mode and return data.
7. The public account project development method according to claim 1, characterized in that: the database configuration is pre-loaded in the memory.
8. The public account project development method according to claim 1, characterized in that: if no corresponding database configuration exists, loading a static class or enumerating configuration information.
9. A service development apparatus comprising a memory and a processor;
the memory for storing a computer program;
the processor, when executing the computer program, is configured to implement the public address project development method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when executed by a processor, implements the public address project development method according to any one of claims 1 to 8.
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 true CN114338580A (en) 2022-04-12
CN114338580B 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
万春旭;: "基于微信公众平台的应用系统开发模式研究", 科技视界, no. 22 *
谦奕爸爸: "weixin4j开发-为大家提供一个Weixin对象的工具类", HTTPS://BLOG.CSDN.NET/WEINICHENDIAN/ARTICLE/DETAILS/74927501 *

Also Published As

Publication number Publication date
CN114338580B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
CN110007980B (en) Method and device for realizing multi-service server
JP6182160B2 (en) Dynamic code insertion into a running process
US20230168902A1 (en) Bootstrapping Profile-Guided Compilation and Verification
SG184864A1 (en) Cross-platform application framework
US8200938B2 (en) Computer system and method providing a memory buffer for use with native and platform-independent software code
CN112667246B (en) Application function expansion method and device and electronic equipment
CN106796521B (en) API version control independent of product release
CN112685020B (en) Method and device for dynamically creating service interface, electronic equipment and storage medium
US20080141219A1 (en) Multiple inheritance facility for java script language
US10776180B1 (en) Expression-based feature toggle in an application programming interface (API)
US7213098B2 (en) Computer system and method providing a memory buffer for use with native and platform-independent software code
US9141353B2 (en) Dynamically building locale objects at run-time
CN112154417A (en) Sharing a code base between a stand-alone version and a Web-based version of an application via an emulated network communication channel
CN112486579A (en) Self-service terminal device drive calling standardization method and related device
CN114338580B (en) Public number project development method, device and storage medium
CN110852139A (en) Biometric feature recognition method, biometric feature recognition device, biometric feature recognition equipment and storage medium
CN114416402A (en) Information transmission method, terminal device and storage medium
CN113626001A (en) API dynamic editing method and device based on script
CN116700841B (en) Method and device for calling native API (application program interface)
CN117311799B (en) Configuration method of software project page
CN111506301B (en) Method for bypassing system restriction reflection call and related equipment
CN111045746B (en) Code expansion method and framework
CN118333835A (en) Cuda api-based computing resource compatible method
CN115268849A (en) Static resource obtaining method and device, electronic equipment and storage medium
CN116700827A (en) Loading method, device and medium for enumeration data

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