A distributed service system, method, computer device and storage medium

CN116455985BActive Publication Date: 2026-10-23OCEANS KING LIGHTING SCI&TECH CO LTD +12
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310091772.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-14
Publication Date
2026-10-23
Estimated Expiration
2043-01-14

AI Technical Summary

Technical Problem

当单体服务出现宕机的时候,系统将不可使用,资源调用稳定性差

Benefits of technology

[0015]通过将服务模块拆分成多个数据服务单元实现资源的调用,这些数据服务单元的应用相对独立,保证一个数据服务单元宕机时,其他数据服务单元可以正常运行,保证资源调用的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116455985B_ABST
    Figure CN116455985B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a distributed micro-service system, comprising a gateway module, a service module, a service calling module, a registration center and a server; the gateway module identifies a request address corresponding to a request; a plurality of data service units are preset in the service module, a corresponding service address is set for each data service unit, and the data service units match the service addresses with the request address; the service calling module screens out a data service unit with the highest matching degree to obtain a remote calling service address corresponding to the request address; the registration center obtains a target remote calling service according to the remote calling service address; and the server calls the target remote calling service for a user, thereby realizing resource calling. The system realizes resource calling by splitting the service module into a plurality of data service units, the application of the data service units is relatively independent, when one data service unit is down, other data service units can normally operate, and the stability of resource calling is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the fields of Internet of Things and smart lighting technology, and in particular to a distributed service system, method, computer device and storage medium. [Background Technology]

[0002] Existing smart work lighting systems use a single service to run all functions. When a single service fails, the system becomes unusable, resulting in poor resource allocation stability. [Summary of the Invention]

[0003] In view of this, the present invention provides a distributed service system, method, computer device and storage medium to enable the system to operate normally when a single service fails.

[0004] The specific technical solution of the first embodiment of the present invention is as follows: a distributed microservice system, comprising: a gateway module, a service module, a service invocation module, a registration center, and a server; the gateway module is used to receive user requests and identify the request address corresponding to the request; the service module has multiple preset data service units, each data service unit is set with a corresponding service address, the data service unit is used to obtain the request address and match the service address with the request address; the service invocation module is used to obtain the matching degree between the service address and the request address in each data service unit, the service invocation module filters out the data service unit with the highest matching degree, the data service unit with the highest matching degree is the target data service unit, the target data service unit is used to obtain the remote invocation service address corresponding to the request address; the registration center has preset remote invocation services, the registration center is used to obtain the target remote invocation service according to the remote invocation service address; the server is used to invoke the target remote invocation service to the user to realize resource invocation.

[0005] Preferably, the data service unit has a preset resource service matching table, which is used to characterize the matching relationship between the remote call service address and the first resource service matching coupling degree. The data service unit is specifically used to: obtain the request address, match the service address with the request address to obtain the first resource service matching coupling degree, which represents the coupling degree between the service address and the request address; the service call module is specifically used to: obtain the first resource service matching coupling degree in each data service unit, obtain the data service unit with the highest matching degree between the service address and the request address based on the first resource service matching coupling degree, and the data service unit with the highest matching degree is the target data service unit; the target data service unit obtains the remote call service address that matches the request address according to the resource service table.

[0006] Preferably, obtaining the request address and matching the service address with the request address to obtain the first resource service matching coupling degree includes: each data service unit matching the service address one by one according to the time order of obtaining different request addresses to obtain the first resource service matching coupling degree.

[0007] Preferably, it further includes: a first service scheduling module; the remote call service has a preset remote call service address, the first service scheduling module is used to obtain the number of times the remote call service address and the target data service unit are matched, the first service scheduling module constructs a second coupling degree between the remote call service and each data service unit based on the number of times the remote call service address and the target data service unit are matched, the first service scheduling module divides the remote call service into the corresponding data service unit according to the second coupling degree; after the remote call service is divided into the corresponding data service unit, the data service unit obtains the target remote call service within the data service unit according to the first resource service matching degree, and the server calls the target remote call service to the user to realize resource call.

[0008] Preferably, the gateway module presets a token threshold; the gateway module is also used to identify the token value corresponding to the request after receiving the request and compare it with the token threshold, and accept or reject the user's request according to the comparison result, so as to realize the authentication of the request.

[0009] Preferably, the gateway module presets a traffic threshold, and the gateway module is also used to sequentially identify the request address corresponding to the request according to the preset traffic threshold, and send the request address to the service module.

[0010] Preferably, it also includes an interception module; the interception module sets a request frequency threshold, the interception module is used to identify the request frequency of a request, and when the request frequency is greater than the request frequency threshold within a preset time, the interception module is used to intercept the gateway module from receiving the request.

[0011] For the same purpose, the specific technical solution of the second embodiment of the present invention is as follows: a distributed service method, the method comprising: a gateway module receiving a user's request and identifying the request address corresponding to the request; a service module pre-setting multiple data service units, each data service unit being set with a corresponding service address, the data service unit obtaining the request address and matching the service address with the request address; a service invocation module obtaining the matching degree between the service address and the request address in each data service unit, the service invocation module filtering out the data service unit with the highest matching degree, the data service unit with the highest matching degree being the target data service unit, the target data service unit obtaining the remote invocation service address corresponding to the request address; a registration center pre-setting a remote invocation service, the registration center obtaining the target remote invocation service according to the remote invocation service address; and a server invoking the target remote invocation service to the user to realize resource invocation.

[0012] For the same purpose, the specific technical solution of the third embodiment of the present invention is as follows: a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement any of the systems described in the first embodiment.

[0013] For the same purpose, the specific technical solution of the fourth embodiment of the present invention is: a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the system described in any of the first embodiments.

[0014] Implementing the embodiments of the present invention will have the following beneficial effects:

[0015] By splitting the service module into multiple data service units to enable resource access, and with these data service units operating relatively independently, it is ensured that if one data service unit fails, the others can continue to function normally, thus guaranteeing the stability of resource access. [Attached Image Description]

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a diagram of the architecture of a distributed microservice system.

[0018] Figure 2Flowchart for the gateway module to accept or reject requests based on token thresholds;

[0019] Figure 3 Flowchart for the interception module's request interception process;

[0020] Figure 4 Here is a flowchart of the distributed service method;

[0021] Among them, 101 is the gateway module; 102 is the service module; 103 is the service scheduling module; 104 is the registration center; and 105 is the server.

Detailed Implementation Methods

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0023] In this embodiment of the invention, the user's request is lighting control information. This lighting control information can be one of platform policy information, terminal policy information, terminal plan information, or gateway plan information. The type of lighting control information can be determined based on its setting type and the recipient. If the setting type is policy setting and the recipient is the platform, then the lighting control information is specifically platform policy information; if the setting type is policy setting and the recipient is the terminal, then the lighting control information is specifically terminal policy information; if the setting type is plan setting and the recipient is the terminal, then the lighting control information is specifically terminal plan information; if the setting type is plan setting and the recipient is the gateway module, then the lighting control information is specifically gateway policy information. Of course, the lighting control information can also include other types, such as platform plan information. The gateway module is communicatively connected to the terminal. Communication between the terminal and the gateway module includes wireless or wired communication. Wired communication can be achieved by connecting the gateway module to a PLC gateway with power line communication functionality via a serial port, and the PLC gateway communicating with the terminal via a power line. Wireless communication can be via wireless transmission protocols or Bluetooth communication, etc.

[0024] Please see Figure 1This application provides a structural diagram of a distributed microservice system, comprising: a gateway module 101, a service module 102, a service invocation module 103, a registration center 104, and a server 105. The gateway module 101 receives user requests and identifies the corresponding request address. The service module 102 has multiple pre-defined data service units, each with a corresponding service address. Each data service unit obtains the request address and matches it with the service address. The service invocation module 103 obtains the matching degree between the service address and the request address in each data service unit. The service invocation module selects the data service unit with the highest matching degree as the target data service unit, which obtains the remote invocation service address corresponding to the request address. The registration center 104 pre-defined remote invocation services and obtains the target remote invocation service based on the remote invocation service address. The server 105 invokes the target remote invocation service to the user, thus realizing resource invocation.

[0025] Specifically, user login is uniformly verified using gateway and authentication services. The first login requires authentication, and only after successful authentication is the request forwarded to the data service unit. The user sends a request through the front end, and gateway module 101 receives the request via a remote procedure call (RPC) protocol and identifies the corresponding request address. The service module has multiple pre-defined data service units, such as the first data service unit, the second data service unit, ..., the nth data service unit. Each data service unit has a corresponding service address, such as the first data service unit having the first service address, the second data unit having the second service address, ..., the nth data service unit having the nth service address. Each data service unit obtains the request address and matches the service address with the request address. The service call module is used to obtain the matching degree between the service address and the request address in each data service unit. If the matching degree between the first service address and the request address is A, the matching degree between the second service address and the request address is B, ..., and the matching degree between the nth service address and the request address is Z, then A has the highest value among all the matching degrees. The service invocation module selects the data service unit with the highest matching degree, that is, the first data service unit corresponding to the first service address with the matching degree A, which is the target data service unit. The target data service unit is used to obtain the remote invocation service address corresponding to the request address. The registry center presets remote invocation services and uses the registry center to obtain the target remote invocation service based on the remote invocation service address. The server uses the server to invoke the target remote invocation service to the user to realize resource invocation. The remote invocation protocol can be the Telnet protocol, Rlogin protocol, or SSH (Secure Shell) protocol in the TCP / IP protocol, etc.

[0026] This system enables resource access by breaking down service modules into multiple data service units. These data service units operate relatively independently, ensuring that if one data service unit fails, the others can continue to function normally, thus guaranteeing the stability of resource access.

[0027] In a specific embodiment, a resource service matching table is preset in the data service unit. The resource service matching table is used to characterize the matching relationship between the remote call service address and the first resource service matching coupling degree. Each data service unit obtains the request address and matches the service address within each data service unit with the request address to obtain the first resource service matching coupling degree corresponding to each data service unit. The first resource service matching coupling degree represents the coupling degree of the service address and the request address. The service call module obtains the first resource service matching coupling degree in each data service unit and obtains the data service unit with the highest matching degree between the service address and the request address based on the first resource service matching coupling degree. That is, the data service unit with the highest first resource service matching degree is the target data service unit. The target data service unit obtains the remote call service address that matches the request address according to the resource service table.

[0028] In a specific embodiment, obtaining the request address and matching the service address with the request address to obtain the first resource service matching coupling degree includes: each data service unit matching the service address one by one according to the time order in which different request addresses are obtained to obtain the first resource service matching coupling degree. Specifically, each data service unit parses the first request address to obtain address data according to the time order in which different request addresses are obtained, constructs an address structure composition table, an address structure relationship composition table, and an address internal information transmission statistics table according to the address data in a specified format, obtains the interface relationship between addresses according to the address structure composition table, the address structure relationship composition table, and the service address, and obtains the first resource matching coupling degree between each data service unit and the request address according to the address interface relationship and the address internal information transmission statistics table. Each data service unit obtains a different resource matching coupling degree with different request addresses.

[0029] Specifically, matching request addresses with service addresses can be achieved through rules specifying weights, IP binding, and reasonable allocation. Specifying weights refers to the access ratio of a given request address. When the performance of data service units is uneven, the data service unit matches service addresses with request addresses based on the access ratio of different request addresses, prioritizing requests with higher access ratios. IP binding involves pre-binding the request's IP address with the data service unit's IP address. When a request with that IP address is sent to the data service unit, the data service unit prioritizes matching requests corresponding to that IP address. Reasonable allocation matches requests based on their response time, prioritizing requests with shorter response times.

[0030] In specific implementation, it also includes: a first service scheduling module; the remote call service presets a remote call service address, the first service scheduling module is used to obtain the number of times the remote call service address and the target data service unit are matched, the first service scheduling module constructs a second coupling degree between the remote call service and each data service unit based on the number of times the remote call service address and the target data service unit are matched, and the first service scheduling module divides the remote call service into the corresponding data service unit according to the second coupling degree; after the remote call service is divided into the corresponding data service unit, the data service unit obtains the target remote call service within the data service unit according to the first resource service matching degree, and the server calls the target remote call service to the user to realize resource invocation. By dividing the remote call service into data service units, the step of obtaining the remote call service address matching the request address according to the resource service table is eliminated. When the service invocation module determines that a certain data service unit is the target data service unit, the target data service unit directly executes the remote call service within it, saving service invocation time.

[0031] For specific implementation details, please refer to [link / reference]. Figure 2 The flowchart illustrates the gateway module's request rejection process based on a token threshold. Gateway module 101 presets a token threshold. Upon receiving a request, gateway module 101 identifies the token value corresponding to the request and compares it with the token threshold. Based on the comparison result, it accepts or rejects the user's request, thus authenticating the request. Specifically, the token threshold is Token1, and gateway module 101 identifies the token value corresponding to the request as Token2. When the value of Token1 is less than or equal to the value of Token2, gateway module 101 rejects the user request; when the value of Token1 is greater than the value of Token2, gateway module 101 accepts the user request.

[0032] In practical implementation, the gateway module 101 presets a traffic threshold. The gateway module 101 also identifies the request addresses corresponding to requests sequentially according to the preset traffic threshold and sends the request addresses to the service module. Optionally, the gateway module 101 presets a traffic threshold of 2000 times / second. When the gateway module 101 identifies the request addresses corresponding to requests at a maximum frequency of 2000 times / second, and when the request frequency is higher than 2000 times / second, the gateway module 101 identifies requests in the order they are sent at a frequency of 2000 times / second. The gateway module allows requests to pass according to the preset traffic threshold to avoid excessive system service pressure.

[0033] For specific implementation details, please refer to [link / reference]. Figure 3This is a flowchart illustrating the request interception process of the interception module. The system also includes an interception module; this module sets a request frequency threshold and identifies the frequency of requests. When the request frequency exceeds the threshold within a preset time, the interception module intercepts the request received by the gateway module. Specifically, the interception module sets the request frequency threshold to 5 times / second. When the interception module detects a request frequency higher than 5 times / second, it intercepts the request, reducing the pressure of high-frequency requests on the entire system.

[0034] In a specific embodiment, the distributed service system further includes a second service scheduling module. The scheduling module obtains the request time, number of requests, memory occupied by the requests, and number of calls to different remote call services for different requests, obtains resource consumption values, and divides different remote call services into corresponding data service units according to the resource consumption values, which can reduce the time of calling services.

[0035] In a specific embodiment, when a user sends a request, the remote call service is invoked through the distributed service system. If the remote call service is not executed after waiting for 3 seconds, the system will resend the request 3 times to prevent data loss during transmission and data interruption caused by network fluctuations. This improves the communication capability between the user and the gateway, thereby enhancing the reliability of the system.

[0036] Distributed service systems can be applied to smart lighting systems to achieve distributed services. By breaking down the service modules of a smart lighting system into multiple relatively independent data service units, resource access is achieved. The relatively independent application of these data service units reduces the coupling of the smart lighting system, ensuring that if one data service unit fails, others can continue to operate normally, guaranteeing the stability of resource access. The distributed architecture deployment and loosely coupled system structure facilitate functional expansion. For example, when adding video surveillance functionality, a corresponding video surveillance microservice can be added, and further linkage control between video surveillance and lighting can be defined. This facilitates providing smart lighting solutions and smart IoT services for different application scenarios. It can be specifically built according to customer needs and also facilitates system maintenance. Furthermore, dividing a large monolithic service into multiple microservices based on business functions reduces the coupling between code during system construction. Developers do not need to focus on other business functions during development, avoiding excessive data exposure and database sharing, and minimizing synchronous calls.

[0037] Compared to traditional monolithic services, distributed service systems have the following advantages:

[0038] 1) High performance: Because a large number of requests are reasonably distributed to various data service units, the pressure on each data service unit is reduced, and multiple requests can be processed by different data service units, increasing the processing capacity and achieving higher performance.

[0039] 2) High Availability: In a monolithic service, the failure of the monolithic service will cause the entire system to become unavailable. However, in a distributed system, if a data service unit fails, the system will no longer send requests to that data service unit, and the system can still work and continue to provide services to the outside world.

[0040] 3) Maintainability: If a data service unit in the system cannot provide services for some reason, such as a data service unit failure, you only need to stop the data service unit that failed, process it, and then bring it back online.

[0041] 4) Flexibility: For example, when the system needs to be updated, it is only necessary to stop some data service units during off-peak periods, update these data service units to the latest version, and then use the routing algorithm to route requests to these updated data service units. Finally, the old version data service units are updated, so that the service can be provided to the outside world without interruption during the system update without stopping the system.

[0042] For the same purpose, please refer to Figure 4 The following is a flowchart of a distributed service method. A second aspect of this application provides a distributed service method, comprising: 101. A gateway module receives a user's request and identifies the request address corresponding to the request; 102. A service module pre-sets multiple data service units, each with a corresponding service address; 103. The data service unit obtains the request address and matches the service address with the request address; 104. A service invocation module obtains the matching degree between the service address and the request address in each data service unit, and the service invocation module filters out the data service unit with the highest matching degree, which is designated as the target data service unit; 105. The target data service unit obtains the remote invocation service address corresponding to the request address; 106. A registration center pre-sets a remote invocation service, and the registration center obtains the target remote invocation service based on the remote invocation service address; 107. The server invokes the target remote invocation service to the user, realizing resource invocation. By splitting the service module into multiple data service units to realize resource invocation, the applications of these data service units are relatively independent, ensuring that when one data service unit fails, other data service units can operate normally, thus guaranteeing the stability of resource invocation.

[0043] For the same purpose, a third aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the systems described in the first aspect. When using this computer device, resource access is achieved by dividing service modules into multiple data service units. These data service units are relatively independent in their applications, ensuring that if one data service unit fails, other data service units can continue to operate normally, thus guaranteeing the stability of resource access.

[0044] For the same purpose, a fourth aspect of this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the systems described in the first aspect. When using this computer-readable storage medium, resource access is achieved by dividing service modules into multiple data service units. These data service units are relatively independent in their applications, ensuring that if one data service unit fails, other data service units can continue to operate normally, thus guaranteeing the stability of resource access.

[0045] In the several embodiments provided in this application, it should be understood that the disclosed system can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0046] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0047] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0048] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0049] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A distributed microservice system, characterized in that, include: Gateway module, service module, service invocation module, registry center, and server; The gateway module is used to receive user requests and identify the request address corresponding to the request; The service module has multiple data service units pre-set, each data service unit is set with a corresponding service address, and the data service unit is used to obtain the request address and match the service address with the request address; The service invocation module is used to obtain the matching degree between the service address and the request address in each data service unit. The service invocation module filters out the data service unit with the highest matching degree. The data service unit with the highest matching degree is the target data service unit. The target data service unit is used to obtain the remote invocation service address corresponding to the request address. The registration center pre-sets a remote call service, and the registration center is used to obtain the target remote call service according to the address of the remote call service; The server is used to invoke the target remote call service to the user to realize resource access; The data service unit includes a preset resource service matching table, which represents the matching relationship between remote call service addresses and the first resource service matching coupling degree. Specifically, the data service unit is used for: Obtain the request address, match the service address with the request address to obtain a first resource service matching coupling degree, where the first resource service matching coupling degree represents the coupling degree between the service address and the request address; The service invocation module is specifically used for: Obtain the first resource service matching coupling degree in each data service unit, and obtain the data service unit with the highest matching degree between the service address and the request address based on the first resource service matching coupling degree. The data service unit with the highest matching degree is the target data service unit. The target data service unit obtains the remote call service address that matches the request address according to the resource service table; It also includes: the first service scheduling module; The remote call service is preset with a remote call service address. The first service scheduling module is used to obtain the number of times the remote call service address and the target data service unit are matched. The first service scheduling module constructs a second coupling degree between the remote call service and each data service unit based on the number of times the remote call service address and the target data service unit are matched. The first service scheduling module divides the remote call service into the corresponding data service unit based on the second coupling degree. After the remote call service is assigned to the corresponding data service unit, the data service unit obtains the target remote call service within the data service unit according to the first resource service matching coupling degree, and the server calls the target remote call service to the user to realize resource call.

2. A distributed microservice system as described in claim 1, characterized in that, The step of obtaining the request address and matching the service address with the request address to obtain the first resource service matching coupling degree includes: Each data service unit matches the service address one by one according to the time sequence of obtaining different request addresses to obtain the first resource service matching coupling degree.

3. A distributed microservice system as described in claim 1, characterized in that: The gateway module presets a token threshold; the gateway module is also used to identify the token value corresponding to the request after receiving a request and compare it with the token threshold, and accept or reject the user's request according to the comparison result, so as to realize the authentication of the request.

4. A distributed microservice system as described in claim 1, characterized in that: The gateway module presets a traffic threshold. The gateway module is also used to identify the request address corresponding to the request sequentially according to the preset traffic threshold, and send the request address to the service module.

5. A distributed microservice system as described in claim 1, characterized in that: It also includes an interception module; The interception module sets a request frequency threshold. The interception module is used to identify the request frequency of a request. When the request frequency is greater than the request frequency threshold within a preset time, the interception module is used to intercept the gateway module from receiving the request.

6. A distributed service method, applied to the distributed microservice system as described in claim 1, characterized in that, The method includes: The gateway module receives user requests and identifies the request address corresponding to the request; The service module has multiple data service units pre-set, each data service unit is set with a corresponding service address, the data service unit obtains the request address and matches the service address with the request address; The service invocation module obtains the matching degree between the service address and the request address in each data service unit. The service invocation module filters out the data service unit with the highest matching degree. The data service unit with the highest matching degree is the target data service unit. The target data service unit obtains the remote invocation service address corresponding to the request address. The registration center pre-sets a remote invocation service, and the registration center obtains the target remote invocation service based on the address of the remote invocation service. The server invokes the target remote call service to the user to realize resource access.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the system according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the system described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Distributed service implementation method and distributed service system

    CN114979143A

  • Policy based service routing

    US20190319885A1